]> git.saurik.com Git - apple/boot.git/blame - Makefile
boot-132.tar.gz
[apple/boot.git] / Makefile
CommitLineData
14c7c974
A
1export USE_APPLE_PB_SUPPORT = all
2
3# Makefile for kernel booter
4
75b89a82 5# CFLAGS = -O $(MORECPP) -arch i386 -g
14c7c974
A
6DEFINES=
7CONFIG = hd
8LIBDIR = libsa
9INC = -I. -I$(LIBDIR)
10ifneq "" "$(wildcard /bin/mkdirs)"
11 MKDIRS = /bin/mkdirs
12else
13 MKDIRS = /bin/mkdir -p
14endif
15AS = as
16LD = ld
17PAX = /bin/pax
18
19OBJROOT = `pwd`/obj
20SYMROOT = `pwd`/sym
21DSTROOT = `pwd`/dst
22SRCROOT = /tmp
23ARCHLESS_RC_CFLAGS=`echo $(RC_CFLAGS) | sed 's/-arch [a-z0-9]*//g'`
24
25VPATH = $(OBJROOT):$(SYMROOT)
26
f083c6c3 27GENERIC_SUBDIRS =
14c7c974
A
28
29#
30# Currently builds for i386
31#
32
33all tags clean debug install installhdrs: $(SYMROOT) $(OBJROOT)
34 @if [ -z "$(RC_ARCHS)" ]; then \
35 RC_ARCHS="i386"; \
36 fi; \
37 SUBDIRS="$(GENERIC_SUBDIRS) $$RC_ARCHS"; \
38 for i in $$SUBDIRS; \
39 do \
40 if [ -d $$i ]; then \
41 echo ================= make $@ for $$i =================; \
42 ( OBJROOT=$(OBJROOT)/$${i}; \
43 SYMROOT=$(SYMROOT)/$${i}; \
44 DSTROOT=$(DSTROOT); \
47b0a8bd
A
45 XCFLAGS=$(ARCHLESS_RC_CFLAGS); \
46 GENSUBDIRS="$(GENERIC_SUBDIRS)"; \
47 for x in $$GENSUBDIRS; \
48 do \
49 if [ "$$x" == "$$i" ]; then \
50 XCFLAGS="$(RC_CFLAGS)"; \
51 break; \
52 fi \
53 done; \
14c7c974
A
54 echo "$$OBJROOT $$SYMROOT $$DSTROOT"; \
55 cd $$i; ${MAKE} \
56 "OBJROOT=$$OBJROOT" \
57 "SYMROOT=$$SYMROOT" \
58 "DSTROOT=$$DSTROOT" \
59 "SRCROOT=$$SRCROOT" \
60 "RC_ARCHS=$$RC_ARCHS" \
61 "TARGET=$$i" \
62 "RC_KANJI=$(RC_KANJI)" \
63 "JAPANESE=$(JAPANESE)" \
47b0a8bd 64 "RC_CFLAGS=$$XCFLAGS" $@ \
57c72a9a 65 ) || exit $$?; \
14c7c974
A
66 else \
67 echo "========= nothing to build for $$i ========="; \
68 fi; \
69 done
70
71installsrc:
72 gnutar cf - . | (cd ${SRCROOT}; gnutar xpf -)
73
74$(SYMROOT) $(OBJROOT) $(DSTROOT):
75 @$(MKDIRS) $@