]>
Commit | Line | Data |
---|---|---|
14c7c974 A |
1 | export USE_APPLE_PB_SUPPORT = all |
2 | ||
3 | # Makefile for kernel booter | |
4 | ||
5 | # CFLAGS = -O $(MORECPP) -arch i386 -g -munaligned-text | |
6 | DEFINES= | |
7 | CONFIG = hd | |
8 | LIBDIR = libsa | |
9 | INC = -I. -I$(LIBDIR) | |
10 | ifneq "" "$(wildcard /bin/mkdirs)" | |
11 | MKDIRS = /bin/mkdirs | |
12 | else | |
13 | MKDIRS = /bin/mkdir -p | |
14 | endif | |
15 | AS = as | |
16 | LD = ld | |
17 | PAX = /bin/pax | |
18 | ||
19 | OBJROOT = `pwd`/obj | |
20 | SYMROOT = `pwd`/sym | |
21 | DSTROOT = `pwd`/dst | |
22 | SRCROOT = /tmp | |
23 | ARCHLESS_RC_CFLAGS=`echo $(RC_CFLAGS) | sed 's/-arch [a-z0-9]*//g'` | |
24 | ||
25 | VPATH = $(OBJROOT):$(SYMROOT) | |
26 | ||
27 | GENERIC_SUBDIRS = gen | |
28 | ||
29 | # | |
30 | # Currently builds for i386 | |
31 | # | |
32 | ||
33 | all 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" $@ \ |
14c7c974 A |
65 | ) || exit $?; \ |
66 | else \ | |
67 | echo "========= nothing to build for $$i ========="; \ | |
68 | fi; \ | |
69 | done | |
70 | ||
71 | installsrc: | |
72 | gnutar cf - . | (cd ${SRCROOT}; gnutar xpf -) | |
73 | ||
74 | $(SYMROOT) $(OBJROOT) $(DSTROOT): | |
75 | @$(MKDIRS) $@ |