X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=package%2Fuboot-ifxmips%2Ffiles%2Flib_bootstrap%2FMakefile;h=9dc77df2180642528a486186ee5dabda71f0f205;hb=6552fe0ce941c33504d87534ca60c6f0df211a37;hp=e650be0e478cc7810d4cd47c792fe72f198210ac;hpb=240bf1625edcc439b62aea43a0983f8207b541b1;p=openwrt-10.03%2F.git diff --git a/package/uboot-ifxmips/files/lib_bootstrap/Makefile b/package/uboot-ifxmips/files/lib_bootstrap/Makefile index e650be0e4..9dc77df21 100644 --- a/package/uboot-ifxmips/files/lib_bootstrap/Makefile +++ b/package/uboot-ifxmips/files/lib_bootstrap/Makefile @@ -23,30 +23,38 @@ include $(TOPDIR)/config.mk -LIB = libbootstrap.a +LIB := $(obj)libbootstrap.a -#OBJS_PRINTF_ENABLED = bootstrap_board.o time.o console.o LzmaWrapper.o LzmaDecode.o crc32.o ctype.o display_options.o string.o vsprintf.o lists.o devices.o -#OBJS_PRINTF_DISBALED = bootstrap_board.o LzmaDecode.o string.o crc32.o LzmaWrapper.o - -OBJS = bootstrap_board_$(BOARDDIR).o LzmaDecode.o string.o crc32.o LzmaWrapper.o +OBJS := board.o LzmaDecode.o string.o crc32.o LzmaWrapper.o +CFLAGS += -DCFG_BOOTSTRAP_CODE ifeq ($(BOOTSTRAP_PRINTF_STATUS), BOOTSTRAP_PRINTF_ENABLED) -#overwrite objs -OBJS = bootstrap_board_$(BOARDDIR).o time.o console.o LzmaWrapper.o LzmaDecode.o crc32.o ctype.o display_options.o string.o vsprintf.o lists.o devices.o +OBJS += time.o console.o ctype.o display_options.o vsprintf.o lists.o devices.o CFLAGS += -DDEBUG_ENABLE_BOOTSTRAP_PRINTF endif -all: .depend $(LIB) +SRCS := $(OBJS:.o=.c) +OBJS := $(addprefix $(obj),$(OBJS)) + +all: $(SRCS) $(obj).depend $(LIB) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +vpath %.c ../common ../lib_generic ../lib_$(CPU) + +board_bootstrap.c: + ln -s ../lib_$(CPU)/board.c $@ -$(LIB): $(OBJS) - $(AR) crv $@ $(OBJS) +#LzmaDecode.c LzmaWrapper.c string.c crc32.c: +# ln -s ../lib_generic/$@ $@ ######################################################################### -.depend: Makefile $(OBJS:.o=.c) - echo "make libbootstrap.a with HEAD_SIZE $(HEAD_SIZE)" - $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ +#include $(SRCTREE)/rules.mk +$(obj).depend: $(SRCS) + $(CC) -M $(CFLAGS) $^ > $@ -sinclude .depend +sinclude $(obj).depend #########################################################################