Makefile 644 字节
Newer Older
W
wangguibao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
LIB			= bsl_var
SUBLIB_DIRS	= interface utils implement 
SUBLIBS		= bsl_var_utils bsl_var_implement 


VAR_ROOT= .
include Makefile.env

all: lib clean

lib: sublibs 
	@echo "[make] building lib $(LIB) ...";
	@for SUBLIB in $(SUBLIBS); do\
		ar xo $(OUTPUT_LIB_PATH)/lib$$SUBLIB.a;	\
	done
	@mkdir -p $(OUTPUT_LIB_PATH)
	@ar cr $(OUTPUT_LIB_PATH)/lib$(LIB).a *.o

sublibs:
	@for SUBLIB in $(SUBLIB_DIRS); do\
		echo "[make] building lib $$SUBLIB ...";\
		make -C $$SUBLIB;\
	done
		
clean:
	@echo "[make] cleaning ..."
	@rm -f *.o
	@for SUBLIB in $(SUBLIB_DIRS); do\
		echo "[make] cleaning lib $$SUBLIB ...";\
		make clean -C $$SUBLIB;\
	done