795
[darwin-xtools.git] / cctools / as / Makefile
blob21cb086f17c818f4af8641b94da395a8fb04f720
1 RC_OS = macos
2 export USE_APPLE_PB_SUPPORT = all
3 OFLAG = -Os
4 X_CFLAGS =
6 ifneq "clang" "$(notdir $(CC))"
7 GCC_FLAGS = -Wall $(X_CFLAGS)
8 endif
10 USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "clang" ] && \
11 [ "$(RC_XBS)" != "YES" ]; then \
12 echo YES ; else echo NO ; \
13 fi; )
15 ifneq "" "$(SDKROOT)"
16 SDK = -isysroot $(SDKROOT)
17 CC = $(shell xcrun -find -sdk $(SDKROOT) cc)
18 endif
19 CFLAGS = $(OFLAG) -g -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR) \
20 $(GCC_FLAGS) -DNeXT_MOD $(SDK)
22 LIBSTUFF_DIR = -L$(SYMROOT)/../../libstuff
23 LIBSTUFF = -lstuff
25 ifneq "" "$(wildcard /bin/mkdirs)"
26 MKDIRS = /bin/mkdirs
27 else
28 MKDIRS = /bin/mkdir -p
29 endif
31 SRCROOT = .
32 SYMROOT = .
33 OBJROOT = .
34 SYM_DIRS = $(SYMROOT)/driver_dir \
35 $(SYMROOT)/a68_dir \
36 $(SYMROOT)/a88_dir \
37 $(SYMROOT)/a386_dir \
38 $(SYMROOT)/ax86_64_dir \
39 $(SYMROOT)/appc_dir \
40 $(SYMROOT)/appc64_dir \
41 $(SYMROOT)/a860_dir \
42 $(SYMROOT)/ahppa_dir \
43 $(SYMROOT)/asparc_dir \
44 $(SYMROOT)/aarm_dir
46 OFILE_DIRS = $(OBJROOT)/driver_dir \
47 $(OBJROOT)/a68_dir \
48 $(OBJROOT)/a88_dir \
49 $(OBJROOT)/a386_dir \
50 $(OBJROOT)/ax86_64_dir \
51 $(OBJROOT)/appc_dir \
52 $(OBJROOT)/appc64_dir \
53 $(OBJROOT)/a860_dir \
54 $(OBJROOT)/ahppa_dir \
55 $(OBJROOT)/asparc_dir \
56 $(OBJROOT)/aarm_dir
58 BINDIR = /bin
59 USRBINDIR = /usr/bin
60 ifeq "macos" "$(RC_OS)"
61 LIBDIR := $(shell if [ "$(RC_RELEASE)" = "Beaker" ] || \
62 [ "$(RC_RELEASE)" = "Bunsen" ] || \
63 [ "$(RC_RELEASE)" = "Gonzo" ] || \
64 [ "$(RC_RELEASE)" = "Kodiak" ]; then \
65 echo /usr/libexec; else echo /usr/libexec/gcc/darwin; \
66 fi; )
67 LOCLIBDIR := $(shell if [ "$(RC_RELEASE)" = "Beaker" ] || \
68 [ "$(RC_RELEASE)" = "Bunsen" ] || \
69 [ "$(RC_RELEASE)" = "Gonzo" ] || \
70 [ "$(RC_RELEASE)" = "Kodiak" ]; then \
71 echo /usr/local/libexec; else echo /usr/local/libexec/gcc/darwin; \
72 fi; )
73 else
74 LIBDIR = /usr/libexec
75 LOCLIBDIR = /usr/local/libexec
76 endif
78 DWARF = dwarf2dbg.c
79 CFILES = app.c as.c atof-generic.c atof-ieee.c expr.c fixes.c flonum-const.c \
80 flonum-copy.c flonum-mult.c frags.c hash.c hex-value.c input-file.c \
81 input-scrub.c layout.c messages.c obstack.c read.c sections.c \
82 symbols.c write_object.c xmalloc.c $(DWARF)
84 CFILES_m68k = m68k.c
85 CFILES_m88k = m88k.c
86 CFILES_i860 = i860.c
87 CFILES_i386 = i386.c
88 CFILES_ppc = ppc.c
89 CFILES_hppa = hppa.c hppa-aux.c
90 CFILES_sparc = sparc.c
91 CFILES_arm = arm.c
93 HFILES = app.h as.h atof-ieee.h bignum.h expr.h fixes.h flonum.h frags.h \
94 hash.h hex_value.h i386-opcode.h i386.h i860-opcode.h input-file.h \
95 input-scrub.h layout.h m68k-opcode.h m88k-opcode.h ppc-opcode.h md.h \
96 messages.h obstack.h read.h relax.h sections.h struc-symbol.h \
97 symbols.h write_object.h xmalloc.h hppa-aux.h hppa-opcode.h \
98 sparc-opcode.h arch64_32.h dwarf2dbg.h filenames.h arm_reloc.h
100 CHECK_FILES = m68k-check.c m88k-check.c i860-check.c i386-check.c ppc-check.c \
101 hppa-check.c sparc-check.c
103 INSTALL_FILES = Makefile notes $(CFILES) $(CFILES_m68k) $(CFILES_m88k) \
104 $(CFILES_i860) $(CFILES_i386) $(CFILES_ppc) $(CFILES_hppa) \
105 $(CFILES_sparc) $(CFILES_arm) $(HFILES) $(CHECK_FILES) \
106 driver.c COPYING cctools.plist
108 OBJS = $(CFILES:.c=.o) apple_version.o
109 OBJS_m68k = $(CFILES_m68k:.c=.o)
110 OBJS_m88k = $(CFILES_m88k:.c=.o)
111 OBJS_i860 = $(CFILES_i860:.c=.o)
112 OBJS_i386 = $(CFILES_i386:.c=.o)
113 OBJS_ppc = $(CFILES_ppc:.c=.o)
114 OBJS_hppa = $(CFILES_hppa:.c=.o)
115 OBJS_sparc = $(CFILES_sparc:.c=.o)
116 OBJS_arm = $(CFILES_arm:.c=.o)
118 all: $(OFILE_DIRS) $(SYM_DIRS) driver_build a68_build a88_build a386_build \
119 ax86_64_build a860_build appc_build appc64_build ahppa_build \
120 aarm_build asparc_build
122 all_test: a68_test a88_test a860_test a386_test appc_test ahppa_test
124 driver_build: $(OBJROOT)/driver_dir
125 @if [ $(SRCROOT) = . ]; \
126 then \
127 cd driver_dir; $(MAKE) -f ../Makefile driver VPATH=.. \
128 CFLAGS="-g -Os -I../../include $(GCC_FLAGS) $(SDK)" \
129 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFILE_DIR=. \
130 RC_FLAGS="$(RC_CFLAGS)" DEP_DIR=driver_dir; \
131 else \
132 cd $(OBJROOT)/driver_dir; $(MAKE) -f $(SRCROOT)/Makefile \
133 driver VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/driver_dir \
134 SYMROOT=$(SYMROOT)/driver_dir SRCROOT=$(SRCROOT) \
135 CFLAGS="-g -Os -I$(SRCROOT)/../include $(GCC_FLAGS) $(SDK)" \
136 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
137 RC_FLAGS="$(RC_CFLAGS)" DEP_DIR=driver_dir; \
140 a68_build: $(OBJROOT)/a68_dir
141 @if [ $(SRCROOT) = . ]; \
142 then \
143 cd a68_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
144 SRCROOT=.. TARGET_OBJS="$(OBJS_m68k)" DEP_DIR=a68_dir \
145 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
146 RC_CFLAGS="$(RC_CFLAGS)" \
147 COPTS="-DM68K -DBUILTIN_MMUS"; \
148 else \
149 cd $(OBJROOT)/a68_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
150 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/a68_dir \
151 SYMROOT=$(SYMROOT)/a68_dir SRCROOT=$(SRCROOT) \
152 TARGET_OBJS="$(OBJS_m68k)" \
153 COPTS="-DM68K -DBUILTIN_MMUS" \
154 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
155 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=a68_dir; \
158 a68_test: a68_dir
159 cd a68_dir; $(MAKE) -f ../Makefile m68k-check VPATH=.. OFILE_DIR=. \
160 SRCROOT=.. COPTS="-DM68K -DBUILTIN_MMUS"
161 cd a68_dir; $(MAKE) -f ../Makefile test
163 a88_build: $(OBJROOT)/a88_dir
164 @if [ $(SRCROOT) = . ]; \
165 then \
166 cd a88_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
167 SRCROOT=.. TARGET_OBJS="$(OBJS_m88k)" DEP_DIR=a88_dir \
168 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
169 COPTS="-DM88K -Dm88110" RCFLAGS=$(RCFLAGS); \
170 else \
171 cd $(OBJROOT)/a88_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
172 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/a88_dir \
173 SYMROOT=$(SYMROOT)/a88_dir SRCROOT=$(SRCROOT) \
174 TARGET_OBJS="$(OBJS_m88k)" COPTS="-DM88K -Dm88110" \
175 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
176 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=a88_dir; \
179 a88_test: a88_dir
180 cd a88_dir; $(MAKE) -f ../Makefile m88k-check VPATH=.. OFILE_DIR=. \
181 SRCROOT=.. COPTS="-DM88K -Dm88110"
182 cd a88_dir; $(MAKE) -f ../Makefile test
184 a386_build: $(OBJROOT)/a386_dir
185 @if [ $(SRCROOT) = . ]; \
186 then \
187 cd a386_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
188 SRCROOT=.. TARGET_OBJS="$(OBJS_i386)" DEP_DIR=a386_dir \
189 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
190 COPTS="-DI386 -Di486 -Di586 -Di686" \
191 RC_CFLAGS="$(RC_CFLAGS)"; \
192 else \
193 cd $(OBJROOT)/a386_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
194 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/a386_dir \
195 SYMROOT=$(SYMROOT)/a386_dir SRCROOT=$(SRCROOT) \
196 TARGET_OBJS="$(OBJS_i386)" \
197 COPTS="-DI386 -Di486 -Di586 -Di686" \
198 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
199 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=a386_dir; \
202 a386_test: a386_dir
203 cd a386_dir; $(MAKE) -f ../Makefile i386-check VPATH=.. OFILE_DIR=. \
204 SRCROOT=.. COPTS="-DI386 -Di486 -Di586 -Di686"
205 cd a386_dir; $(MAKE) -f ../Makefile test
208 ax86_64_build: $(OBJROOT)/ax86_64_dir
209 @if [ $(SRCROOT) = . ]; \
210 then \
211 cd ax86_64_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
212 SRCROOT=.. TARGET_OBJS="$(OBJS_i386)" DEP_DIR=ax86_64_dir \
213 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
214 COPTS="-DI386 -Di486 -Di586 -Di686 -DARCH64" \
215 RC_CFLAGS="$(RC_CFLAGS)" LIBSTUFF="-lstuff"; \
216 else \
217 cd $(OBJROOT)/ax86_64_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
218 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/ax86_64_dir \
219 SYMROOT=$(SYMROOT)/ax86_64_dir SRCROOT=$(SRCROOT) \
220 TARGET_OBJS="$(OBJS_i386)" LIBSTUFF="-lstuff" \
221 COPTS="-DI386 -Di486 -Di586 -Di686 -DARCH64" \
222 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
223 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=ax86_64_dir; \
226 ax86_64_test: ax86_64_dir
227 cd ax86_64_dir; $(MAKE) -f ../Makefile x86_64-check VPATH=.. \
228 OFILE_DIR=. SRCROOT=.. COPTS="-DI386 -Di486 -Di586 -Di686 -DARCH64"
229 cd ax86_64_dir; $(MAKE) -f ../Makefile test
231 a860_build: $(OBJROOT)/a860_dir
232 @if [ $(SRCROOT) = . ]; \
233 then \
234 cd a860_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
235 SRCROOT=.. TARGET_OBJS="$(OBJS_i860)" DEP_DIR=a860_dir \
236 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
237 RC_CFLAGS="$(RC_CFLAGS)" COPTS="-DI860"; \
238 else \
239 cd $(OBJROOT)/a860_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
240 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/a860_dir \
241 SYMROOT=$(SYMROOT)/a860_dir SRCROOT=$(SRCROOT) \
242 TARGET_OBJS="$(OBJS_i860)" COPTS="-DI860" \
243 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
244 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=a860_dir; \
247 a860_test: a860_dir
248 cd a860_dir; $(MAKE) -f ../Makefile i860-check VPATH=.. OFILE_DIR=. \
249 SRCROOT=.. COPTS="-DI860"
250 cd a860_dir; $(MAKE) -f ../Makefile test ASFLAGS=-W
252 appc_build: $(OBJROOT)/appc_dir
253 @if [ $(SRCROOT) = . ]; \
254 then \
255 cd appc_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
256 SRCROOT=.. TARGET_OBJS="$(OBJS_ppc)" DEP_DIR=appc_dir \
257 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
258 RC_CFLAGS="$(RC_CFLAGS)" COPTS="-DPPC"; \
259 else \
260 cd $(OBJROOT)/appc_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
261 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/appc_dir \
262 SYMROOT=$(SYMROOT)/appc_dir SRCROOT=$(SRCROOT) \
263 TARGET_OBJS="$(OBJS_ppc)" COPTS="-DPPC" \
264 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
265 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=appc_dir; \
268 appc64_build: $(OBJROOT)/appc64_dir
269 @if [ $(SRCROOT) = . ]; \
270 then \
271 cd appc64_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
272 SRCROOT=.. TARGET_OBJS="$(OBJS_ppc)" DEP_DIR=appc64_dir \
273 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
274 RC_CFLAGS="$(RC_CFLAGS)" OFLAG=$(OFLAG) \
275 COPTS="-DPPC -DARCH64" LIBSTUFF="-lstuff"; \
276 else \
277 cd $(OBJROOT)/appc64_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
278 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/appc64_dir \
279 SYMROOT=$(SYMROOT)/appc64_dir SRCROOT=$(SRCROOT) \
280 TARGET_OBJS="$(OBJS_ppc)" COPTS="-DPPC -DARCH64" \
281 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
282 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=appc64_dir \
283 LIBSTUFF="-lstuff"; \
286 appc_test: appc_dir
287 cd appc_dir; $(MAKE) -f ../Makefile ppc-check VPATH=.. OFILE_DIR=. \
288 SRCROOT=.. COPTS="-DPPC"
289 cd appc_dir; $(MAKE) -f ../Makefile test
291 ahppa_build: $(OBJROOT)/ahppa_dir
292 @if [ $(SRCROOT) = . ]; \
293 then \
294 cd ahppa_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=.\
295 SRCROOT=.. TARGET_OBJS="$(OBJS_hppa)" DEP_DIR=ahppa_dir \
296 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
297 RC_CFLAGS="$(RC_CFLAGS)" COPTS="-DHPPA"; \
298 else \
299 cd $(OBJROOT)/ahppa_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
300 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/ahppa_dir \
301 SYMROOT=$(SYMROOT)/ahppa_dir SRCROOT=$(SRCROOT) \
302 TARGET_OBJS="$(OBJS_hppa)" COPTS="-DHPPA" \
303 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
304 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=ahppa_dir; \
307 ahppa_test: ahppa_dir
308 cd ahppa_dir; $(MAKE) -f ../Makefile hppa-check VPATH=.. OFILE_DIR=. \
309 SRCROOT=.. COPTS="-DHPPA"
310 cd ahppa_dir; $(MAKE) -f ../Makefile test
312 asparc_build: $(OBJROOT)/asparc_dir
313 @if [ $(SRCROOT) = . ]; \
314 then \
315 cd asparc_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=.\
316 SRCROOT=.. TARGET_OBJS="$(OBJS_sparc)" DEP_DIR=asparc_dir\
317 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
318 RC_CFLAGS="$(RC_CFLAGS)" COPTS="-DSPARC"; \
319 else \
320 cd $(OBJROOT)/asparc_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
321 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/asparc_dir \
322 SYMROOT=$(SYMROOT)/asparc_dir SRCROOT=$(SRCROOT) \
323 TARGET_OBJS="$(OBJS_sparc)" COPTS="-DSPARC" \
324 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
325 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=asparc_dir; \
328 asparc_test: asparc_dir
329 cd asparc_dir; $(MAKE) -f ../Makefile sparc-check VPATH=.. \
330 OFILE_DIR=. SRCROOT=.. COPTS="-DSPARC"
331 cd asparc_dir; $(MAKE) -f ../Makefile test
333 aarm_build: $(OBJROOT)/aarm_dir
334 @if [ $(SRCROOT) = . ]; \
335 then \
336 cd aarm_dir; $(MAKE) -f ../Makefile as VPATH=.. OFILE_DIR=. \
337 SRCROOT=.. TARGET_OBJS="$(OBJS_arm)" DEP_DIR=aarm_dir \
338 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" OFLAG=$(OFLAG) \
339 RC_CFLAGS="$(RC_CFLAGS)" COPTS="-DARM"; \
340 else \
341 cd $(OBJROOT)/aarm_dir; $(MAKE) -f $(SRCROOT)/Makefile as \
342 VPATH=$(SRCROOT) OFILE_DIR=$(OBJROOT)/aarm_dir \
343 SYMROOT=$(SYMROOT)/aarm_dir SRCROOT=$(SRCROOT) \
344 TARGET_OBJS="$(OBJS_arm)" COPTS="-DARM" \
345 VERS_STRING_FLAGS="$(VERS_STRING_FLAGS)" \
346 RC_CFLAGS="$(RC_CFLAGS)" DEP_DIR=aarm_dir; \
349 driver: driver.o apple_version.o
350 $(CC) $(RC_CFLAGS) $(SDK) -o $(SYMROOT)/driver \
351 $(OFILE_DIR)/driver.o $(OFILE_DIR)/apple_version.o \
352 $(LIBSTUFF_DIR) $(LIBSTUFF)
354 as: $(OBJS) $(TARGET_OBJS)
355 $(CC) $(RC_CFLAGS) -nostdlib -r \
356 -o $(SYMROOT)/as.private.o $(OBJS) $(TARGET_OBJS) \
357 $(LIBSTUFF_DIR) $(LIBSTUFF)
358 $(CC) $(RC_CFLAGS) $(SDK) -o $(SYMROOT)/as $(SYMROOT)/as.private.o
360 m68k-check:
361 $(CC) $(COPTS) $(CFLAGS) -o check ../m68k-check.c
363 m88k-check:
364 $(CC) $(COPTS) $(CFLAGS) -o check ../m88k-check.c
366 i386-check:
367 $(CC) $(COPTS) $(CFLAGS) -o check ../i386-check.c
369 x86_64-check:
370 $(CC) $(COPTS) $(CFLAGS) -DARCH64 -o check ../i386-check.c
372 i860-check:
373 $(CC) $(COPTS) $(CFLAGS) -o check ../i860-check.c
375 ppc-check:
376 $(CC) $(COPTS) $(CFLAGS) -o check ../ppc-check.c
378 hppa-check:
379 $(CC) $(COPTS) $(CFLAGS) -o check ../hppa-check.c
381 sparc-check:
382 $(CC) $(COPTS) $(CFLAGS) -o check ../sparc-check.c
384 test:
385 ./check $(LLVM_MC) > check.s
386 ./as -W -force_cpusubtype_ALL $(ASFLAGS) -o check.o check.s
387 otool -X -tV $(LLVM_MC) check.o > check1.s
388 ./as -force_cpusubtype_ALL $(ASFLAGS) -o check1.o check1.s
389 otool -X -tV $(LLVM_MC) check1.o > check2.s
390 diff check1.s check2.s > check.out
391 cmp check.o check1.o
393 apple_version.c:
394 echo "const char apple_version[]= " \"`vers_string $(VERS_STRING_FLAGS) -f cctools`\" ";" > \
395 $(OFILE_DIR)/$@
397 ifeq "NO" "$(USE_DEPENDENCY_FILE)"
398 .c.o:
399 $(CC) $(COPTS) $(CFLAGS) $(RC_CFLAGS) -c -o $(OFILE_DIR)/$*.o $<
400 else
401 .c.o:
402 $(CC) $(COPTS) $(CFLAGS) $(RC_CFLAGS) -c -MD \
403 -dependency-file $(OFILE_DIR)/$*.d -o $(OFILE_DIR)/$*.o $<
404 md -d -u $(OFILE_DIR)/Makedep $(OFILE_DIR)/$*.d
405 endif
407 clean shlib_clean:
408 -rm -r -f $(OFILE_DIRS) make.out
410 installsrc installGASsrc:
411 $(MKDIRS) $(SRCROOT)
412 chmod 755 $(SRCROOT)
413 gnutar cf - $(INSTALL_FILES) | (cd $(SRCROOT); gnutar xf -)
414 chmod 444 $(SRCROOT)/*
416 install: all $(RC_OS)_install
418 macos_install: common_install xcommon_install
419 $(MKDIRS) $(DSTROOT)$(LIBDIR)/i386
420 install -c -s -m 555 $(SYMROOT)/a386_dir/as \
421 $(DSTROOT)$(LIBDIR)/i386/as
422 $(MKDIRS) $(DSTROOT)$(LIBDIR)/x86_64
423 install -c -s -m 555 $(SYMROOT)/ax86_64_dir/as \
424 $(DSTROOT)$(LIBDIR)/x86_64/as
426 teflon_install: common_install xcommon_install
427 $(MKDIRS) $(DSTROOT)$(LIBDIR)/i386
428 install -c -s -m 555 $(SYMROOT)/a386_dir/as \
429 $(DSTROOT)$(LIBDIR)/i386/as
431 xcommon_install:
432 $(MKDIRS) $(DSTROOT)$(USRBINDIR)
433 install -c -s -m 555 $(SYMROOT)/driver_dir/driver \
434 $(DSTROOT)$(USRBINDIR)/as
435 $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceVersions/
436 install -c -s -m 444 $(SRCROOT)/cctools.plist \
437 $(DSTROOT)/usr/local/OpenSourceVersions/cctools.plist
438 $(MKDIRS) $(DSTROOT)/usr/local/OpenSourceLicenses/
439 install -c -s -m 444 $(SRCROOT)/COPYING \
440 $(DSTROOT)/usr/local/OpenSourceLicenses/cctools.txt
441 $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc
442 install -c -s -m 555 $(SYMROOT)/appc_dir/as \
443 $(DSTROOT)$(LIBDIR)/ppc/as
444 $(MKDIRS) $(DSTROOT)$(LIBDIR)/ppc64
445 install -c -s -m 555 $(SYMROOT)/appc64_dir/as \
446 $(DSTROOT)$(LIBDIR)/ppc64/as
447 $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m68k
448 install -c -s -m 555 $(SYMROOT)/a68_dir/as \
449 $(DSTROOT)$(LOCLIBDIR)/m68k/as
450 $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/sparc
451 install -c -s -m 555 $(SYMROOT)/asparc_dir/as \
452 $(DSTROOT)$(LOCLIBDIR)/sparc/as
453 $(MKDIRS) $(DSTROOT)$(LIBDIR)/arm
454 install -c -s -m 555 $(SYMROOT)/aarm_dir/as \
455 $(DSTROOT)$(LIBDIR)/arm/as
457 nextstep_install: common_install
458 $(MKDIRS) $(DSTROOT)$(BINDIR)
459 install -c -s -m 555 $(SYMROOT)/driver_dir/driver \
460 $(DSTROOT)$(BINDIR)/as
461 $(MKDIRS) $(DSTROOT)$(LIBDIR)/m68k
462 install -c -s -m 555 $(SYMROOT)/a68_dir/as \
463 $(DSTROOT)$(LIBDIR)/m68k/as
464 $(MKDIRS) $(DSTROOT)$(LIBDIR)/i386
465 install -c -s -m 555 $(SYMROOT)/a386_dir/as \
466 $(DSTROOT)$(LIBDIR)/i386/as
467 $(MKDIRS) $(DSTROOT)$(LIBDIR)/sparc
468 install -c -s -m 555 $(SYMROOT)/asparc_dir/as \
469 $(DSTROOT)$(LIBDIR)/sparc/as
470 $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/ppc
471 install -c -s -m 555 $(SYMROOT)/appc_dir/as \
472 $(DSTROOT)$(LOCLIBDIR)/ppc/as
474 common_install:
475 $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/m88k
476 install -c -s -m 555 $(SYMROOT)/a88_dir/as \
477 $(DSTROOT)$(LOCLIBDIR)/m88k/as
478 $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/hppa
479 install -c -s -m 555 $(SYMROOT)/ahppa_dir/as \
480 $(DSTROOT)$(LOCLIBDIR)/hppa/as
481 $(MKDIRS) $(DSTROOT)$(LOCLIBDIR)/i860
482 install -s -m 555 $(SYMROOT)/a860_dir/as \
483 $(DSTROOT)$(LOCLIBDIR)/i860/as
485 $(OFILE_DIRS) $(SYM_DIRS):
486 $(MKDIRS) $@
488 -include $(DEP_DIR)/Makedep