From 624cc771da4ac5f15ec16a2b0f10feeef0b125c7 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 21 Sep 2000 02:04:51 +0000 Subject: More portable handling of loop header files, as done in util-linux --- Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a2940b5..278887f 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ DODMALLOC = false # If you are running a cross compiler, you may want to set this # to something more interesting... -CROSS = +CROSS = #powerpc-linux- CC = $(CROSS)gcc STRIPTOOL = $(CROSS)strip @@ -83,12 +83,13 @@ else ifeq ($(DOSTATIC),true) LDFLAGS += --static # - #use '-ffunction-sections -fdata-sections' and '--gc-sections' if they work - #to try and strip out any unused junk. Doesn't do much for me, but you may - #want to give it a shot... + #use '-ffunction-sections -fdata-sections' and '--gc-sections' (if they + # work) to try and strip out any unused junk. Doesn't do much for me, + # but you may want to give it a shot... # #ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \ - # -o /dev/null -xc /dev/null 2>/dev/null && $(LD) --gc-sections -v >/dev/null && echo 1),1) + # -o /dev/null -xc /dev/null 2>/dev/null && $(LD) \ + # --gc-sections -v >/dev/null && echo 1),1) # CFLAGS += -ffunction-sections -fdata-sections # LDFLAGS += --gc-sections #endif @@ -106,7 +107,8 @@ ifdef BB_INIT_SCRIPT CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"' endif -all: busybox busybox.links doc + +all: loop.h busybox busybox.links doc doc: olddoc @@ -154,7 +156,7 @@ docs/busybox/busybox.html: docs/busybox.sgml -busybox: $(OBJECTS) +busybox: $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES) $(STRIP) @@ -164,6 +166,11 @@ busybox.links: busybox.def.h nfsmount.o cmdedit.o: %.o: %.h $(OBJECTS): %.o: busybox.def.h internal.h %.c Makefile +utility.o: + +loop.h: + @./mk_loop_h.sh + test tests: cd tests && $(MAKE) all -- cgit v1.1