diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-10-08 07:46:08 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-10-08 07:46:08 +0000 |
commit | f6d0a8e7cb47688ed3786894219b373e87ac8a49 (patch) | |
tree | e81ce57a92acc0653374e1d262039562855d16ec | |
parent | 5ba0134aa31b2cd9a11772fcd9e39d722347467e (diff) | |
download | busybox-w32-f6d0a8e7cb47688ed3786894219b373e87ac8a49.tar.gz busybox-w32-f6d0a8e7cb47688ed3786894219b373e87ac8a49.tar.bz2 busybox-w32-f6d0a8e7cb47688ed3786894219b373e87ac8a49.zip |
egor duda writes:
Hi!
I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.
That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.
I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.
'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.
One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.
egor
git-svn-id: svn://busybox.net/trunk/busybox@9320 69ca8d6d-28ef-0310-b511-8ec308f3f277
66 files changed, 459 insertions, 241 deletions
@@ -22,37 +22,112 @@ | |||
22 | #-------------------------------------------------------------- | 22 | #-------------------------------------------------------------- |
23 | noconfig_targets := menuconfig config oldconfig randconfig \ | 23 | noconfig_targets := menuconfig config oldconfig randconfig \ |
24 | defconfig allyesconfig allnoconfig clean distclean \ | 24 | defconfig allyesconfig allnoconfig clean distclean \ |
25 | release tags | 25 | release tags |
26 | TOPDIR=./ | 26 | |
27 | include Rules.mak | 27 | ifndef TOPDIR |
28 | TOPDIR=$(CURDIR)/ | ||
29 | endif | ||
30 | ifndef top_srcdir | ||
31 | top_srcdir=$(CURDIR) | ||
32 | endif | ||
33 | ifndef top_builddir | ||
34 | top_builddir=$(CURDIR) | ||
35 | endif | ||
36 | |||
37 | srctree=$(top_srcdir) | ||
38 | vpath %/Config.in $(srctree) | ||
39 | |||
40 | include $(top_builddir)/Rules.mak | ||
28 | 41 | ||
29 | DIRS:=applets archival archival/libunarchive coreutils console-tools \ | 42 | DIRS:=applets archival archival/libunarchive coreutils console-tools \ |
30 | debianutils editors findutils init miscutils modutils networking \ | 43 | debianutils editors findutils init miscutils modutils networking \ |
31 | networking/libiproute networking/udhcp procps loginutils shell \ | 44 | networking/libiproute networking/udhcp procps loginutils shell \ |
32 | sysklogd util-linux libpwdgrp coreutils/libcoreutils libbb | 45 | sysklogd util-linux libpwdgrp coreutils/libcoreutils libbb |
33 | 46 | ||
47 | SRC_DIRS:=$(patsubst %,$(top_srcdir)/%,$(DIRS)) | ||
48 | |||
34 | ifeq ($(strip $(CONFIG_SELINUX)),y) | 49 | ifeq ($(strip $(CONFIG_SELINUX)),y) |
35 | CFLAGS += -I/usr/include/selinux | 50 | CFLAGS += -I/usr/include/selinux |
36 | LIBRARIES += -lsecure | 51 | LIBRARIES += -lsecure |
37 | endif | 52 | endif |
38 | 53 | ||
39 | CONFIG_CONFIG_IN = sysdeps/$(TARGET_OS)/Config.in | 54 | CONFIG_CONFIG_IN = $(top_srcdir)/sysdeps/$(TARGET_OS)/Config.in |
40 | CONFIG_DEFCONFIG = sysdeps/$(TARGET_OS)/defconfig | 55 | CONFIG_DEFCONFIG = $(top_srcdir)/sysdeps/$(TARGET_OS)/defconfig |
56 | |||
57 | ALL_DIRS:= $(DIRS) scripts/config | ||
58 | ALL_MAKEFILES:=$(patsubst %,%/Makefile,$(ALL_DIRS)) | ||
59 | |||
60 | ifeq ($(KBUILD_SRC),) | ||
61 | |||
62 | ifdef O | ||
63 | ifeq ("$(origin O)", "command line") | ||
64 | KBUILD_OUTPUT := $(O) | ||
65 | endif | ||
66 | endif | ||
67 | |||
68 | # That's our default target when none is given on the command line | ||
69 | .PHONY: _all | ||
70 | _all: | ||
71 | |||
72 | ifneq ($(KBUILD_OUTPUT),) | ||
73 | # Invoke a second make in the output directory, passing relevant variables | ||
74 | # check that the output directory actually exists | ||
75 | saved-output := $(KBUILD_OUTPUT) | ||
76 | KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) | ||
77 | $(if $(wildcard $(KBUILD_OUTPUT)),, \ | ||
78 | $(error output directory "$(saved-output)" does not exist)) | ||
79 | |||
80 | .PHONY: $(MAKECMDGOALS) | ||
81 | |||
82 | $(filter-out _all,$(MAKECMDGOALS)) _all: $(KBUILD_OUTPUT)/Rules.mak $(KBUILD_OUTPUT)/Makefile | ||
83 | $(MAKE) -C $(KBUILD_OUTPUT) \ | ||
84 | top_srcdir=$(CURDIR) \ | ||
85 | top_builddir=$(KBUILD_OUTPUT) \ | ||
86 | TOPDIR=$(KBUILD_OUTPUT) \ | ||
87 | KBUILD_SRC=$(CURDIR) \ | ||
88 | -f $(CURDIR)/Makefile $@ | ||
89 | |||
90 | $(KBUILD_OUTPUT)/Rules.mak: | ||
91 | @echo > $@ | ||
92 | @echo top_srcdir=$(CURDIR) >> $@ | ||
93 | @echo top_builddir=$(KBUILD_OUTPUT) >> $@ | ||
94 | @echo include $(top_srcdir)/Rules.mak >> $@ | ||
95 | |||
96 | $(KBUILD_OUTPUT)/Makefile: | ||
97 | @echo > $@ | ||
98 | @echo top_srcdir=$(CURDIR) >> $@ | ||
99 | @echo top_builddir=$(KBUILD_OUTPUT) >> $@ | ||
100 | @echo KBUILD_SRC='$$(top_srcdir)' >> $@ | ||
101 | @echo include '$$(KBUILD_SRC)'/Makefile >> $@ | ||
102 | |||
103 | # Leave processing to above invocation of make | ||
104 | skip-makefile := 1 | ||
105 | endif # ifneq ($(KBUILD_OUTPUT),) | ||
106 | endif # ifeq ($(KBUILD_SRC),) | ||
107 | |||
108 | ifeq ($(skip-makefile),) | ||
109 | |||
110 | _all: all | ||
41 | 111 | ||
42 | ifeq ($(strip $(HAVE_DOT_CONFIG)),y) | 112 | ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
43 | 113 | ||
44 | all: busybox busybox.links doc | 114 | all: busybox busybox.links doc |
45 | 115 | ||
116 | all_tree: $(ALL_MAKEFILES) | ||
117 | |||
118 | $(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile | ||
119 | d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@ | ||
120 | |||
46 | # In this section, we need .config | 121 | # In this section, we need .config |
47 | -include .config.cmd | 122 | -include $(top_builddir)/.config.cmd |
48 | include $(patsubst %,%/Makefile.in, $(DIRS)) | 123 | include $(patsubst %,%/Makefile.in, $(SRC_DIRS)) |
49 | -include $(TOPDIR).depend | 124 | -include $(top_builddir)/.depend |
50 | 125 | ||
51 | busybox: .depend include/config.h $(libraries-y) | 126 | busybox: $(ALL_MAKEFILES) .depend include/config.h $(libraries-y) |
52 | $(CC) $(LDFLAGS) -o $@ -Wl,--start-group $(libraries-y) $(LIBRARIES) -Wl,--end-group | 127 | $(CC) $(LDFLAGS) -o $@ -Wl,--start-group $(libraries-y) $(LIBRARIES) -Wl,--end-group |
53 | $(STRIPCMD) $@ | 128 | $(STRIPCMD) $@ |
54 | 129 | ||
55 | busybox.links: applets/busybox.mkll include/config.h | 130 | busybox.links: $(top_srcdir)/applets/busybox.mkll include/config.h $(top_srcdir)/include/applets.h |
56 | - $(SHELL) $^ >$@ | 131 | - $(SHELL) $^ >$@ |
57 | 132 | ||
58 | install: applets/install.sh busybox busybox.links | 133 | install: applets/install.sh busybox busybox.links |
@@ -75,14 +150,18 @@ uninstall: busybox.links | |||
75 | install-hardlinks: applets/install.sh busybox busybox.links | 150 | install-hardlinks: applets/install.sh busybox busybox.links |
76 | $(SHELL) $< $(PREFIX) --hardlinks | 151 | $(SHELL) $< $(PREFIX) --hardlinks |
77 | 152 | ||
153 | check: busybox | ||
154 | bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \ | ||
155 | $(top_srcdir)/testsuite/runtest | ||
78 | 156 | ||
79 | # Documentation Targets | 157 | # Documentation Targets |
80 | doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html | 158 | doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html |
81 | 159 | ||
82 | docs/busybox.pod : docs/busybox_header.pod include/usage.h docs/busybox_footer.pod | 160 | docs/busybox.pod : $(top_srcdir)/docs/busybox_header.pod $(top_srcdir)/include/usage.h $(top_srcdir)/docs/busybox_footer.pod |
83 | - ( cat docs/busybox_header.pod; \ | 161 | -mkdir -p docs |
84 | docs/autodocifier.pl include/usage.h; \ | 162 | - ( cat $(top_srcdir)/docs/busybox_header.pod; \ |
85 | cat docs/busybox_footer.pod ) > docs/busybox.pod | 163 | $(top_srcdir)/docs/autodocifier.pl $(top_srcdir)/include/usage.h; \ |
164 | cat $(top_srcdir)/docs/busybox_footer.pod ) > docs/busybox.pod | ||
86 | 165 | ||
87 | docs/BusyBox.txt: docs/busybox.pod | 166 | docs/BusyBox.txt: docs/busybox.pod |
88 | @echo | 167 | @echo |
@@ -99,7 +178,7 @@ docs/BusyBox.1: docs/busybox.pod | |||
99 | docs/BusyBox.html: docs/busybox.net/BusyBox.html | 178 | docs/BusyBox.html: docs/busybox.net/BusyBox.html |
100 | - mkdir -p docs | 179 | - mkdir -p docs |
101 | -@ rm -f docs/BusyBox.html | 180 | -@ rm -f docs/BusyBox.html |
102 | -@ ln -s busybox.net/BusyBox.html docs/BusyBox.html | 181 | -@ cp docs/busybox.net/BusyBox.html docs/BusyBox.html |
103 | 182 | ||
104 | docs/busybox.net/BusyBox.html: docs/busybox.pod | 183 | docs/busybox.net/BusyBox.html: docs/busybox.pod |
105 | -@ mkdir -p docs/busybox.net | 184 | -@ mkdir -p docs/busybox.net |
@@ -108,20 +187,19 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod | |||
108 | -@ rm -f pod2htm* | 187 | -@ rm -f pod2htm* |
109 | 188 | ||
110 | # The nifty new buildsystem stuff | 189 | # The nifty new buildsystem stuff |
111 | scripts/mkdep: scripts/mkdep.c | 190 | scripts/mkdep: $(top_srcdir)/scripts/mkdep.c |
112 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c | 191 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< |
113 | 192 | ||
114 | scripts/split-include: scripts/split-include.c | 193 | scripts/split-include: $(top_srcdir)/scripts/split-include.c |
115 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c | 194 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< |
116 | 195 | ||
117 | .depend: scripts/mkdep | 196 | .depend: scripts/mkdep |
118 | rm -f .depend .hdepend; | 197 | rm -f .depend .hdepend; |
119 | mkdir -p include/config; | 198 | mkdir -p include/config; |
120 | $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c | ||
121 | scripts/mkdep -I include -- \ | 199 | scripts/mkdep -I include -- \ |
122 | `find -name \*.c -print | sed -e "s,^./,,"` >> .depend; | 200 | `find $(top_srcdir) -name \*.c -print | sed -e "s,^./,,"` >> .depend; |
123 | scripts/mkdep -I include -- \ | 201 | scripts/mkdep -I include -- \ |
124 | `find -name \*.h -print | sed -e "s,^./,,"` >> .hdepend; | 202 | `find $(top_srcdir) -name \*.h -print | sed -e "s,^./,,"` >> .hdepend; |
125 | 203 | ||
126 | depend dep: include/config.h .depend | 204 | depend dep: include/config.h .depend |
127 | 205 | ||
@@ -130,13 +208,10 @@ include/config/MARKER: depend scripts/split-include | |||
130 | @ touch include/config/MARKER | 208 | @ touch include/config/MARKER |
131 | 209 | ||
132 | include/config.h: .config | 210 | include/config.h: .config |
133 | @if [ ! -x ./scripts/config/conf ] ; then \ | 211 | @if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \ |
134 | $(MAKE) -C scripts/config conf; \ | 212 | $(MAKE) -C scripts/config conf; \ |
135 | fi; | 213 | fi; |
136 | @./scripts/config/conf -o $(CONFIG_CONFIG_IN) | 214 | @$(top_builddir)/scripts/config/conf -o $(CONFIG_CONFIG_IN) |
137 | |||
138 | %.o: %.c | ||
139 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
140 | 215 | ||
141 | finished2: | 216 | finished2: |
142 | @echo | 217 | @echo |
@@ -150,12 +225,16 @@ all: menuconfig | |||
150 | # configuration | 225 | # configuration |
151 | # --------------------------------------------------------------------------- | 226 | # --------------------------------------------------------------------------- |
152 | 227 | ||
153 | scripts/config/conf: | 228 | $(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile |
229 | d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@ | ||
230 | |||
231 | scripts/config/conf: scripts/config/Makefile Rules.mak | ||
154 | $(MAKE) -C scripts/config conf | 232 | $(MAKE) -C scripts/config conf |
155 | -@if [ ! -f .config ] ; then \ | 233 | -@if [ ! -f .config ] ; then \ |
156 | cp $(CONFIG_DEFCONFIG) .config; \ | 234 | cp $(CONFIG_DEFCONFIG) .config; \ |
157 | fi | 235 | fi |
158 | scripts/config/mconf: | 236 | |
237 | scripts/config/mconf: scripts/config/Makefile Rules.mak | ||
159 | $(MAKE) -C scripts/config ncurses conf mconf | 238 | $(MAKE) -C scripts/config ncurses conf mconf |
160 | -@if [ ! -f .config ] ; then \ | 239 | -@if [ ! -f .config ] ; then \ |
161 | cp $(CONFIG_DEFCONFIG) .config; \ | 240 | cp $(CONFIG_DEFCONFIG) .config; \ |
@@ -187,9 +266,6 @@ allnoconfig: scripts/config/conf | |||
187 | defconfig: scripts/config/conf | 266 | defconfig: scripts/config/conf |
188 | @./scripts/config/conf -d $(CONFIG_CONFIG_IN) | 267 | @./scripts/config/conf -d $(CONFIG_CONFIG_IN) |
189 | 268 | ||
190 | check: busybox | ||
191 | cd testsuite && ./runtest | ||
192 | |||
193 | clean: | 269 | clean: |
194 | - rm -f docs/busybox.dvi docs/busybox.ps \ | 270 | - rm -f docs/busybox.dvi docs/busybox.ps \ |
195 | docs/busybox.pod docs/busybox.net/busybox.html \ | 271 | docs/busybox.pod docs/busybox.net/busybox.html \ |
@@ -232,7 +308,8 @@ tags: | |||
232 | 308 | ||
233 | endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) | 309 | endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
234 | 310 | ||
235 | .PHONY: dummy subdirs release distclean clean config oldconfig \ | 311 | endif # ifeq ($(skip-makefile),) |
236 | menuconfig tags check test depend | ||
237 | 312 | ||
313 | .PHONY: dummy subdirs release distclean clean config oldconfig \ | ||
314 | menuconfig tags check test depend buildtree | ||
238 | 315 | ||
@@ -42,7 +42,7 @@ LD = $(CROSS)ld | |||
42 | NM = $(CROSS)nm | 42 | NM = $(CROSS)nm |
43 | STRIP = $(CROSS)strip | 43 | STRIP = $(CROSS)strip |
44 | CPP = $(CC) -E | 44 | CPP = $(CC) -E |
45 | MAKEFILES = $(TOPDIR).config | 45 | # MAKEFILES = $(top_builddir)/.config |
46 | 46 | ||
47 | # What OS are you compiling busybox for? This allows you to include | 47 | # What OS are you compiling busybox for? This allows you to include |
48 | # OS specific things, syscall overrides, etc. | 48 | # OS specific things, syscall overrides, etc. |
@@ -80,7 +80,7 @@ BB_SRC_DIR= | |||
80 | #GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp") | 80 | #GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp") |
81 | 81 | ||
82 | WARNINGS=-Wall -Wstrict-prototypes -Wshadow | 82 | WARNINGS=-Wall -Wstrict-prototypes -Wshadow |
83 | CFLAGS=-I$(TOPDIR)include | 83 | CFLAGS=-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) |
84 | ARFLAGS=-r | 84 | ARFLAGS=-r |
85 | 85 | ||
86 | #-------------------------------------------------------- | 86 | #-------------------------------------------------------- |
@@ -102,7 +102,7 @@ endif | |||
102 | 102 | ||
103 | # Pull in the user's busybox configuration | 103 | # Pull in the user's busybox configuration |
104 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) | 104 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
105 | -include $(TOPDIR).config | 105 | -include $(top_builddir)/.config |
106 | endif | 106 | endif |
107 | 107 | ||
108 | # A nifty macro to make testing gcc features easier | 108 | # A nifty macro to make testing gcc features easier |
@@ -189,12 +189,8 @@ endif | |||
189 | # have a chance of winning. | 189 | # have a chance of winning. |
190 | CFLAGS += $(CFLAGS_EXTRA) | 190 | CFLAGS += $(CFLAGS_EXTRA) |
191 | 191 | ||
192 | %.o: %.c | ||
193 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
194 | |||
195 | .PHONY: dummy | 192 | .PHONY: dummy |
196 | 193 | ||
197 | 194 | ||
198 | |||
199 | .EXPORT_ALL_VARIABLES: | 195 | .EXPORT_ALL_VARIABLES: |
200 | 196 | ||
diff --git a/applets/Makefile b/applets/Makefile index 5f9167442..b566e4d12 100644 --- a/applets/Makefile +++ b/applets/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/applets | ||
21 | APPLETS_DIR:=./ | 23 | APPLETS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir).depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/applets/Makefile.in b/applets/Makefile.in index afd5cbeb9..e31bb6fd9 100644 --- a/applets/Makefile.in +++ b/applets/Makefile.in | |||
@@ -19,18 +19,19 @@ | |||
19 | 19 | ||
20 | APPLETS_AR:=applets.a | 20 | APPLETS_AR:=applets.a |
21 | ifndef $(APPLETS_DIR) | 21 | ifndef $(APPLETS_DIR) |
22 | APPLETS_DIR:=$(TOPDIR)applets/ | 22 | APPLETS_DIR:=$(top_builddir)/applets/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/applets | ||
24 | 25 | ||
25 | APPLET_SRC:=applets.c busybox.c | 26 | APPLET_SRC:=applets.c busybox.c |
26 | APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) | 27 | APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC)) |
27 | 28 | ||
28 | |||
29 | |||
30 | libraries-y+=$(APPLETS_DIR)$(APPLETS_AR) | 29 | libraries-y+=$(APPLETS_DIR)$(APPLETS_AR) |
31 | 30 | ||
32 | $(APPLET_OBJ): $(TOPDIR).config | ||
33 | |||
34 | $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ) | 31 | $(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ) |
35 | $(AR) -ro $@ $(APPLET_OBJ) | 32 | $(AR) -ro $@ $(APPLET_OBJ) |
36 | 33 | ||
34 | $(APPLET_OBJ): $(top_builddir)/.config | ||
35 | $(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c | ||
36 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
37 | |||
diff --git a/archival/Makefile b/archival/Makefile index 1cbe7ee00..a96daa4df 100644 --- a/archival/Makefile +++ b/archival/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
21 | ARCHIVAL_DIR:=./ | 22 | ARCHIVAL_DIR:=./ |
22 | include $(TOPDIR).config | 23 | srcdir=$(top_srcdir)/archival |
23 | include $(TOPDIR)Rules.mak | 24 | include $(top_builddir)/Rules.mak |
24 | include Makefile.in | 25 | include $(top_builddir)/.config |
26 | include $(srcdir)/Makefile.in | ||
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/archival/Makefile.in b/archival/Makefile.in index 1673662f9..76ab6cd08 100644 --- a/archival/Makefile.in +++ b/archival/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | ARCHIVAL_AR:=archival.a | 20 | ARCHIVAL_AR:=archival.a |
21 | ifndef $(ARCHIVAL_DIR) | 21 | ifndef $(ARCHIVAL_DIR) |
22 | ARCHIVAL_DIR:=$(TOPDIR)archival/ | 22 | ARCHIVAL_DIR:=$(top_builddir)/archival/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/archival | ||
24 | 25 | ||
25 | ARCHIVAL-y:= | 26 | ARCHIVAL-y:= |
26 | ARCHIVAL-$(CONFIG_APT_GET) += | 27 | ARCHIVAL-$(CONFIG_APT_GET) += |
@@ -42,3 +43,6 @@ libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR) | |||
42 | $(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) | 43 | $(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) |
43 | $(AR) -ro $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) | 44 | $(AR) -ro $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) |
44 | 45 | ||
46 | $(ARCHIVAL_DIR)%.o: $(srcdir)/%.c | ||
47 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
48 | |||
diff --git a/archival/libunarchive/Makefile b/archival/libunarchive/Makefile index 9a20ea28b..e985fa49f 100644 --- a/archival/libunarchive/Makefile +++ b/archival/libunarchive/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../../ | 20 | top_srcdir=../.. |
21 | top_builddir=../.. | ||
22 | srcdir=$(top_srcdir)/archival/libunarchive | ||
21 | LIBUNARCHIVE_DIR:=./ | 23 | LIBUNARCHIVE_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/archival/libunarchive/Makefile.in b/archival/libunarchive/Makefile.in index 5cf5efa33..809b0e10e 100644 --- a/archival/libunarchive/Makefile.in +++ b/archival/libunarchive/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | LIBUNARCHIVE_AR:=libunarchive.a | 20 | LIBUNARCHIVE_AR:=libunarchive.a |
21 | ifndef $(LIBUNARCHIVE_DIR) | 21 | ifndef $(LIBUNARCHIVE_DIR) |
22 | LIBUNARCHIVE_DIR:=$(TOPDIR)archival/libunarchive/ | 22 | LIBUNARCHIVE_DIR:=$(top_builddir)/archival/libunarchive/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/archvial/libunarchive | ||
24 | 25 | ||
25 | LIBUNARCHIVE-y:= \ | 26 | LIBUNARCHIVE-y:= \ |
26 | \ | 27 | \ |
@@ -78,3 +79,6 @@ libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR) | |||
78 | $(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) | 79 | $(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) |
79 | $(AR) -ro $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) | 80 | $(AR) -ro $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) |
80 | 81 | ||
82 | $(LIBUNARCHIVA_DIR)%.o: $(srcdir)/%.c | ||
83 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
84 | |||
diff --git a/console-tools/Makefile b/console-tools/Makefile index 2ee51a5e6..42cf2c8c3 100644 --- a/console-tools/Makefile +++ b/console-tools/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/console/tools | ||
21 | CONSOLETOOLS_DIR:=./ | 23 | CONSOLETOOLS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/console-tools/Makefile.in b/console-tools/Makefile.in index 1d756c721..b19ce5cb2 100644 --- a/console-tools/Makefile.in +++ b/console-tools/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | CONSOLETOOLS_AR:=console-tools.a | 20 | CONSOLETOOLS_AR:=console-tools.a |
21 | ifndef $(CONSOLETOOLS_DIR) | 21 | ifndef $(CONSOLETOOLS_DIR) |
22 | CONSOLETOOLS_DIR:=$(TOPDIR)console-tools/ | 22 | CONSOLETOOLS_DIR:=$(top_builddir)/console-tools/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/console-tools | ||
24 | 25 | ||
25 | CONSOLETOOLS_DIR-y:= | 26 | CONSOLETOOLS_DIR-y:= |
26 | CONSOLETOOLS_DIR-$(CONFIG_CHVT) += chvt.o | 27 | CONSOLETOOLS_DIR-$(CONFIG_CHVT) += chvt.o |
@@ -38,3 +39,6 @@ libraries-y+=$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR) | |||
38 | $(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y)) | 39 | $(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y)) |
39 | $(AR) -ro $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y)) | 40 | $(AR) -ro $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y)) |
40 | 41 | ||
42 | $(CONSOLETOOLS_DIR)%.o: $(srcdir)/%.c | ||
43 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
44 | |||
diff --git a/coreutils/Makefile b/coreutils/Makefile index b42689a26..50fdac236 100644 --- a/coreutils/Makefile +++ b/coreutils/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/coreutils | ||
21 | SHELLUTILS_DIR:=./ | 23 | SHELLUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/coreutils/Makefile.in b/coreutils/Makefile.in index a5343c9c7..aacb813b3 100644 --- a/coreutils/Makefile.in +++ b/coreutils/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | COREUTILS_AR:=coreutils.a | 20 | COREUTILS_AR:=coreutils.a |
21 | ifndef $(COREUTILS_DIR) | 21 | ifndef $(COREUTILS_DIR) |
22 | COREUTILS_DIR:=$(TOPDIR)coreutils/ | 22 | COREUTILS_DIR:=$(top_builddir)/coreutils/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/coreutils | ||
24 | 25 | ||
25 | COREUTILS-y:= | 26 | COREUTILS-y:= |
26 | COREUTILS-$(CONFIG_BASENAME) += basename.o | 27 | COREUTILS-$(CONFIG_BASENAME) += basename.o |
@@ -91,3 +92,7 @@ libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR) | |||
91 | 92 | ||
92 | $(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y)) | 93 | $(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y)) |
93 | $(AR) -ro $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y)) | 94 | $(AR) -ro $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y)) |
95 | |||
96 | $(COREUTILS_DIR)%.o: $(srcdir)/%.c | ||
97 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
98 | |||
diff --git a/coreutils/libcoreutils/Makefile b/coreutils/libcoreutils/Makefile index 11867c602..0a1c80a41 100644 --- a/coreutils/libcoreutils/Makefile +++ b/coreutils/libcoreutils/Makefile | |||
@@ -17,13 +17,16 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../../ | 20 | top_srcdir=../.. |
21 | top_builddir=../.. | ||
22 | srcdir=$(top_srcdir)/coreutils/libcoreutils | ||
21 | LIBCOREUTILS_DIR:=./ | 23 | LIBCOREUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
27 | |||
25 | all: $(libraries-y) | 28 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 29 | -include $(top_builddir)/.depend |
27 | 30 | ||
28 | clean: | 31 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 32 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/coreutils/libcoreutils/Makefile.in b/coreutils/libcoreutils/Makefile.in index d0e8b3a05..cf83d7107 100644 --- a/coreutils/libcoreutils/Makefile.in +++ b/coreutils/libcoreutils/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | LIBCOREUTILS_AR:=libcoreutils.a | 20 | LIBCOREUTILS_AR:=libcoreutils.a |
21 | ifndef $(LIBCOREUTILS_DIR) | 21 | ifndef $(LIBCOREUTILS_DIR) |
22 | LIBCOREUTILS_DIR:=$(TOPDIR)coreutils/libcoreutils/ | 22 | LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/coreutils/libcoreutils | ||
24 | 25 | ||
25 | LIBCOREUTILS_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c xgetoptfile_sort_uniq.c | 26 | LIBCOREUTILS_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c xgetoptfile_sort_uniq.c |
26 | 27 | ||
@@ -30,3 +31,7 @@ libraries-y+=$(LIBCOREUTILS_DIR)$(LIBCOREUTILS_AR) | |||
30 | 31 | ||
31 | $(LIBCOREUTILS_DIR)$(LIBCOREUTILS_AR): $(LIBCOREUTILS_OBJS) | 32 | $(LIBCOREUTILS_DIR)$(LIBCOREUTILS_AR): $(LIBCOREUTILS_OBJS) |
32 | $(AR) -ro $@ $(LIBCOREUTILS_OBJS) | 33 | $(AR) -ro $@ $(LIBCOREUTILS_OBJS) |
34 | |||
35 | $(LIBCOREUTILS_DIR)%.o: $(srcdir)/%.c | ||
36 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
37 | |||
diff --git a/debianutils/Makefile b/debianutils/Makefile index 0282b83c4..10ec1cc58 100644 --- a/debianutils/Makefile +++ b/debianutils/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/debianutils | ||
21 | DEBIANUTILS_DIR:=./ | 23 | DEBIANUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/debianutils/Makefile.in b/debianutils/Makefile.in index dabef27ef..3a204033e 100644 --- a/debianutils/Makefile.in +++ b/debianutils/Makefile.in | |||
@@ -19,9 +19,9 @@ | |||
19 | 19 | ||
20 | DEBIANUTILS_AR:=debianutils.a | 20 | DEBIANUTILS_AR:=debianutils.a |
21 | ifndef $(DEBIANUTILS_DIR) | 21 | ifndef $(DEBIANUTILS_DIR) |
22 | DEBIANUTILS_DIR:=$(TOPDIR)debianutils/ | 22 | DEBIANUTILS_DIR:=$(top_builddir)/debianutils/ |
23 | endif | 23 | endif |
24 | 24 | srcdir=$(top_srcdir)/debianutils | |
25 | 25 | ||
26 | DEBIANUTILS-y:= | 26 | DEBIANUTILS-y:= |
27 | DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o | 27 | DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o |
@@ -36,3 +36,6 @@ libraries-y+=$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR) | |||
36 | $(DEBIANUTILS_DIR)$(DEBIANUTILS_AR): $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y)) | 36 | $(DEBIANUTILS_DIR)$(DEBIANUTILS_AR): $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y)) |
37 | $(AR) -ro $@ $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y)) | 37 | $(AR) -ro $@ $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y)) |
38 | 38 | ||
39 | $(DEBIANUTILS_DIR)%.o: $(srcdir)/%.c | ||
40 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
41 | |||
diff --git a/editors/Makefile b/editors/Makefile index 1c8223124..e6c114781 100644 --- a/editors/Makefile +++ b/editors/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/editors | ||
21 | EDITOR_DIR:=./ | 23 | EDITOR_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/editors/Makefile.in b/editors/Makefile.in index 017f30934..571e05568 100644 --- a/editors/Makefile.in +++ b/editors/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | EDITOR_AR:=editors.a | 20 | EDITOR_AR:=editors.a |
21 | ifndef $(EDITOR_DIR) | 21 | ifndef $(EDITOR_DIR) |
22 | EDITOR_DIR:=$(TOPDIR)editors/ | 22 | EDITOR_DIR:=$(top_builddir)/editors/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/editors | ||
24 | 25 | ||
25 | EDITOR-y:= | 26 | EDITOR-y:= |
26 | EDITOR-$(CONFIG_AWK) += awk.o | 27 | EDITOR-$(CONFIG_AWK) += awk.o |
@@ -42,3 +43,6 @@ endif | |||
42 | $(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) | 43 | $(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) |
43 | $(AR) -ro $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) | 44 | $(AR) -ro $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y)) |
44 | 45 | ||
46 | $(EDITOR_DIR)%.o: $(srcdir)/%.c | ||
47 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
48 | |||
diff --git a/findutils/Makefile b/findutils/Makefile index ba65a0e1d..f3f8bb872 100644 --- a/findutils/Makefile +++ b/findutils/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/findutils | ||
21 | FINDUTILS_DIR:=./ | 23 | FINDUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/findutils/Makefile.in b/findutils/Makefile.in index 2d2f242a0..ae71070d9 100644 --- a/findutils/Makefile.in +++ b/findutils/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | FINDUTILS_AR:=findutils.a | 20 | FINDUTILS_AR:=findutils.a |
21 | ifndef $(FINDUTILS_DIR) | 21 | ifndef $(FINDUTILS_DIR) |
22 | FINDUTILS_DIR:=$(TOPDIR)findutils/ | 22 | FINDUTILS_DIR:=$(top_builddir)/findutils/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/findutils | ||
24 | 25 | ||
25 | FINDUTILS-y:= | 26 | FINDUTILS-y:= |
26 | FINDUTILS-$(CONFIG_FIND) += find.o | 27 | FINDUTILS-$(CONFIG_FIND) += find.o |
@@ -32,3 +33,6 @@ libraries-y+=$(FINDUTILS_DIR)$(FINDUTILS_AR) | |||
32 | $(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y)) | 33 | $(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y)) |
33 | $(AR) -ro $@ $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y)) | 34 | $(AR) -ro $@ $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y)) |
34 | 35 | ||
36 | $(FINDUTILS_DIR)%.o: $(srcdir)/%.c | ||
37 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
38 | |||
diff --git a/init/Makefile b/init/Makefile index d23532735..9b0a1d139 100644 --- a/init/Makefile +++ b/init/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/init | ||
21 | INIT_DIR:=./ | 23 | INIT_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include $(srcdir)/Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/init/Makefile.in b/init/Makefile.in index 6264710db..807259dee 100644 --- a/init/Makefile.in +++ b/init/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | INIT_AR:=init.a | 20 | INIT_AR:=init.a |
21 | ifndef $(INIT_DIR) | 21 | ifndef $(INIT_DIR) |
22 | INIT_DIR:=$(TOPDIR)init/ | 22 | INIT_DIR:=$(top_builddir)/init/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/init | ||
24 | 25 | ||
25 | INIT-y:= | 26 | INIT-y:= |
26 | INIT-$(CONFIG_HALT) += halt.o | 27 | INIT-$(CONFIG_HALT) += halt.o |
@@ -56,3 +57,6 @@ libraries-y+=$(INIT_DIR)$(INIT_AR) | |||
56 | $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y)) | 57 | $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y)) |
57 | $(AR) -ro $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y)) | 58 | $(AR) -ro $@ $(patsubst %,$(INIT_DIR)%, $(INIT-y)) |
58 | 59 | ||
60 | $(INIT_DIR)%.o: $(srcdir)/%.c | ||
61 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
62 | |||
diff --git a/libbb/Makefile b/libbb/Makefile index fbcb12330..e94c05260 100644 --- a/libbb/Makefile +++ b/libbb/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/libbb | ||
21 | LIBBB_DIR:=./ | 23 | LIBBB_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index f86664f15..85d4a967b 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in | |||
@@ -16,12 +16,11 @@ | |||
16 | # along with this program; if not, write to the Free Software | 16 | # along with this program; if not, write to the Free Software |
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | 18 | ||
19 | |||
20 | |||
21 | LIBBB_AR:=libbb.a | 19 | LIBBB_AR:=libbb.a |
22 | ifndef $(LIBBB_DIR) | 20 | ifndef $(LIBBB_DIR) |
23 | LIBBB_DIR:=$(TOPDIR)libbb/ | 21 | LIBBB_DIR:=$(top_builddir)/libbb/ |
24 | endif | 22 | endif |
23 | srcdir=$(top_srcdir)/libbb | ||
25 | 24 | ||
26 | LIBBB_SRC:= \ | 25 | LIBBB_SRC:= \ |
27 | bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \ | 26 | bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \ |
@@ -51,7 +50,7 @@ LIBBB_SRC:= \ | |||
51 | 50 | ||
52 | LIBBB_OBJS=$(patsubst %.c,$(LIBBB_DIR)%.o, $(LIBBB_SRC)) | 51 | LIBBB_OBJS=$(patsubst %.c,$(LIBBB_DIR)%.o, $(LIBBB_SRC)) |
53 | 52 | ||
54 | LIBBB_MSRC0:=$(LIBBB_DIR)messages.c | 53 | LIBBB_MSRC0:=$(srcdir)/messages.c |
55 | LIBBB_MOBJ0:=full_version.o \ | 54 | LIBBB_MOBJ0:=full_version.o \ |
56 | memory_exhausted.o invalid_date.o io_error.o \ | 55 | memory_exhausted.o invalid_date.o io_error.o \ |
57 | write_error.o name_longer_than_foo.o unknown.o \ | 56 | write_error.o name_longer_than_foo.o unknown.o \ |
@@ -60,19 +59,19 @@ LIBBB_MOBJ0:=full_version.o \ | |||
60 | securetty_file.o motd_file.o \ | 59 | securetty_file.o motd_file.o \ |
61 | msg_standard_input.o msg_standard_output.o shell_file.o | 60 | msg_standard_input.o msg_standard_output.o shell_file.o |
62 | 61 | ||
63 | LIBBB_MSRC1:=$(LIBBB_DIR)xfuncs.c | 62 | LIBBB_MSRC1:=$(srcdir)/xfuncs.c |
64 | LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \ | 63 | LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \ |
65 | xfopen.o xopen.o xread.o xread_all.o xread_char.o \ | 64 | xfopen.o xopen.o xread.o xread_all.o xread_char.o \ |
66 | xferror.o xferror_stdout.o xfflush_stdout.o strlen.o | 65 | xferror.o xferror_stdout.o xfflush_stdout.o strlen.o |
67 | 66 | ||
68 | LIBBB_MSRC2:=$(LIBBB_DIR)printf.c | 67 | LIBBB_MSRC2:=$(srcdir)/printf.c |
69 | LIBBB_MOBJ2:=bb_vfprintf.o bb_vprintf.o bb_fprintf.o bb_printf.o | 68 | LIBBB_MOBJ2:=bb_vfprintf.o bb_vprintf.o bb_fprintf.o bb_printf.o |
70 | 69 | ||
71 | LIBBB_MSRC3:=$(LIBBB_DIR)xgetularg.c | 70 | LIBBB_MSRC3:=$(srcdir)/xgetularg.c |
72 | LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \ | 71 | LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \ |
73 | xgetularg_bnd.o xgetularg10_bnd.o xgetularg10.o | 72 | xgetularg_bnd.o xgetularg10_bnd.o xgetularg10.o |
74 | 73 | ||
75 | LIBBB_MSRC4:=$(LIBBB_DIR)/safe_strtol.c | 74 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c |
76 | LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o | 75 | LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o |
77 | 76 | ||
78 | LIBBB_MOBJS0=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ0)) | 77 | LIBBB_MOBJS0=$(patsubst %,$(LIBBB_DIR)%, $(LIBBB_MOBJ0)) |
@@ -88,6 +87,9 @@ $(LIBBB_DIR)$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \ | |||
88 | $(AR) -ro $@ $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \ | 87 | $(AR) -ro $@ $(LIBBB_OBJS) $(LIBBB_MOBJS0) $(LIBBB_MOBJS1) \ |
89 | $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4) | 88 | $(LIBBB_MOBJS2) $(LIBBB_MOBJS3) $(LIBBB_MOBJS4) |
90 | 89 | ||
90 | $(LIBBB_DIR)%.o: $(srcdir)/%.c | ||
91 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
92 | |||
91 | $(LIBBB_MOBJS0): $(LIBBB_MSRC0) | 93 | $(LIBBB_MOBJS0): $(LIBBB_MSRC0) |
92 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@ | 94 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DL_$(notdir $*) -c $< -o $@ |
93 | 95 | ||
diff --git a/libpwdgrp/Makefile b/libpwdgrp/Makefile index 79dbb462f..c833550bf 100644 --- a/libpwdgrp/Makefile +++ b/libpwdgrp/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/libpwgrp | ||
21 | LIBPWDGRP_DIR:=./ | 23 | LIBPWDGRP_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/libpwdgrp/Makefile.in b/libpwdgrp/Makefile.in index a79820252..9bdfc10d8 100644 --- a/libpwdgrp/Makefile.in +++ b/libpwdgrp/Makefile.in | |||
@@ -19,11 +19,12 @@ | |||
19 | 19 | ||
20 | LIBPWDGRP_AR:=libpwdgrp.a | 20 | LIBPWDGRP_AR:=libpwdgrp.a |
21 | ifndef $(LIBPWDGRP_DIR) | 21 | ifndef $(LIBPWDGRP_DIR) |
22 | LIBPWDGRP_DIR:=$(TOPDIR)libpwdgrp/ | 22 | LIBPWDGRP_DIR:=$(top_builddir)/libpwdgrp/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/libpwdgrp | ||
24 | 25 | ||
25 | 26 | ||
26 | LIBPWDGRP_MSRC0:=$(LIBPWDGRP_DIR)pwd_grp.c | 27 | LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c |
27 | LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \ | 28 | LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \ |
28 | fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \ | 29 | fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \ |
29 | getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \ | 30 | getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \ |
@@ -31,7 +32,7 @@ LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \ | |||
31 | initgroups.o putpwent.o putgrent.o | 32 | initgroups.o putpwent.o putgrent.o |
32 | LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)%, $(LIBPWDGRP_MOBJ0-y)) | 33 | LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)%, $(LIBPWDGRP_MOBJ0-y)) |
33 | 34 | ||
34 | LIBPWDGRP_MSRC1:=$(LIBPWDGRP_DIR)pwd_grp.c | 35 | LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c |
35 | LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \ | 36 | LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \ |
36 | __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \ | 37 | __pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \ |
37 | getspnam.o getspent_r.o getspent.o sgetspent.o \ | 38 | getspnam.o getspent_r.o getspent.o sgetspent.o \ |
diff --git a/loginutils/Makefile b/loginutils/Makefile index a013d141f..98226ae81 100644 --- a/loginutils/Makefile +++ b/loginutils/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/loginutils | ||
21 | LOGINUTILS_DIR:=./ | 23 | LOGINUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/loginutils/Makefile.in b/loginutils/Makefile.in index d6ffd3b6c..96a61e60f 100644 --- a/loginutils/Makefile.in +++ b/loginutils/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | LOGINUTILS_AR:=loginutils.a | 20 | LOGINUTILS_AR:=loginutils.a |
21 | ifndef LOGINUTILS_DIR | 21 | ifndef LOGINUTILS_DIR |
22 | LOGINUTILS_DIR:=$(TOPDIR)loginutils/ | 22 | LOGINUTILS_DIR:=$(top_builddir)/loginutils/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/loginutils | ||
24 | 25 | ||
25 | LOGINUTILS-y:= | 26 | LOGINUTILS-y:= |
26 | LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o | 27 | LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o |
@@ -51,3 +52,6 @@ endif | |||
51 | $(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y)) | 52 | $(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y)) |
52 | $(AR) -ro $@ $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y)) | 53 | $(AR) -ro $@ $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y)) |
53 | 54 | ||
55 | $(LOGINUTILS_DIR)%.o: $(srcdir)/%.c | ||
56 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
57 | |||
diff --git a/miscutils/Makefile b/miscutils/Makefile index 4bae72476..ac427dc09 100644 --- a/miscutils/Makefile +++ b/miscutils/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/miscutils | ||
21 | MISCUTILS_DIR:=./ | 23 | MISCUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in index 89e3208a6..ddddf72b3 100644 --- a/miscutils/Makefile.in +++ b/miscutils/Makefile.in | |||
@@ -19,9 +19,9 @@ | |||
19 | 19 | ||
20 | MISCUTILS_AR:=miscutils.a | 20 | MISCUTILS_AR:=miscutils.a |
21 | ifndef $(MISCUTILS_DIR) | 21 | ifndef $(MISCUTILS_DIR) |
22 | MISCUTILS_DIR:=$(TOPDIR)miscutils/ | 22 | MISCUTILS_DIR:=$(top_builddir)/miscutils/ |
23 | endif | 23 | endif |
24 | 24 | srcdir=$(top_srcdir)/miscutils | |
25 | 25 | ||
26 | MISCUTILS-y:= | 26 | MISCUTILS-y:= |
27 | MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o | 27 | MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o |
@@ -50,3 +50,6 @@ endif | |||
50 | $(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) | 50 | $(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) |
51 | $(AR) -ro $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) | 51 | $(AR) -ro $@ $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y)) |
52 | 52 | ||
53 | $(MISCUTILS_DIR)%.o: $(srcdir)/%.c | ||
54 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
55 | |||
diff --git a/modutils/Makefile b/modutils/Makefile index 5e1c886c0..d2b50b4d8 100644 --- a/modutils/Makefile +++ b/modutils/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/modutils | ||
21 | MODUTILS_DIR:=./ | 23 | MODUTILS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/modutils/Makefile.in b/modutils/Makefile.in index a92befafb..9bd11d4d8 100644 --- a/modutils/Makefile.in +++ b/modutils/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | MODUTILS_AR:=modutils.a | 20 | MODUTILS_AR:=modutils.a |
21 | ifndef $(MODUTILS_DIR) | 21 | ifndef $(MODUTILS_DIR) |
22 | MODUTILS_DIR:=$(TOPDIR)modutils/ | 22 | MODUTILS_DIR:=$(top_builddir)/modutils/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/modutils | ||
24 | 25 | ||
25 | MODUTILS-y:= | 26 | MODUTILS-y:= |
26 | MODUTILS-$(CONFIG_INSMOD) += insmod.o | 27 | MODUTILS-$(CONFIG_INSMOD) += insmod.o |
@@ -33,3 +34,6 @@ libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR) | |||
33 | $(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) | 34 | $(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) |
34 | $(AR) -ro $@ $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) | 35 | $(AR) -ro $@ $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y)) |
35 | 36 | ||
37 | $(MODUTILS_DIR)%.o: $(srcdir)/%.c | ||
38 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
39 | |||
diff --git a/networking/Makefile b/networking/Makefile index 456c433fd..91726b1b2 100644 --- a/networking/Makefile +++ b/networking/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/networking | ||
21 | NETWORKING_DIR:=./ | 23 | NETWORKING_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/networking/Makefile.in b/networking/Makefile.in index e15e61a3e..9bfe90176 100644 --- a/networking/Makefile.in +++ b/networking/Makefile.in | |||
@@ -19,9 +19,9 @@ | |||
19 | 19 | ||
20 | NETWORKING_AR:=networking.a | 20 | NETWORKING_AR:=networking.a |
21 | ifndef $(NETWORKING_DIR) | 21 | ifndef $(NETWORKING_DIR) |
22 | NETWORKING_DIR:=$(TOPDIR)networking/ | 22 | NETWORKING_DIR:=$(top_builddir)/networking/ |
23 | endif | 23 | endif |
24 | 24 | srcdir=$(top_srcdir)/networking | |
25 | NETWORKING-y:= | 25 | NETWORKING-y:= |
26 | NETWORKING-$(CONFIG_ARPING) += arping.o | 26 | NETWORKING-$(CONFIG_ARPING) += arping.o |
27 | NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o | 27 | NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o |
@@ -63,3 +63,6 @@ endif | |||
63 | $(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) | 63 | $(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) |
64 | $(AR) -ro $@ $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) | 64 | $(AR) -ro $@ $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) |
65 | 65 | ||
66 | $(NETWORKING_DIR)%.o: $(srcdir)/%.c | ||
67 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
68 | |||
diff --git a/networking/libiproute/Makefile b/networking/libiproute/Makefile index 0dc7191d3..d3aefaaf4 100644 --- a/networking/libiproute/Makefile +++ b/networking/libiproute/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../../ | 20 | top_srcdir=../.. |
21 | top_builddir=../.. | ||
22 | srcdir=$(top_srcdir)/networking/libiproute | ||
21 | LIBIPROUTE_DIR:=./ | 23 | LIBIPROUTE_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/networking/libiproute/Makefile.in b/networking/libiproute/Makefile.in index 25c51999f..fcc7f48ce 100644 --- a/networking/libiproute/Makefile.in +++ b/networking/libiproute/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | LIBIPROUTE_AR:=libiproute.a | 20 | LIBIPROUTE_AR:=libiproute.a |
21 | ifndef $(LIBIPROUTE_DIR) | 21 | ifndef $(LIBIPROUTE_DIR) |
22 | LIBIPROUTE_DIR:=$(TOPDIR)networking/libiproute/ | 22 | LIBIPROUTE_DIR:=$(top_builddir)/networking/libiproute/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/networking/libiproute | ||
24 | 25 | ||
25 | LIBIPROUTE-$(CONFIG_IP) += \ | 26 | LIBIPROUTE-$(CONFIG_IP) += \ |
26 | ip_parse_common_args.o \ | 27 | ip_parse_common_args.o \ |
@@ -78,3 +79,6 @@ libraries-y+=$(LIBIPROUTE_DIR)$(LIBIPROUTE_AR) | |||
78 | $(LIBIPROUTE_DIR)$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)%, $(LIBIPROUTE-y)) | 79 | $(LIBIPROUTE_DIR)$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)%, $(LIBIPROUTE-y)) |
79 | $(AR) -ro $@ $(patsubst %,$(LIBIPROUTE_DIR)%, $(LIBIPROUTE-y)) | 80 | $(AR) -ro $@ $(patsubst %,$(LIBIPROUTE_DIR)%, $(LIBIPROUTE-y)) |
80 | 81 | ||
82 | $(LIBIPROUTE_DIR)%.o: $(srcdir)/%.c | ||
83 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
84 | |||
diff --git a/networking/udhcp/Makefile b/networking/udhcp/Makefile index 2b79d2293..3d32db50a 100644 --- a/networking/udhcp/Makefile +++ b/networking/udhcp/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../../ | 20 | top_srcdir=../.. |
21 | top_builddir=../.. | ||
22 | srcdir=$(top_srcdir)/networking/udhcp | ||
21 | UDHCP_DIR:=./ | 23 | UDHCP_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/networking/udhcp/Makefile.in b/networking/udhcp/Makefile.in index b48079429..2d7a08816 100644 --- a/networking/udhcp/Makefile.in +++ b/networking/udhcp/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | UDHCP_AR:=udhcp.a | 20 | UDHCP_AR:=udhcp.a |
21 | ifndef $(UDHCP_DIR) | 21 | ifndef $(UDHCP_DIR) |
22 | UDHCP_DIR:=$(TOPDIR)networking/udhcp/ | 22 | UDHCP_DIR:=$(top_builddir)/networking/udhcp/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/networking/udhcp | ||
24 | 25 | ||
25 | #ok, so I forgot how to do an or, but this is a quick and dirty hack | 26 | #ok, so I forgot how to do an or, but this is a quick and dirty hack |
26 | ifeq ($(CONFIG_UDHCPC), y) | 27 | ifeq ($(CONFIG_UDHCPC), y) |
@@ -48,6 +49,6 @@ libraries-y+=$(UDHCP_DIR)$(UDHCP_AR) | |||
48 | $(UDHCP_DIR)$(UDHCP_AR): $(UDHCP_OBJS) | 49 | $(UDHCP_DIR)$(UDHCP_AR): $(UDHCP_OBJS) |
49 | $(AR) -ro $@ $(UDHCP_OBJS) | 50 | $(AR) -ro $@ $(UDHCP_OBJS) |
50 | 51 | ||
51 | $(UDHCP_OBJS): %.o : %.c | 52 | $(UDHCP_OBJS): $(UDHCP_DIR)%.o : $(srcdir)/%.c |
52 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DIN_BUSYBOX -c $< -o $@ | 53 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DIN_BUSYBOX -c $< -o $@ |
53 | 54 | ||
diff --git a/procps/Makefile b/procps/Makefile index 0238f7ebb..1cc880462 100644 --- a/procps/Makefile +++ b/procps/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/procps | ||
21 | PROCPS_DIR:=./ | 23 | PROCPS_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/procps/Makefile.in b/procps/Makefile.in index 1c2e00f7b..ced29a198 100644 --- a/procps/Makefile.in +++ b/procps/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | PROCPS_AR:=procps.a | 20 | PROCPS_AR:=procps.a |
21 | ifndef $(PROCPS_DIR) | 21 | ifndef $(PROCPS_DIR) |
22 | PROCPS_DIR:=$(TOPDIR)procps/ | 22 | PROCPS_DIR:=$(top_builddir)/procps/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/procps | ||
24 | 25 | ||
25 | PROCPS-y:= | 26 | PROCPS-y:= |
26 | PROCPS-$(CONFIG_FREE) += free.o | 27 | PROCPS-$(CONFIG_FREE) += free.o |
@@ -37,3 +38,6 @@ libraries-y+=$(PROCPS_DIR)$(PROCPS_AR) | |||
37 | $(PROCPS_DIR)$(PROCPS_AR): $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y)) | 38 | $(PROCPS_DIR)$(PROCPS_AR): $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y)) |
38 | $(AR) -ro $@ $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y)) | 39 | $(AR) -ro $@ $(patsubst %,$(PROCPS_DIR)%, $(PROCPS-y)) |
39 | 40 | ||
41 | $(PROCPS_DIR)%.o: $(srcdir)/%.c | ||
42 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
43 | |||
diff --git a/scripts/config/Makefile b/scripts/config/Makefile index e15ec399c..c0b5b9d35 100644 --- a/scripts/config/Makefile +++ b/scripts/config/Makefile | |||
@@ -2,8 +2,10 @@ | |||
2 | # | 2 | # |
3 | # Copyright (C) 2002 Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 2002 Erik Andersen <andersen@codepoet.org> |
4 | 4 | ||
5 | TOPDIR=../../ | 5 | top_srcdir=../.. |
6 | include $(TOPDIR)Rules.mak | 6 | top_builddir=../.. |
7 | srcdir=$(top_srcdir)/scripts/config | ||
8 | include $(top_builddir)/Rules.mak | ||
7 | 9 | ||
8 | all: ncurses conf mconf | 10 | all: ncurses conf mconf |
9 | 11 | ||
@@ -33,7 +35,8 @@ endif | |||
33 | CONF_SRC =conf.c | 35 | CONF_SRC =conf.c |
34 | MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c | 36 | MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c |
35 | SHARED_SRC=zconf.tab.c | 37 | SHARED_SRC=zconf.tab.c |
36 | SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h | 38 | SHARED_DEPS:=$(srcdir)/lkc.h $(srcdir)/lkc_proto.h \ |
39 | lkc_defs.h $(srcdir)/expr.h zconf.tab.h | ||
37 | CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) | 40 | CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) |
38 | MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) | 41 | MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) |
39 | SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) | 42 | SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) |
@@ -44,13 +47,13 @@ conf: $(CONF_OBJS) $(SHARED_OBJS) | |||
44 | mconf: $(MCONF_OBJS) $(SHARED_OBJS) | 47 | mconf: $(MCONF_OBJS) $(SHARED_OBJS) |
45 | $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) | 48 | $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) |
46 | 49 | ||
47 | $(CONF_OBJS): %.o : %.c $(SHARED_DEPS) | 50 | $(CONF_OBJS): %.o : $(srcdir)/%.c $(SHARED_DEPS) |
48 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ | 51 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ |
49 | 52 | ||
50 | $(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) | 53 | $(MCONF_OBJS): %.o : $(srcdir)/%.c $(SHARED_DEPS) |
51 | $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ | 54 | $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ |
52 | 55 | ||
53 | lkc_defs.h: lkc_proto.h | 56 | lkc_defs.h: $(srcdir)/lkc_proto.h |
54 | @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 57 | @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
55 | 58 | ||
56 | ### | 59 | ### |
@@ -61,29 +64,30 @@ lkc_defs.h: lkc_proto.h | |||
61 | 64 | ||
62 | ifdef LKC_GENPARSER | 65 | ifdef LKC_GENPARSER |
63 | 66 | ||
64 | %.tab.c %.tab.h: %.y | 67 | %.tab.c %.tab.h: $(srcdir)/%.y |
65 | bison -t -d -v -b $* -p $(notdir $*) $< | 68 | bison -t -d -v -b $* -p $(notdir $*) $< |
66 | 69 | ||
67 | lex.%.c: %.l | 70 | lex.%.c: $(srcdir)/%.l |
68 | flex -P$(notdir $*) -o$@ $< | 71 | flex -P$(notdir $*) -o$@ $< |
69 | else | 72 | else |
70 | 73 | ||
71 | lex.zconf.o: lex.zconf.c $(SHARED_DEPS) | 74 | lex.zconf.o: lex.zconf.c $(SHARED_DEPS) |
72 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ | 75 | $(HOSTCC) $(HOSTCFLAGS) -I$(srcdir) -c $< -o $@ |
73 | |||
74 | lex.zconf.c: lex.zconf.c_shipped | ||
75 | cp lex.zconf.c_shipped lex.zconf.c | ||
76 | 76 | ||
77 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) | 77 | lex.zconf.c: $(srcdir)/lex.zconf.c_shipped |
78 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ | 78 | cp $< $@ |
79 | 79 | ||
80 | zconf.tab.c: zconf.tab.c_shipped | 80 | zconf.tab.c: $(srcdir)/zconf.tab.c_shipped |
81 | cp zconf.tab.c_shipped zconf.tab.c | 81 | cp $< $@ |
82 | 82 | ||
83 | zconf.tab.h: zconf.tab.h_shipped | 83 | zconf.tab.h: $(srcdir)/zconf.tab.h_shipped |
84 | cp zconf.tab.h_shipped zconf.tab.h | 84 | cp $< $@ |
85 | endif | 85 | endif |
86 | 86 | ||
87 | zconf.tab.o: zconf.tab.c lex.zconf.c $(srcdir)/confdata.c $(srcdir)/expr.c \ | ||
88 | $(srcdir)/symbol.c $(srcdir)/menu.c $(SHARED_DEPS) | ||
89 | $(HOSTCC) $(HOSTCFLAGS) -I$(srcdir) -I. -c $< -o $@ | ||
90 | |||
87 | .PHONY: ncurses | 91 | .PHONY: ncurses |
88 | 92 | ||
89 | ncurses: | 93 | ncurses: |
diff --git a/shell/Makefile b/shell/Makefile index 8f476c19e..bd1dad6f3 100644 --- a/shell/Makefile +++ b/shell/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_builddir=.. | ||
22 | srcdir=$(top_srcdir)/shell | ||
21 | SHELL_DIR:=./ | 23 | SHELL_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/shell/Makefile.in b/shell/Makefile.in index 7b9f41ed4..61b2846ac 100644 --- a/shell/Makefile.in +++ b/shell/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | SHELL_AR:=shell.a | 20 | SHELL_AR:=shell.a |
21 | ifndef $(SHELL_DIR) | 21 | ifndef $(SHELL_DIR) |
22 | SHELL_DIR:=$(TOPDIR)shell/ | 22 | SHELL_DIR:=$(top_builddir)/shell/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/shell | ||
24 | 25 | ||
25 | SHELLT-y:= | 26 | SHELLT-y:= |
26 | SHELLT-$(CONFIG_ASH) += ash.o | 27 | SHELLT-$(CONFIG_ASH) += ash.o |
@@ -34,3 +35,6 @@ libraries-y+=$(SHELL_DIR)$(SHELL_AR) | |||
34 | $(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) | 35 | $(SHELL_DIR)$(SHELL_AR): $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) |
35 | $(AR) -ro $@ $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) | 36 | $(AR) -ro $@ $(patsubst %,$(SHELL_DIR)%, $(SHELLT-y)) |
36 | 37 | ||
38 | $(SHELL_DIR)%.o: $(srcdir)/%.c | ||
39 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
40 | |||
diff --git a/sysklogd/Makefile b/sysklogd/Makefile index f6ce14530..78b0c0090 100644 --- a/sysklogd/Makefile +++ b/sysklogd/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_buildddir=.. | ||
22 | srcdir=$(top_srcdir)/sysklogd | ||
21 | SYSKLOGD_DIR:=./ | 23 | SYSKLOGD_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/sysklogd/Makefile.in b/sysklogd/Makefile.in index 1c6e90774..99a5f823c 100644 --- a/sysklogd/Makefile.in +++ b/sysklogd/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | SYSKLOGD_AR:=sysklogd.a | 20 | SYSKLOGD_AR:=sysklogd.a |
21 | ifndef $(SYSKLOGD_DIR) | 21 | ifndef $(SYSKLOGD_DIR) |
22 | SYSKLOGD_DIR:=$(TOPDIR)sysklogd/ | 22 | SYSKLOGD_DIR:=$(top_builddir)/sysklogd/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/sysklogd | ||
24 | 25 | ||
25 | SYSKLOGD-:= | 26 | SYSKLOGD-:= |
26 | SYSKLOGD-$(CONFIG_KLOGD) += klogd.o | 27 | SYSKLOGD-$(CONFIG_KLOGD) += klogd.o |
@@ -33,3 +34,6 @@ libraries-y+=$(SYSKLOGD_DIR)$(SYSKLOGD_AR) | |||
33 | $(SYSKLOGD_DIR)$(SYSKLOGD_AR): $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y)) | 34 | $(SYSKLOGD_DIR)$(SYSKLOGD_AR): $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y)) |
34 | $(AR) -ro $@ $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y)) | 35 | $(AR) -ro $@ $(patsubst %,$(SYSKLOGD_DIR)%, $(SYSKLOGD-y)) |
35 | 36 | ||
37 | $(SYSKLOGD_DIR)%.o: $(srcdir)/%.c | ||
38 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
39 | |||
diff --git a/testsuite/du/du-h-works b/testsuite/du/du-h-works index 8ec5d4c24..82041ab33 100644 --- a/testsuite/du/du-h-works +++ b/testsuite/du/du-h-works | |||
@@ -1,3 +1,4 @@ | |||
1 | du -h .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox du -h .. > logfile.bb | 2 | du -h "$d" > logfile.gnu |
3 | busybox du -h "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/du/du-k-works b/testsuite/du/du-k-works index 43b119c7c..177a1a2cd 100644 --- a/testsuite/du/du-k-works +++ b/testsuite/du/du-k-works | |||
@@ -1,3 +1,4 @@ | |||
1 | du -k .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox du -k .. > logfile.bb | 2 | du -k "$d" > logfile.gnu |
3 | busybox du -k "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/du/du-l-works b/testsuite/du/du-l-works index c5d439853..61e91400c 100644 --- a/testsuite/du/du-l-works +++ b/testsuite/du/du-l-works | |||
@@ -1,3 +1,4 @@ | |||
1 | du -l .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox du -l .. > logfile.bb | 2 | du -l "$d" > logfile.gnu |
3 | busybox du -l "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/du/du-m-works b/testsuite/du/du-m-works index e3e2d3a56..bc9707350 100644 --- a/testsuite/du/du-m-works +++ b/testsuite/du/du-m-works | |||
@@ -1,3 +1,4 @@ | |||
1 | du -m .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox du -m .. > logfile.bb | 2 | du -m "$d" > logfile.gnu |
3 | busybox du -m "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/du/du-s-works b/testsuite/du/du-s-works index 16b0a3e5a..f0b3bf0ae 100644 --- a/testsuite/du/du-s-works +++ b/testsuite/du/du-s-works | |||
@@ -1,3 +1,4 @@ | |||
1 | du -s .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox du -s .. > logfile.bb | 2 | du -s "$d" > logfile.gnu |
3 | busybox du -s "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/du/du-works b/testsuite/du/du-works index 87ba63032..47949c694 100644 --- a/testsuite/du/du-works +++ b/testsuite/du/du-works | |||
@@ -1,3 +1,4 @@ | |||
1 | du .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox du .. > logfile.bb | 2 | du "$d" > logfile.gnu |
3 | busybox du "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/head/head-n-works b/testsuite/head/head-n-works index 121a1fa1d..db4325556 100644 --- a/testsuite/head/head-n-works +++ b/testsuite/head/head-n-works | |||
@@ -1,3 +1,4 @@ | |||
1 | head -n 2 ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox head -n 2 ../README > logfile.bb | 2 | head -n 2 "$d/README" > logfile.gnu |
3 | busybox head -n 2 "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/head/head-works b/testsuite/head/head-works index ea10adeb4..56ad3e36b 100644 --- a/testsuite/head/head-works +++ b/testsuite/head/head-works | |||
@@ -1,3 +1,4 @@ | |||
1 | head ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox head ../README > logfile.bb | 2 | head "$d/README" > logfile.gnu |
3 | busybox head "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/ls/ls-1-works b/testsuite/ls/ls-1-works index 8651ecd72..8ad484fc3 100644 --- a/testsuite/ls/ls-1-works +++ b/testsuite/ls/ls-1-works | |||
@@ -1,3 +1,4 @@ | |||
1 | ls -1 .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox ls -1 .. > logfile.bb | 2 | ls -1 "$d" > logfile.gnu |
3 | busybox ls -1 "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/ls/ls-h-works b/testsuite/ls/ls-h-works index f54a7be0b..7331262c9 100644 --- a/testsuite/ls/ls-h-works +++ b/testsuite/ls/ls-h-works | |||
@@ -1,3 +1,4 @@ | |||
1 | ls -h .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox ls -h .. > logfile.bb | 2 | ls -h "$d" > logfile.gnu |
3 | busybox ls -h "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/ls/ls-l-works b/testsuite/ls/ls-l-works index 50e44597e..ae5141d80 100644 --- a/testsuite/ls/ls-l-works +++ b/testsuite/ls/ls-l-works | |||
@@ -1,3 +1,4 @@ | |||
1 | ls -l .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox ls -l .. > logfile.bb | 2 | ls -l "$d" > logfile.gnu |
3 | busybox ls -l "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/ls/ls-s-works b/testsuite/ls/ls-s-works index 98a612d06..d82f328b7 100644 --- a/testsuite/ls/ls-s-works +++ b/testsuite/ls/ls-s-works | |||
@@ -1,3 +1,4 @@ | |||
1 | ls -1s .. > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox ls -1s .. > logfile.bb | 2 | ls -1s "$d" > logfile.gnu |
3 | busybox ls -1s "$d" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/runtest b/testsuite/runtest index 89aba3985..6ba334bce 100755 --- a/testsuite/runtest +++ b/testsuite/runtest | |||
@@ -1,6 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | PATH=$(dirname $(pwd)):$PATH | 3 | [ -n "$srcdir" ] || srcdir=$(pwd) |
4 | [ -n "$bindir" ] || bindir=$(dirname $(pwd)) | ||
5 | PATH=$bindir:$PATH | ||
4 | 6 | ||
5 | run_applet_testcase () | 7 | run_applet_testcase () |
6 | { | 8 | { |
@@ -13,7 +15,7 @@ run_applet_testcase () | |||
13 | local uc_applet=$(echo $applet | tr a-z A-Z) | 15 | local uc_applet=$(echo $applet | tr a-z A-Z) |
14 | local testname=$(basename $testcase) | 16 | local testname=$(basename $testcase) |
15 | 17 | ||
16 | if grep -q "^# CONFIG_${uc_applet} is not set$" ../.config; then | 18 | if grep -q "^# CONFIG_${uc_applet} is not set$" $bindir/.config; then |
17 | echo UNTESTED: $testname | 19 | echo UNTESTED: $testname |
18 | return 0 | 20 | return 0 |
19 | fi | 21 | fi |
@@ -21,7 +23,7 @@ run_applet_testcase () | |||
21 | if grep -q "^# FEATURE: " $testcase; then | 23 | if grep -q "^# FEATURE: " $testcase; then |
22 | local feature=`sed -ne 's/^# FEATURE: //p' $testcase` | 24 | local feature=`sed -ne 's/^# FEATURE: //p' $testcase` |
23 | 25 | ||
24 | if grep -q "^# ${feature} is not set$" ../.config; then | 26 | if grep -q "^# ${feature} is not set$" $bindir/.config; then |
25 | echo UNTESTED: $testname | 27 | echo UNTESTED: $testname |
26 | return 0 | 28 | return 0 |
27 | fi | 29 | fi |
@@ -31,7 +33,7 @@ run_applet_testcase () | |||
31 | mkdir -p tmp | 33 | mkdir -p tmp |
32 | pushd tmp >/dev/null | 34 | pushd tmp >/dev/null |
33 | 35 | ||
34 | sh -x -e ../$testcase >.logfile.txt 2>&1 | 36 | d=$srcdir sh -x -e $testcase >.logfile.txt 2>&1 |
35 | 37 | ||
36 | if [ $? != 0 ] ; then | 38 | if [ $? != 0 ] ; then |
37 | echo FAIL: $testname | 39 | echo FAIL: $testname |
@@ -58,8 +60,8 @@ run_applet_tests () | |||
58 | 60 | ||
59 | local status=0 | 61 | local status=0 |
60 | 62 | ||
61 | for testcase in $applet/*; do | 63 | for testcase in $srcdir/$applet/*; do |
62 | if [ "$testcase" = "$applet/CVS" ]; then | 64 | if [ "$testcase" = "$srcdir/$applet/CVS" ]; then |
63 | continue | 65 | continue |
64 | fi | 66 | fi |
65 | 67 | ||
@@ -84,11 +86,11 @@ fi | |||
84 | if [ $# -ne 0 ]; then | 86 | if [ $# -ne 0 ]; then |
85 | applets="$@" | 87 | applets="$@" |
86 | else | 88 | else |
87 | applets="*" | 89 | applets=$(ls $srcdir) |
88 | fi | 90 | fi |
89 | 91 | ||
90 | for applet in $applets; do | 92 | for applet in $applets; do |
91 | if [ "$applet" != CVS -a -d "$applet" ]; then | 93 | if [ "$applet" != CVS -a -d "$srcdir/$applet" ]; then |
92 | if run_applet_tests $applet; then | 94 | if run_applet_tests $applet; then |
93 | : | 95 | : |
94 | else | 96 | else |
diff --git a/testsuite/sort/sort-n-works b/testsuite/sort/sort-n-works index c9b63a36a..878108ddd 100644 --- a/testsuite/sort/sort-n-works +++ b/testsuite/sort/sort-n-works | |||
@@ -1,3 +1,4 @@ | |||
1 | sort -n ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox sort -n ../README > logfile.bb | 2 | sort -n "$d/README" > logfile.gnu |
3 | busybox sort -n "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/sort/sort-r-works b/testsuite/sort/sort-r-works index 6422ba940..6ee0ceb1a 100644 --- a/testsuite/sort/sort-r-works +++ b/testsuite/sort/sort-r-works | |||
@@ -1,3 +1,4 @@ | |||
1 | sort -r ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox sort -r ../README > logfile.bb | 2 | sort -r "$d/README" > logfile.gnu |
3 | busybox sort -r "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/sort/sort-works b/testsuite/sort/sort-works index 0110aa010..14a115abf 100644 --- a/testsuite/sort/sort-works +++ b/testsuite/sort/sort-works | |||
@@ -1,3 +1,4 @@ | |||
1 | sort ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox sort ../README > logfile.bb | 2 | sort "$d/README" > logfile.gnu |
3 | busybox sort "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/tail/tail-n-works b/testsuite/tail/tail-n-works index 321db7f8a..27a905f88 100644 --- a/testsuite/tail/tail-n-works +++ b/testsuite/tail/tail-n-works | |||
@@ -1,3 +1,4 @@ | |||
1 | tail -n 2 ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox tail -n 2 ../README > logfile.bb | 2 | tail -n 2 "$d/README" > logfile.gnu |
3 | busybox tail -n 2 "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/tail/tail-works b/testsuite/tail/tail-works index 321db7f8a..27a905f88 100644 --- a/testsuite/tail/tail-works +++ b/testsuite/tail/tail-works | |||
@@ -1,3 +1,4 @@ | |||
1 | tail -n 2 ../README > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | busybox tail -n 2 ../README > logfile.bb | 2 | tail -n 2 "$d/README" > logfile.gnu |
3 | busybox tail -n 2 "$d/README" > logfile.bb | ||
3 | cmp logfile.gnu logfile.bb | 4 | cmp logfile.gnu logfile.bb |
diff --git a/testsuite/xargs/xargs-works b/testsuite/xargs/xargs-works index 4ad581804..c95869e89 100644 --- a/testsuite/xargs/xargs-works +++ b/testsuite/xargs/xargs-works | |||
@@ -1,3 +1,4 @@ | |||
1 | find -name \*works -type f | xargs md5sum > logfile.gnu | 1 | [ -n "$d" ] || d=.. |
2 | find -name \*works -type f | busybox xargs md5sum > logfile.bb | 2 | find "$d" -name \*works -type f | xargs md5sum > logfile.gnu |
3 | find "$d" -name \*works -type f | busybox xargs md5sum > logfile.bb | ||
3 | diff -u logfile.gnu logfile.bb | 4 | diff -u logfile.gnu logfile.bb |
diff --git a/util-linux/Makefile b/util-linux/Makefile index f2e2021f0..4401fd1ed 100644 --- a/util-linux/Makefile +++ b/util-linux/Makefile | |||
@@ -17,13 +17,15 @@ | |||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | # | 18 | # |
19 | 19 | ||
20 | TOPDIR:= ../ | 20 | top_srcdir=.. |
21 | top_buildddir=.. | ||
22 | srcdir=$(top_srcdir)/util-linux | ||
21 | UTILLINUX_DIR:=./ | 23 | UTILLINUX_DIR:=./ |
22 | include $(TOPDIR).config | 24 | include $(top_builddir)/Rules.mak |
23 | include $(TOPDIR)Rules.mak | 25 | include $(top_builddir)/.config |
24 | include Makefile.in | 26 | include Makefile.in |
25 | all: $(libraries-y) | 27 | all: $(libraries-y) |
26 | -include $(TOPDIR).depend | 28 | -include $(top_builddir)/.depend |
27 | 29 | ||
28 | clean: | 30 | clean: |
29 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
diff --git a/util-linux/Makefile.in b/util-linux/Makefile.in index 72136f1ce..0172b3562 100644 --- a/util-linux/Makefile.in +++ b/util-linux/Makefile.in | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | UTILLINUX_AR:=util-linux.a | 20 | UTILLINUX_AR:=util-linux.a |
21 | ifndef $(UTILLINUX_DIR) | 21 | ifndef $(UTILLINUX_DIR) |
22 | UTILLINUX_DIR:=$(TOPDIR)util-linux/ | 22 | UTILLINUX_DIR:=$(top_builddir)/util-linux/ |
23 | endif | 23 | endif |
24 | srcdir=$(top_srcdir)/util-linux | ||
24 | 25 | ||
25 | UTILLINUX-:= | 26 | UTILLINUX-:= |
26 | UTILLINUX-$(CONFIG_DMESG) +=dmesg.o | 27 | UTILLINUX-$(CONFIG_DMESG) +=dmesg.o |
@@ -49,10 +50,13 @@ libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR) | |||
49 | $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) | 50 | $(UTILLINUX_DIR)$(UTILLINUX_AR): $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
50 | $(AR) -ro $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) | 51 | $(AR) -ro $@ $(patsubst %,$(UTILLINUX_DIR)%, $(UTILLINUX-y)) |
51 | 52 | ||
53 | $(UTILLINUX_DIR)%.o: $(srcdir)/%.c | ||
54 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | ||
55 | |||
52 | ifneq ($(strip $(CONFIG_LFS)),y) | 56 | ifneq ($(strip $(CONFIG_LFS)),y) |
53 | ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y) | 57 | ifeq ($(strip $(FDISK_SUPPORT_LARGE_DISKS)),y) |
54 | 58 | ||
55 | $(UTILLINUX_DIR)fdisk.o: $(UTILLINUX_DIR)fdisk.c | 59 | $(UTILLINUX_DIR)fdisk.o: $(srcdir)/fdisk.c |
56 | $(CC) $(CFLAGS) \ | 60 | $(CC) $(CFLAGS) \ |
57 | -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ | 61 | -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ |
58 | $(EXTRA_CFLAGS) -c -o $@ $< | 62 | $(EXTRA_CFLAGS) -c -o $@ $< |