From 09b96811e8ca8ad48fc6604f55690978158d0596 Mon Sep 17 00:00:00 2001 From: thl Date: Wed, 19 Nov 2008 17:40:05 +0000 Subject: [ifxmips] cleanup uboot package git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13291 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/uboot-ifxmips/files/lib_bootstrap/Makefile | 36 +++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to '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 e650be0e47..9dc77df218 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 ######################################################################### -- cgit v1.2.3