Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/scripts/Makefile.IMA
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/scripts/Makefile.IMA
r1765 r2725 1 1 # This is completely unsupported. 2 # 3 # Uasge: make -f scripts/Makefile.IMA 4 # 2 5 # Fix COMBINED_COMPILE upstream (in the Kbuild) and propagate 3 6 # the changes back … … 7 10 obj := $(objtree) 8 11 12 # Look for make include files relative to root of kernel src 13 MAKEFLAGS += --include-dir=$(srctree) 14 9 15 default: busybox 16 10 17 include .config 11 ifdef CONFIG_FEATURE_COMPRESS_USAGE 12 usage_stuff = include/usage_compressed.h 13 endif 14 15 # pull in the config stuff 16 lib-all-y := applets/applets.o 17 lib-y:= 18 include procps/Kbuild 19 lib-all-y += $(patsubst %,procps/%,$(sort $(lib-y))) 20 lib-y:= 21 include networking/Kbuild 22 lib-all-y += $(patsubst %,networking/%,$(sort $(lib-y))) 23 lib-y:= 24 include networking/udhcp/Kbuild 25 lib-all-y += $(patsubst %,networking/udhcp/%,$(sort $(lib-y))) 26 lib-y:= 27 include networking/libiproute/Kbuild 28 lib-all-y += $(patsubst %,networking/libiproute/%,$(sort $(lib-y))) 29 lib-y:= 30 include loginutils/Kbuild 31 lib-all-y += $(patsubst %,loginutils/%,$(sort $(lib-y))) 32 lib-y:= 33 include archival/Kbuild 34 lib-all-y += $(patsubst %,archival/%,$(sort $(lib-y))) 35 lib-y:= 36 include archival/libunarchive/Kbuild 37 lib-all-y += $(patsubst %,archival/libunarchive/%,$(sort $(lib-y))) 38 lib-y:= 39 include applets/Kbuild 40 lib-all-y += $(patsubst %,applets/%,$(sort $(lib-y))) 41 lib-y:= 42 include e2fsprogs/Kbuild 43 lib-all-y += $(patsubst %,e2fsprogs/%,$(sort $(lib-y))) 44 lib-y:= 45 #include e2fsprogs/old_e2fsprogs/Kbuild 46 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/%,$(sort $(lib-y))) 47 #lib-y:= 48 #include e2fsprogs/old_e2fsprogs/ext2fs/Kbuild 49 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/ext2fs/%,$(sort $(lib-y))) 50 #lib-y:= 51 #include e2fsprogs/old_e2fsprogs/blkid/Kbuild 52 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/blkid/%,$(sort $(lib-y))) 53 #lib-y:= 54 #include e2fsprogs/old_e2fsprogs/uuid/Kbuild 55 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/uuid/%,$(sort $(lib-y))) 56 #lib-y:= 57 #include e2fsprogs/old_e2fsprogs/e2p/Kbuild 58 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/e2p/%,$(sort $(lib-y))) 59 #lib-y:= 60 include debianutils/Kbuild 61 lib-all-y += $(patsubst %,debianutils/%,$(sort $(lib-y))) 62 lib-y:= 63 include runit/Kbuild 64 lib-all-y += $(patsubst %,runit/%,$(sort $(lib-y))) 65 lib-y:= 66 include modutils/Kbuild 67 lib-all-y += $(patsubst %,modutils/%,$(sort $(lib-y))) 68 lib-y:= 69 include miscutils/Kbuild 70 lib-all-y += $(patsubst %,miscutils/%,$(sort $(lib-y))) 71 lib-y:= 72 include coreutils/libcoreutils/Kbuild 73 lib-all-y += $(patsubst %,coreutils/libcoreutils/%,$(sort $(lib-y))) 74 lib-y:= 75 include coreutils/Kbuild 76 lib-all-y += $(patsubst %,coreutils/%,$(sort $(lib-y))) 77 lib-y:= 78 include sysklogd/Kbuild 79 lib-all-y += $(patsubst %,sysklogd/%,$(sort $(lib-y))) 80 lib-y:= 81 include shell/Kbuild 82 lib-all-y += $(patsubst %,shell/%,$(sort $(lib-y))) 83 lib-y:= 84 include console-tools/Kbuild 85 lib-all-y += $(patsubst %,console-tools/%,$(sort $(lib-y))) 86 lib-y:= 87 include findutils/Kbuild 88 lib-all-y += $(patsubst %,findutils/%,$(sort $(lib-y))) 89 lib-y:= 90 include util-linux/Kbuild 91 lib-all-y += $(patsubst %,util-linux/%,$(sort $(lib-y))) 92 lib-y:= 93 include init/Kbuild 94 lib-all-y += $(patsubst %,init/%,$(sort $(lib-y))) 95 lib-y:= 96 include libpwdgrp/Kbuild 97 lib-all-y += $(patsubst %,libpwdgrp/%,$(sort $(lib-y))) 98 lib-y:= 99 include editors/Kbuild 100 lib-all-y += $(patsubst %,editors/%,$(sort $(lib-y))) 101 lib-y:= 102 include selinux/Kbuild 103 lib-all-y += $(patsubst %,selinux/%,$(sort $(lib-y))) 104 lib-y:= 105 include scripts/Kbuild 106 lib-all-y += $(patsubst %,scripts/%,$(sort $(lib-y))) 107 lib-y:= 108 include libbb/Kbuild 109 lib-all-y += $(patsubst %,libbb/%,$(sort $(lib-y))) 110 lib-y:= 111 112 include Makefile.flags 113 ifndef BB_VER 114 BB_VER:="" 115 endif 116 117 CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q 118 119 HOSTCC = gcc 18 19 # Cross compiling and selecting different set of gcc/bin-utils 20 ifeq ($(CROSS_COMPILE),) 21 CROSS_COMPILE := $(subst ",,$(CONFIG_CROSS_COMPILER_PREFIX)) 22 endif 23 24 ifneq ($(CROSS_COMPILE),) 25 SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1) 26 else 27 SUBARCH := $(shell uname -m) 28 endif 29 SUBARCH := $(shell echo $(SUBARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ 30 -e s/arm.*/arm/ -e s/sa110/arm/ \ 31 -e s/s390x/s390/ -e s/parisc64/parisc/ \ 32 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) 33 ARCH ?= $(SUBARCH) 34 35 ifndef HOSTCC 36 HOSTCC = cc 37 endif 120 38 AS = $(CROSS_COMPILE)as 121 39 CC = $(CROSS_COMPILE)gcc … … 128 46 OBJDUMP = $(CROSS_COMPILE)objdump 129 47 48 CFLAGS := $(CFLAGS) 49 CPPFLAGS += -D"KBUILD_STR(s)=\#s" #-Q 50 51 # We need some generic definitions 52 include $(srctree)/scripts/Kbuild.include 53 54 include Makefile.flags 55 56 -include $(srctree)/arch/$(ARCH)/Makefile 57 ifdef CONFIG_FEATURE_COMPRESS_USAGE 58 usage_stuff = include/usage_compressed.h 59 endif 60 61 ifndef BB_VER 62 BB_VER:="" 63 endif 64 130 65 WHOLE_PROGRAM:=$(call cc-option,-fwhole-program,) 131 busybox: $(usage_stuff) 132 $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) --combine $(WHOLE_PROGRAM) \ 66 67 # pull in the config stuff 68 lib-all-y := applets/applets.o 69 lib-y:= 70 include procps/Kbuild 71 lib-all-y += $(patsubst %,procps/%,$(sort $(lib-y))) 72 lib-y:= 73 include networking/Kbuild 74 lib-all-y += $(patsubst %,networking/%,$(sort $(lib-y))) 75 lib-y:= 76 include networking/udhcp/Kbuild 77 lib-all-y += $(patsubst %,networking/udhcp/%,$(sort $(lib-y))) 78 lib-y:= 79 include networking/libiproute/Kbuild 80 lib-all-y += $(patsubst %,networking/libiproute/%,$(sort $(lib-y))) 81 lib-y:= 82 include loginutils/Kbuild 83 lib-all-y += $(patsubst %,loginutils/%,$(sort $(lib-y))) 84 lib-y:= 85 include archival/Kbuild 86 lib-all-y += $(patsubst %,archival/%,$(sort $(lib-y))) 87 lib-y:= 88 include archival/libarchive/Kbuild 89 lib-all-y += $(patsubst %,archival/libarchive/%,$(sort $(lib-y))) 90 lib-y:= 91 include applets/Kbuild 92 lib-all-y += $(patsubst %,applets/%,$(sort $(lib-y))) 93 lib-y:= 94 include e2fsprogs/Kbuild 95 lib-all-y += $(patsubst %,e2fsprogs/%,$(sort $(lib-y))) 96 lib-y:= 97 #include e2fsprogs/old_e2fsprogs/Kbuild 98 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/%,$(sort $(lib-y))) 99 #lib-y:= 100 #include e2fsprogs/old_e2fsprogs/ext2fs/Kbuild 101 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/ext2fs/%,$(sort $(lib-y))) 102 #lib-y:= 103 #include e2fsprogs/old_e2fsprogs/blkid/Kbuild 104 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/blkid/%,$(sort $(lib-y))) 105 #lib-y:= 106 #include e2fsprogs/old_e2fsprogs/uuid/Kbuild 107 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/uuid/%,$(sort $(lib-y))) 108 #lib-y:= 109 #include e2fsprogs/old_e2fsprogs/e2p/Kbuild 110 #lib-all-y += $(patsubst %,e2fsprogs/old_e2fsprogs/e2p/%,$(sort $(lib-y))) 111 #lib-y:= 112 include debianutils/Kbuild 113 lib-all-y += $(patsubst %,debianutils/%,$(sort $(lib-y))) 114 lib-y:= 115 include runit/Kbuild 116 lib-all-y += $(patsubst %,runit/%,$(sort $(lib-y))) 117 lib-y:= 118 include modutils/Kbuild 119 lib-all-y += $(patsubst %,modutils/%,$(sort $(lib-y))) 120 lib-y:= 121 include miscutils/Kbuild 122 lib-all-y += $(patsubst %,miscutils/%,$(sort $(lib-y))) 123 lib-y:= 124 include coreutils/libcoreutils/Kbuild 125 lib-all-y += $(patsubst %,coreutils/libcoreutils/%,$(sort $(lib-y))) 126 lib-y:= 127 include coreutils/Kbuild 128 lib-all-y += $(patsubst %,coreutils/%,$(sort $(lib-y))) 129 lib-y:= 130 include sysklogd/Kbuild 131 lib-all-y += $(patsubst %,sysklogd/%,$(sort $(lib-y))) 132 lib-y:= 133 include shell/Kbuild 134 lib-all-y += $(patsubst %,shell/%,$(sort $(lib-y))) 135 lib-y:= 136 include console-tools/Kbuild 137 lib-all-y += $(patsubst %,console-tools/%,$(sort $(lib-y))) 138 lib-y:= 139 include findutils/Kbuild 140 lib-all-y += $(patsubst %,findutils/%,$(sort $(lib-y))) 141 lib-y:= 142 include util-linux/Kbuild 143 lib-all-y += $(patsubst %,util-linux/%,$(sort $(lib-y))) 144 lib-y:= 145 include util-linux/volume_id/Kbuild 146 lib-all-y += $(patsubst %,util-linux/volume_id/%,$(sort $(lib-y))) 147 lib-y:= 148 include init/Kbuild 149 lib-all-y += $(patsubst %,init/%,$(sort $(lib-y))) 150 lib-y:= 151 include libpwdgrp/Kbuild 152 lib-all-y += $(patsubst %,libpwdgrp/%,$(sort $(lib-y))) 153 lib-y:= 154 include editors/Kbuild 155 lib-all-y += $(patsubst %,editors/%,$(sort $(lib-y))) 156 lib-y:= 157 include printutils/Kbuild 158 lib-all-y += $(patsubst %,printutils/%,$(sort $(lib-y))) 159 lib-y:= 160 include selinux/Kbuild 161 lib-all-y += $(patsubst %,selinux/%,$(sort $(lib-y))) 162 lib-y:= 163 include scripts/Kbuild 164 lib-all-y += $(patsubst %,scripts/%,$(sort $(lib-y))) 165 lib-y:= 166 include libbb/Kbuild 167 lib-all-y += $(patsubst %,libbb/%,$(sort $(lib-y))) 168 lib-y:= 169 170 comma:=, 171 busybox_unstripped.o: $(usage_stuff) include/applet_tables.h include/autoconf.h 172 $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) \ 173 $(patsubst %,-Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS)) \ 174 -DGCC_COMBINE=1 \ 175 --combine $(WHOLE_PROGRAM) \ 133 176 -funit-at-a-time -Wno-error -std=gnu99 \ 134 -o $(@)_unstripped $(lib-all-y:.o=.c) \ 135 -Wl,--start-group -lcrypt -lm -Wl,--end-group 177 -c -o busybox_unstripped.o \ 178 $(lib-all-y:.o=.c) 179 180 busybox: busybox_unstripped.o 181 $(srctree)/scripts/trylink \ 182 busybox_unstripped \ 183 "$(CC) $(CFLAGS_busybox)" \ 184 "$(CFLAGS)" \ 185 "$(LDFLAGS)" \ 186 "busybox_unstripped.o" \ 187 "" \ 188 "crypt m" 136 189 cp -f $(@)_unstripped $@ 137 190 -$(STRIP) -s -R .note -R .comment -R .version $@ 138 191 139 applets/usage: 140 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/usage applets/usage.c 141 include/usage_compressed.h: $(srctree)/include/usage.h applets/usage 192 # If .config is newer than include/autoconf.h, someone tinkered 193 # with it and forgot to run make oldconfig. 194 include/autoconf.h: .config 195 $(MAKE) -f $(srctree)/Makefile silentoldconfig 196 197 applets/usage: include/autoconf.h 198 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/usage applets/usage.c 199 200 applets/applet_tables: include/autoconf.h 201 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c 202 203 include/usage_compressed.h: include/usage.h applets/usage 142 204 $(srctree)/applets/usage_compressed include/usage_compressed.h applets 143 205 206 include/applet_tables.h: include/applets.h 207 applets/applet_tables include/applet_tables.h
Note:
See TracChangeset
for help on using the changeset viewer.