X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/240bf1625edcc439b62aea43a0983f8207b541b1..ca93116b8d8097330d718e820c26ade1343622dd:/package/uboot-ifxmips/files/lib_bootstrap/Makefile 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 #########################################################################