source: drbl_ui/backup/test_busybox/busybox-1.7.2/scripts/Makefile.IMA @ 175

Last change on this file since 175 was 20, checked in by chris, 17 years ago
File size: 4.4 KB
Line 
1# This is completely unsupported.
2# Fix COMBINED_COMPILE upstream (in the Kbuild) and propagate
3# the changes back
4srctree   := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
5objtree   := $(CURDIR)
6src   := $(srctree)
7obj   := $(objtree)
8
9default: busybox
10include .config
11ifdef CONFIG_FEATURE_COMPRESS_USAGE
12usage_stuff = include/usage_compressed.h
13endif
14
15# pull in the config stuff
16lib-all-y := applets/applets.o
17lib-y:=
18include procps/Kbuild
19lib-all-y += $(patsubst %,procps/%,$(sort $(lib-y)))
20lib-y:=
21include networking/Kbuild
22lib-all-y += $(patsubst %,networking/%,$(sort $(lib-y)))
23lib-y:=
24include networking/udhcp/Kbuild
25lib-all-y += $(patsubst %,networking/udhcp/%,$(sort $(lib-y)))
26lib-y:=
27include networking/libiproute/Kbuild
28lib-all-y += $(patsubst %,networking/libiproute/%,$(sort $(lib-y)))
29lib-y:=
30include loginutils/Kbuild
31lib-all-y += $(patsubst %,loginutils/%,$(sort $(lib-y)))
32lib-y:=
33include archival/Kbuild
34lib-all-y += $(patsubst %,archival/%,$(sort $(lib-y)))
35lib-y:=
36include archival/libunarchive/Kbuild
37lib-all-y += $(patsubst %,archival/libunarchive/%,$(sort $(lib-y)))
38lib-y:=
39include applets/Kbuild
40lib-all-y += $(patsubst %,applets/%,$(sort $(lib-y)))
41lib-y:=
42include e2fsprogs/Kbuild
43lib-all-y += $(patsubst %,e2fsprogs/%,$(sort $(lib-y)))
44lib-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:=
60include debianutils/Kbuild
61lib-all-y += $(patsubst %,debianutils/%,$(sort $(lib-y)))
62lib-y:=
63include runit/Kbuild
64lib-all-y += $(patsubst %,runit/%,$(sort $(lib-y)))
65lib-y:=
66include modutils/Kbuild
67lib-all-y += $(patsubst %,modutils/%,$(sort $(lib-y)))
68lib-y:=
69include miscutils/Kbuild
70lib-all-y += $(patsubst %,miscutils/%,$(sort $(lib-y)))
71lib-y:=
72include coreutils/libcoreutils/Kbuild
73lib-all-y += $(patsubst %,coreutils/libcoreutils/%,$(sort $(lib-y)))
74lib-y:=
75include coreutils/Kbuild
76lib-all-y += $(patsubst %,coreutils/%,$(sort $(lib-y)))
77lib-y:=
78include sysklogd/Kbuild
79lib-all-y += $(patsubst %,sysklogd/%,$(sort $(lib-y)))
80lib-y:=
81include shell/Kbuild
82lib-all-y += $(patsubst %,shell/%,$(sort $(lib-y)))
83lib-y:=
84include console-tools/Kbuild
85lib-all-y += $(patsubst %,console-tools/%,$(sort $(lib-y)))
86lib-y:=
87include findutils/Kbuild
88lib-all-y += $(patsubst %,findutils/%,$(sort $(lib-y)))
89lib-y:=
90include util-linux/Kbuild
91lib-all-y += $(patsubst %,util-linux/%,$(sort $(lib-y)))
92lib-y:=
93include init/Kbuild
94lib-all-y += $(patsubst %,init/%,$(sort $(lib-y)))
95lib-y:=
96include libpwdgrp/Kbuild
97lib-all-y += $(patsubst %,libpwdgrp/%,$(sort $(lib-y)))
98lib-y:=
99include editors/Kbuild
100lib-all-y += $(patsubst %,editors/%,$(sort $(lib-y)))
101lib-y:=
102include selinux/Kbuild
103lib-all-y += $(patsubst %,selinux/%,$(sort $(lib-y)))
104lib-y:=
105include scripts/Kbuild
106lib-all-y += $(patsubst %,scripts/%,$(sort $(lib-y)))
107lib-y:=
108include libbb/Kbuild
109lib-all-y += $(patsubst %,libbb/%,$(sort $(lib-y)))
110lib-y:=
111
112include Makefile.flags
113ifndef BB_VER
114BB_VER:=""
115endif
116
117CPPFLAGS+= -D"KBUILD_STR(s)=\#s" #-Q
118
119HOSTCC = gcc
120AS              = $(CROSS_COMPILE)as
121CC              = $(CROSS_COMPILE)gcc
122LD              = $(CC) -nostdlib
123CPP             = $(CC) -E
124AR              = $(CROSS_COMPILE)ar
125NM              = $(CROSS_COMPILE)nm
126STRIP           = $(CROSS_COMPILE)strip
127OBJCOPY         = $(CROSS_COMPILE)objcopy
128OBJDUMP         = $(CROSS_COMPILE)objdump
129
130WHOLE_PROGRAM:=$(call cc-option,-fwhole-program,)
131busybox: $(usage_stuff)
132  $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) --combine $(WHOLE_PROGRAM) \
133    -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
136  cp -f $(@)_unstripped $@
137  -$(STRIP) -s -R .note -R .comment -R .version $@
138
139applets/usage:
140  $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer      -I$(srctree)/include -o applets/usage applets/usage.c
141include/usage_compressed.h: $(srctree)/include/usage.h applets/usage
142  $(srctree)/applets/usage_compressed include/usage_compressed.h applets
143
Note: See TracBrowser for help on using the repository browser.