Chameleon

Chameleon Commit Details

Date:2011-07-31 01:08:24 (7 years 11 months ago)
Author:Evan Lojewski
Commit:1243
Parents: 1242
Message:Update branch structure / Makefiles
Changes:
D/branches/xZen/Cconfig
A/branches/xZen/src/Make.rules
A/branches/xZen/src/arm
A/branches/xZen/src/ppc
A/branches/xZen/src/arm/Make.rules
A/branches/xZen/src/ppc/Make.rules
M/branches/xZen/src/i386/libsa/Makefile
M/branches/xZen/src/i386/Cconfig
M/branches/xZen/src/modules/FileSystem/Cconfig
M/branches/xZen/src/i386/Makefile
M/branches/xZen/src/Cconfig
M/branches/xZen/src/modules/klibc/Makefile
M/branches/xZen/src/Makefile
M/branches/xZen/src/modules/ModuleSystem/Makefile
M/branches/xZen/Make.rules
M/branches/xZen/src/modules/Cconfig
M/branches/xZen/src/config/Makefile
M/branches/xZen/src/modules/Makefile
M/branches/xZen/src/util/Cconfig
M/branches/xZen/Makefile
M/branches/xZen/src/util/fdisk/Makefile
M/branches/xZen/src/util/Makefile
M/branches/xZen/src/modules/MakeInc.dir
M/branches/xZen/src/i386/Make.rules

File differences

branches/xZen/Cconfig
1
2
3
4
5
6
#
# Chameleon Configuration
#
mainmenu "Chameleon Configuration"
source "src/Cconfig"
branches/xZen/Make.rules
1
1
22
3
4
53
64
75
......
1412
1513
1614
17
15
1816
1917
2018
2119
2220
23
21
2422
2523
2624
2725
2826
29
27
3028
3129
3230
......
3634
3735
3836
39
40
37
38
4139
42
40
41
42
4343
44
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
4562
4663
4764
4865
49
50
5166
5267
5368
5469
55
56
70
5771
5872
5973
6074
75
6176
77
78
79
80
81
82
6283
-include $(SRCROOT)/auto.conf
include ${SRCROOT}/Make.rules
export USE_APPLE_PB_SUPPORT = all
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
NATIVE_CPP = g++
PAX = /bin/pax
$(OBJROOT)/%.o: %.c
$(OBJROOT)/%.o: %.c $(OBJROOT)
@echo "\t[CC] $<"
@$(NATIVE_CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.m
$(OBJROOT)/%.o: %.m $(OBJROOT)
@echo "\t[M] $<"
@$(NATIVE_CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.cpp
$(OBJROOT)/%.o: %.cpp $(OBJROOT)
@echo "\t[CPP] $<"
@$(NATIVE_CPP) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
$(DIRS_NEEDED) $(INSTALLDIR) $(OBJROOT) $(SYMROOT):
@echo "\t[MKDIR] $@"
@$(MKDIRS) $@
$(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/.config:
config: $(DIRS_NEEDED)
@echo "\t[MAKE] config"
@cd $(SRCROOT)/src/config && make rebuild_config
@cd ${SRCROOT}/config/ && make
@echo "\t[CCONFIG] config"
@cd ${SRCROOT} && $(SYMROOT)/cconfig $(SRCROOT)/Cconfig
.PHONY: clean
rebuild_config: $(DIRS_NEEDED)
@echo "\t[MAKE] config"
@cd ${SRCROOT}/config/ && make
@echo "\t[CCONFIG] reconfig"
@cd ${SRCROOT} && $(SYMROOT)/cconfig $(SRCROOT)/Cconfig rebuild
.PHONY: config
.PHONY: rebuild_config
.PHONY: $(SRCROOT)/auto.conf
$(SYMROOT)/vers.h:
@echo "#define BOOT_VERSION \"5.0.132\"" > $@
@echo "#define BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $@
@echo "#define BOOT_CHAMELEONVERSION \"$$VERSION\"" >> $@
@echo "#define BOOT_CHAMELEONREVISION \"$$REVISION\"" >> $@
clean:
@echo "\t[RM] $(OBJROOT)"
@echo "\t[RM] $(SYMROOT)"
@echo "\t[RM] $(DSTROOT)"
@echo "\t[RM] $(SRCROOT)/revision"
@echo "\t[RM] $(SRCROOT)/i386/modules/module_includes"
@echo "\t[RM] $(SRCROOT)/auto.conf"
@echo "\t[RM] $(SRCROOT)/autoconf.h"
@echo "\t[RM] $(SRCROOT)/autoconf.inc"
@rm -rf $(OBJROOT) $(SYMROOT) $(DSTROOT) $(SRCROOT)/revision \
$(SRCROOT)/i386/modules/module_includes \
@rm -rf $(OBJROOT) $(SYMROOT) $(DSTROOT) \
$(SRCROOT)/auto.conf \
$(SRCROOT)/autoconf.h \
$(SRCROOT)/autoconf.inc
$(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/autoconf.inc $(SRCROOT)/.config: rebuild_cofig
.PHONY: rebuild_config
.PHONY: config
.PHONY: clean
.PHONY: $(SYMROOT)/vers.h
.DEFAULT_GOAL := all
branches/xZen/src/arm/Make.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ARM_AS = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as -arch arm
ARM_LD = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld -arch arm
ARM_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
ARM_CPP = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
ARM_SDK=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/
AMR_CFLAGS += -I"$(ARM_SDK)/usr/include"
ARM_LDFLAGS += -L"$(ARM_SDK)/usr/lib"
ARM_LDFLAGS += -L"$(ARM_SDK)/usr/lib/system/"
ARM_LDFLAGS += -F"$(ARM_SDK)/System/Library/Frameworks"
ARM_LDFLAGS += -F"$(ARM_SDK)/System/Library/PrivateFrameworks"
##### ARM Rules #####
$(OBJROOT)/%.armo: %.c $(OBJROOT)
@echo "\t[CC:ARM] $<"
@$(ARM_CC) -arch arm ${AMR_CFLAGS} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.armo: %.m $(OBJROOT)
@echo "\t[M:ARM] $<"
@$(ARM_CC) -arch arm ${AMR_CFLAGS} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.armo: %.cpp $(OBJROOT)
@echo "\t[CPP:ARM] $<"
@$(ARM_CPP) -arch arm ${AMR_CFLAGS} $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
ACTUAL_OBJECTS := ${ACTUAL_OBJECTS} $(addsuffix .armo, $(addprefix $(OBJROOT)/, $(OBJECTS)))
MODULE_OBJECTS := ${MODULE_OBJECTS} $(addsuffix .armo, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
branches/xZen/src/ppc/Make.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PPC_AS = /usr/bin/as -arch ppc
PPC_LD = /usr/bin/ld -arch ppc
PPC_CC = /usr/bin/gcc-4.2
PPC_CPP = /usr/bin/g++-4.2
PPC_SDK = /Developer/SDKs/MacOSX10.5.sdk/
PPC_CFLAGS += -I"$(PPC_SDK)/usr/include"
PPC_LDFLAGS += -L"$(PPC_SDK)/usr/lib"
PPC_LDFLAGS += -L"$(PPC_SDK)/usr/lib/system/"
PPC_LDFLAGS += -F"$(PPC_SDK)/System/Library/Frameworks"
PPC_LDFLAGS += -F"$(PPC_SDK)/System/Library/PrivateFrameworks"
##### PPC Rules #####
$(OBJROOT)/%.ppco: %.c $(OBJROOT)
@echo "\t[CC:PPC] $<"
@$(PPC_CC) -arch ppc $(PPC_CFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.ppco: %.m $(OBJROOT)
@echo "\t[M:PPC] $<"
@$(PPC_CC) -arch ppc $(PPC_CFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.ppco: %.cpp $(OBJROOT)
@echo "\t[CPP:PPC] $<"
@$(PPC_CPP) -arch ppc $(PPC_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
ACTUAL_OBJECTS := ${ACTUAL_OBJECTS} $(addsuffix .ppco, $(addprefix $(OBJROOT)/, $(OBJECTS)))
MODULE_OBJECTS := ${MODULE_OBJECTS} $(addsuffix .ppco, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
branches/xZen/src/config/Makefile
33
44
55
6
7
8
9
10
11
6
7
8
9
10
11
1212
1313
1414
15
15
1616
1717
1818
......
3333
3434
3535
36
37
38
39
40
41
42
43
44
4536
4637
# we'll just keep the generated files in this directory
# and install them directly, rather than generating them again.
#
SRCROOT = $(shell pwd)/../../
OBJROOT = $(SRCROOT)/obj/config
SYMROOT = $(SRCROOT)/sym/
DSTROOT = $(SRCROOT)/dst/
DOCROOT = $(SRCROOT)/../doc
IMGROOT = $(SRCROOT)/sym/cache
ROOT = $(shell pwd)/../../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj/config
SYMROOT = $(ROOT)/sym
DSTROOT = $(ROOT)/dst
DOCROOT = $(ROOT)/doc
DIR = config
include ${SRCROOT}/Make.rules
include ${ROOT}/Make.rules
OBJECTS = cconfig.o zconf.tab.o \
yesno.o textbox.o menubox.o \
@echo "\t[LD] $(@F)"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) $(OBJROOT)/*.o
config: $(DIRS_NEEDED) $(SYMPROG)
@cd ${SRCROOT} && $(SYMPROG) $(SRCROOT)/Cconfig
rebuild_config: $(DIRS_NEEDED) $(SYMPROG)
@cd ${SRCROOT} && $(SYMPROG) $(SRCROOT)/Cconfig rebuild
.PHONY: config
#dependencies
-include $(OBJROOT)/Makedep
branches/xZen/src/Make.rules
1
2
3
4
5
6
7
8
9
10
-include $(SRCROOT)/auto.conf
-include ${SRCROOT}/i386/Make.rules
-include ${SRCROOT}/ppc/Make.rules
-include ${SRCROOT}/arm/Make.rules
#print transformed OBJECTS
#$(warning ${ACTUAL_OBJECTS})
branches/xZen/src/Cconfig
11
22
33
4
5
6
4
5
6
7
8
#
# Chameleon Configuration
#
source "src/util/Cconfig"
source "src/i386/Cconfig"
source "src/modules/Cconfig"
mainmenu "Chameleon Configuration"
source "util/Cconfig"
source "i386/Cconfig"
source "modules/Cconfig"
branches/xZen/src/modules/FileSystem/Cconfig
99
1010
1111
12
12
---help---
Say Y here if you want to enable to use of this module.
source "src/modules/FileSystem/HFS/Cconfig"
source "modules/FileSystem/HFS/Cconfig"
branches/xZen/src/modules/MakeInc.dir
1
2
3
4
5
6
7
8
1
2
3
4
5
6
97
10
118
12
13
9
10
1411
1512
16
13
1714
18
1915
2016
2117
......
5753
5854
5955
60
56
6157
6258
6359
......
7066
7167
7268
73
74
69
70
7571
7672
77
73
74
7875
7976
8077
81
8278
8379
8480
8581
8682
87
88
83
84
8985
9086
91
87
9288
9389
9490
9591
9692
97
93
9894
9995
10096
10197
10298
10399
104
100
101
105102
106
107103
108
109104
110105
111
106
107
112108
113109
114110
......
124120
125121
126122
127
123
124
128125
129126
130127
......
145142
146143
147144
148
149
150
151
152
153
154
155
145
146
147
148
149
150
151
152
156153
157154
158
159
160
161155
162
156
157
163158
164
165
166
167
159
168160
169161
170
162
171163
172164
173165
SRCROOT = $(shell pwd)/../../../
OBJROOT = $(SRCROOT)/obj/i386/modules/$(DIR)
SYMROOT = $(SRCROOT)/sym/i386/modules/
DSTROOT = $(SRCROOT)/dst/i386
DOCROOT = $(SRCROOT)/doc
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
ROOT = $(shell pwd)/../../../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj/modules/$(DIR)
SYMROOT = $(ROOT)/sym/modules
DSTROOT = $(ROOT)/dst/usr/standalone/modules
DOCROOT = $(ROOT)/doc
ifeq ($(BUILT_IN),yes)
override OBJROOT = $(SRCROOT)/obj/i386/boot2_modules/$(DIR)
override SYMROOT = $(SRCROOT)/obj/i386/
override SYMROOT = $(ROOT)/obj/modules/
override OBJROOT = $(ROOT)/obj/boot2_modules/$(DIR)
endif
include ${SRCROOT}/Make.rules
include ${ROOT}/Make.rules
ifeq ($(BUILT_IN),yes)
CFLAGS:= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \
INC = -I$(SRCROOT)/sym/i386/ -I$(SRCROOT)/i386/modules/include/ -Iinclude/ -I$(SRCROOT)/i386/libsaio/ -I$(SRCROOT)/i386/libsa/ -I$(SRCROOT)/i386/include/ -I$(SRCROOT)/i386/boot2/ $(MODULE_INCLUDES)
DEFINES := -D__KLIBC__ $(DEFINES)
MODULE_DEPENDENCIES := $(wildcard $(foreach x,$(MODULE_DEPENDENCIES),$(SYMROOT)/modules/$(x).dylib)) \
MODULE_DEPENDENCIES := $(wildcard $(foreach x,$(MODULE_DEPENDENCIES),$(SYMROOT)/$(x).dylib)) \
$(wildcard $(foreach x,$(MODULE_DEPENDENCIES),$(OBJROOT)/../$(x).dylib))
MODULE_DEPENDENCIES_CMD := $(foreach x,$(MODULE_DEPENDENCIES), -weak_library $(x))
ifeq ($(MODULE_DEFINITION),m)
ifneq ($(BUILT_IN),yes)
# Make this as a *MODULE*
all: dylib
###### Make this as a *MODULE* ######
all: ${OBJROOT} dylib
else
# Module not selected to be compiled as a module
###### Don't Compile Module ######
all:
endif
else
ifeq ($(MODULE_DEFINITION),y)
ifeq ($(BUILT_IN),yes)
# Make this *BUILT IN*
all: dylib_LINKER
####### Make this *BUILT IN* ######
all: ${OBJROOT} dylib_LINKER
else
# Module not selected to be built in
####### Don't build in module ######
all:
endif
else
# Don't compile this module
####### Don't Compile Module ######
all:
endif
endif
dylib_LINKER: $(SRCROOT)/sym/i386/boot_modules.c $(SRCROOT)/sym/i386/boot_modules.h dylib
dylib_LINKER: ${OBJROOT} $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h dylib
dylib: ${OBJROOT} $(SYMROOT)/$(MODULE_NAME).dylib
dylib: ${SYMROOT}/modules/ ${OBJROOT} $(SYMROOT)/modules/$(MODULE_NAME).dylib
ifeq ($(BUILT_IN),yes)
$(SYMROOT)/modules/$(MODULE_NAME).dylib: $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) $(MODULE_DEPENDENCIES) $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author Makefile
###### Build module into the code binary ######
$(SYMROOT)/$(MODULE_NAME).dylib: $(MODULE_DEPENDENCIES) ${MODULE_OBJECTS} $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author Makefile
@echo "\t[LD] $(MODULE_NAME).dylib"
@ld -arch i386 -undefined dynamic_lookup \
-dylib -read_only_relocs suppress \
else
$(SYMROOT)/modules/$(MODULE_NAME).dylib: $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) $(MODULE_DEPENDENCIES) $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author $(SRCROOT)/obj/i386/boot2/Symbols_LINKER_ONLY.dylib Makefile
##### BUild module as a seperate module #####
$(SYMROOT)/modules/$(MODULE_NAME).dylib: $(MODULE_DEPENDENCIES) ${MODULE_OBJECTS} $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author $(SRCROOT)/obj/i386/boot2/Symbols_LINKER_ONLY.dylib Makefile
@echo "\t[LD] $(MODULE_NAME).dylib"
@ld -arch i386 \
endif
clean:
@echo "\t[RM] $(SYMROOT)/modules/$(MODULE_NAME).dylib"
@echo "\t[RM] $(OBJROOT)"
@echo "\t[RM] $(DSTROOT)"
@echo "\t[RM] $(SRCROOT)/revision"
@echo "\t[RM] $(SRCROOT)/i386/modules/module_includes"
@rm -rf $(SYMROOT)/modules/$(MODULE_NAME).dylib &> /dev/null
@rm -rf $(OBJROOT) $(DSTROOT) $(SRCROOT)/revision $(SRCROOT)/i386/modules/module_includes
#clean:
#@echo "\t[RM] $(SYMROOT)/modules/$(MODULE_NAME).dylib"
#@echo "\t[RM] $(OBJROOT)"
#@echo "\t[RM] $(DSTROOT)"
#@echo "\t[RM] $(SRCROOT)/revision"
#@echo "\t[RM] $(SRCROOT)/i386/modules/module_includes"
#@rm -rf $(SYMROOT)/modules/$(MODULE_NAME).dylib &> /dev/null
#@rm -rf $(OBJROOT) $(DSTROOT) $(SRCROOT)/revision $(SRCROOT)/i386/modules/module_includes
${SYMROOT}/modules/:
@echo "\t[MKDIR] $@"
@$(MKDIRS) $@
.PHONY: $(SYMROOT)/boot_modules.h
.PHONY: $(SYMROOT)/boot_modules.c
.PHONY: $(SRCROOT)/sym/i386/boot_modules.h
.PHONY: $(SRCROOT)/sym/i386/boot_modules.c
$(SRCROOT)/sym/i386/boot_modules.c:
$(SYMROOT)/boot_modules.c:
@echo "\tstart_built_in_module(\"$(MODULE_NAME)\", \"$(MODULE_AUTHOR)\", \"$(MODULE_DESCRIPTION)\", 0, 0, &$(MODULE_START));" >> $@
$(SRCROOT)/sym/i386/boot_modules.h:
$(SYMROOT)/boot_modules.h:
@echo "void $(MODULE_START)(); // $(MODULE_NAME)" >> $@
$(OBJROOT)/$(MODULE_NAME).author: Makefile
branches/xZen/src/modules/klibc/Makefile
2424
2525
2626
27
27
snprintf.o vsnprintf.o sscanf.o vsscanf.o\
fwrite.o fprintf.o vfprintf.o printf.o
include ../MakeInc.dir
include ../MakeInc.dir
branches/xZen/src/modules/Cconfig
1818
1919
2020
21
21
2222
2323
24
25
26
27
28
24
25
26
27
28
2929
30
30
3131
menu "Modules"
# NOTE: ModuleSystem should always be compiled in
source "src/modules/ModuleSystem/Cconfig"
source "modules/ModuleSystem/Cconfig"
# NOTE BiosDisk, FileSystem should both be enabled as well as at least one file system driver
source "src/modules/klibc/Cconfig"
#source "src/modules/objc/Cconfig"
source "src/modules/uClibcxx/Cconfig"
source "src/modules/Disk/Cconfig"
source "src/modules/FileSystem/Cconfig"
source "modules/klibc/Cconfig"
#source "modules/objc/Cconfig"
source "modules/uClibcxx/Cconfig"
source "modules/Disk/Cconfig"
source "modules/FileSystem/Cconfig"
source "src/modules/HelloWorld/Cconfig"
source "modules/HelloWorld/Cconfig"
endmenu
branches/xZen/src/modules/ModuleSystem/Makefile
88
99
1010
11
11
1212
1313
DIR = ModuleSystem
MODULE_OBJS = modules_support.o modules.o
MODULE_OBJS = modules_support modules
include ../MakeInc.dir
branches/xZen/src/modules/Makefile
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
108
11
9
1210
1311
14
12
1513
1614
1715
......
2321
2422
2523
26
27
24
25
2826
29
30
31
32
33
34
35
36
37
38
27
28
29
30
3931
4032
4133
#Makefile for i386 modules
SRCROOT = $(shell pwd)/../../
OBJROOT = $(SRCROOT)/obj/i386/modules/
SYMROOT = $(SRCROOT)/sym/i386
DSTROOT = $(SRCROOT)/dst/i386
DOCROOT = $(SRCROOT)/doc
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
#Makefile for modules
ROOT = $(shell pwd)/../../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj/modules
SYMROOT = $(ROOT)/sym/modules
DSTROOT = $(ROOT)/dst/usr/standalone/modules
DOCROOT = $(ROOT)/doc
include ${SRCROOT}/Make.rules
include ${ROOT}/Make.rules
# The order of building is important.
SUBDIRS = ModuleSystem klibc objc uClibcxx HelloWorld Disk FileSystem
SUBDIRS = ModuleSystem klibc uClibcxx HelloWorld Disk FileSystem
CFLAGS= -O3 $(MORECPP) -arch i386 -g -static
ifeq (${CONFIG_MODULESYSTEM_MODULE}, y)
all: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h
@for i in ${SUBDIRS}; \
do \
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( cd $$i; $(MKDIRS) $(OBJROOT)/$$i; ${MAKE} \
"OBJROOT=$(OBJROOT)/$$i" \
"SYMROOT=$(SYMROOT)/" \
"DSTROOT=$(DSTROOT)/" \
"SRCROOT=$(SRCROOT)" \
"RC_ARCHS=$(RC_ARCHS)" \
"RC_KANJI=$(RC_KANJI)" \
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$(RC_CFLAGS)" $@ \
) || exit $$?; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
$@ \
) || exit $$?; \
done
@# Finish up boot_modules.c
branches/xZen/src/i386/Make.rules
1
1
2
3
4
25
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
6
7
8
9
4510
4611
4712
48
49
50
13
14
15
5116
5217
5318
54
55
56
19
20
21
5722
5823
5924
60
61
62
25
26
27
28
29
6330
6431
6532
66
67
68
33
34
35
6936
7037
7138
72
73
74
75
76
39
40
41
42
43
7744
78
79
80
81
82
83
84
85
86
87
88
89
9045
91
92
93
46
47
9448
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
49
50
-include $(SRCROOT)/auto.conf
X86_AS = /usr/bin/as
X86_LD = /usr/bin/ld
X86_CC = /usr/bin/gcc-4.2
X86_CPP = /usr/bin/g++-4.2
export USE_APPLE_PB_SUPPORT = all
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
AS = as
LD = ld
CC = cc
CPP = g++
PAX = /bin/pax
NASM = $(shell which nasm) -p $(SRCROOT)/autoconf.inc
CFLAGS= $(CONFIG_OPTIMIZATION_LEVEL) -g -Wmost -Werror
CPPFLAGS = $(MORECPP) -g -Wmost -Werror -fno-exceptions -fno-rtti
DEFINES=
#
# Common makefile targets.
#
# Define these variables (if desired) in directory makefiles:
#DIRS_NEEDED
#INSTALLDIR
#SRCROOT
#
# Toggle this as to whether you want a frame pointer (%ebp) to be used. It is
# invaluable for debugging the booter. For example using GDB attached to VMware.
# In fact, it's so invaluable that it's now the default. Not only that but the
# compiler seems to generate slightly smaller code and the real<->prot code
# clearly handles it appropriately so I have no idea why Apple omitted it.
#OMIT_FRAME_POINTER_CFLAG=-fomit-frame-pointer
OMIT_FRAME_POINTER_CFLAG=
$(OBJROOT)/%.o: %.c
@echo "\t[CC] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
##### i386 Rules #####
$(OBJROOT)/%.i386o: %.c $(OBJROOT)
@echo "\t[CC:I386] $<"
@$(X86_CC) -arch i386 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o32: %.c
@echo "\t[CC32] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) -arch i386 $< -o $@ \
$(OBJROOT)/%.i386o: %.m $(OBJROOT)
@echo "\t[M:I386] $<"
@$(X86_CC) -arch i386 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o64: %.c
@echo "\t[CC64] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) -arch x86_64 $< -o $@ \
$(OBJROOT)/%.i386o: %.cpp $(OBJROOT)
@echo "\t[CPP:I386] $<"
@$(X86_CPP) -arch i386 $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.m
@echo "\t[M] $<"
@$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
##### x86_64 Rules #####
$(OBJROOT)/%.x86_64o: %.c $(OBJROOT)
@echo "\t[CC:X86_64] $<"
@$(X86_CC) -arch x86_64 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.cpp
@echo "\t[CPP] $<"
@$(CPP) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
$(OBJROOT)/%.x86_64o: %.m $(OBJROOT)
@echo "\t[M:X86_64] $<"
@$(X86_CC) -arch x86_64 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/boot2.o:
@echo "\t[AS] boot2.s"
@$(CC) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) boot2.s \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
$(OBJROOT)/%.x86_64o: %.x86_64 $(OBJROOT)
@echo "\t[CPP:X86_64] $<"
@$(X86_CPP) -arch i386 $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.s
@echo "\t[AS] $<"
@$(CC) $(CPPFLAGS) -c $(INC) -arch i386 -o $@ $< \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
# This breaks make, must use make all (FIXME)
$(DIRS_NEEDED) $(INSTALLDIR) $(OBJROOT) $(SYMROOT):
@echo "\t[MKDIR] $@"
@$(MKDIRS) $@
$(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/.config:
@echo "\t[MAKE] config"
@cd $(SRCROOT) && make rebuild_config
ACTUAL_OBJECTS := ${ACTUAL_OBJECTS} $(addsuffix .i386o , $(addprefix $(OBJROOT)/, $(OBJECTS)))
ACTUAL_OBJECTS := ${ACTUAL_OBJECTS} $(addsuffix .x86_64o, $(addprefix $(OBJROOT)/, $(OBJECTS)))
.PHONY: clean
clean:
@echo "\t[RM] $(OBJROOT)"
@echo "\t[RM] $(SYMROOT)"
@echo "\t[RM] $(DSTROOT)"
@echo "\t[RM] $(SRCROOT)/revision"
@echo "\t[RM] $(SRCROOT)/i386/modules/module_includes"
@echo "\t[RM] $(SRCROOT)/auto.conf"
@echo "\t[RM] $(SRCROOT)/autoconf.h"
@echo "\t[RM] $(SRCROOT)/autoconf.inc"
@rm -rf $(OBJROOT) $(SYMROOT) $(DSTROOT) $(SRCROOT)/revision \
$(SRCROOT)/i386/modules/module_includes \
$(SRCROOT)/auto.conf \
$(SRCROOT)/autoconf.h \
$(SRCROOT)/autoconf.inc
.DEFAULT_GOAL := all
MODULE_OBJECTS := ${MODULE_OBJECTS} $(addsuffix .i386o, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
MODULE_OBJECTS := ${MODULE_OBJECTS} $(addsuffix .x86_64o, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
branches/xZen/src/i386/Cconfig
88
99
1010
11
11
1212
13
13
1414
15
15
1616
17
17
1818
19
19
---help---
Specify the level to compile chameleon with.
source "src/i386/boot0/Cconfig"
source "i386/boot0/Cconfig"
source "src/i386/boot1/Cconfig"
source "i386/boot1/Cconfig"
source "src/i386/boot2/Cconfig"
source "i386/boot2/Cconfig"
source "src/i386/libsa/Cconfig"
source "i386/libsa/Cconfig"
source "src/i386/libsaio/Cconfig"
source "i386/libsaio/Cconfig"
branches/xZen/src/i386/libsa/Makefile
1
2
3
4
5
6
7
8
1
2
3
4
5
6
97
108
11
9
1210
1311
1412
SRCROOT = $(shell pwd)/../../
OBJROOT = $(SRCROOT)/obj/i386/libsa
SYMROOT = $(SRCROOT)/sym/i386
DSTROOT = $(SRCROOT)/dst/i386
DOCROOT = $(SRCROOT)/doc
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
ROOT = $(shell pwd)/../../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj/i386
SYMROOT = $(ROOT)/sym/i386
DSTROOT = $(ROOT)/dst/usr/standalone/i386
DOCROOT = $(ROOT)/doc
DIR = libsa
include ${SRCROOT}/Make.rules
include ${ROOT}/Make.rules
LIBSAIODIR = ../libsaio
branches/xZen/src/i386/Makefile
33
44
55
6
7
8
9
10
11
12
13
6
7
8
9
10
11
1412
15
13
1614
1715
18
1916
2017
2118
22
23
24
25
26
27
28
29
30
31
32
33
34
35
19
3620
37
3821
39
40
41
22
23
4224
43
44
45
46
47
48
49
50
51
52
25
26
27
28
5329
5430
5531
56
57
32
33
5834
59
60
61
62
63
64
65
66
67
68
35
36
37
38
6939
7040
7141
#
# these paths are only valid in subdirectories of this directory
#
SRCROOT = $(shell pwd)/../
OBJROOT = $(SRCROOT)/obj/i386
SYMROOT = $(SRCROOT)/sym/i386
DSTROOT = $(SRCROOT)/dst/i386
DOCROOT = $(SRCROOT)/doc
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
ROOT = $(shell pwd)/../../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj/i386
SYMROOT = $(ROOT)/sym/i386
DSTROOT = $(ROOT)/dst/usr/standalone/i386
DOCROOT = $(ROOT)/doc
include ${SRCROOT}/Make.rules
include ${ROOT}/Make.rules
# The order of building is important.
SUBDIRS_PRE = util
SUBDIRS = libsa libsaio boot0 boot1 boot2 cdboot modules
all:
@for i in ${SUBDIRS_PRE}; \
do \
echo ================= make $@ for $$i =================; \
( cd $$i; ${MAKE} \
"OBJROOT=$(OBJROOT)/$$i" \
"SYMROOT=$(SYMROOT)" \
"DSTROOT=$(DSTROOT)" \
"SRCROOT=$(SRCROOT)" \
"RC_ARCHS=$(RC_ARCHS)" \
"RC_KANJI=$(RC_KANJI)" \
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$(RC_CFLAGS)" $@ \
) || exit $$?; \
done
@#cd modules; ${MAKE} BUILT_IN=yes $@
@cd modules; ${MAKE} BUILT_IN=yes $@
@for i in ${SUBDIRS}; \
do \
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( cd $$i; ${MAKE} \
"OBJROOT=$(OBJROOT)/$$i" \
"SYMROOT=$(SYMROOT)" \
"DSTROOT=$(DSTROOT)" \
"SRCROOT=$(SRCROOT)" \
"RC_ARCHS=$(RC_ARCHS)" \
"RC_KANJI=$(RC_KANJI)" \
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$(RC_CFLAGS)" $@ \
) || exit $$?; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
$@ \
) || exit $$?; \
done
config rebuild_config:
@for i in config; \
do \
@for i in config; \
do \
echo ================= make $@ for $$i =================; \
( cd $$i; ${MAKE} \
"OBJROOT=$(OBJROOT)/$$i" \
"SYMROOT=$(SYMROOT)" \
"DSTROOT=$(DSTROOT)" \
"SRCROOT=$(SRCROOT)" \
"RC_ARCHS=$(RC_ARCHS)" \
"RC_KANJI=$(RC_KANJI)" \
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$(RC_CFLAGS)" $@ \
) || exit $$?; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
$@ \
) || exit $$?; \
done
branches/xZen/src/Makefile
11
2
3
4
5
6
7
28
3
4
5
6
7
9
810
9
10
11
12
13
11
12
13
14
15
1416
15
16
17
18
19
20
21
22
23
24
17
18
19
20
2521
22
2623
27
28
29
24
#Makefile
ROOT = $(shell pwd)/../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj
SYMROOT = $(ROOT)/sym
DSTROOT = $(ROOT)/dst
DOCROOT = $(ROOT)/doc
SRCROOT = $(shell pwd)/../
OBJROOT = $(SRCROOT)/obj
SYMROOT = $(SRCROOT)/sym
DSTROOT = $(SRCROOT)/dst
DOCROOT = $(SRCROOT)/../doc
SUBDIRS=util modules i386 ppc arm
include ${SRCROOT}/Make.rules
config rebuild_config:
@for i in config; \
do \
all:
@echo ================= make $@ BUILT_IN=yes for modules =================
@cd modules; ${MAKE} BUILT_IN=yes $@
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( cd $$i; ${MAKE} \
"OBJROOT=$(OBJROOT)/$$i" \
"SYMROOT=$(SYMROOT)" \
"DSTROOT=$(DSTROOT)" \
"SRCROOT=$(SRCROOT)" \
"RC_ARCHS=$(RC_ARCHS)" \
"RC_KANJI=$(RC_KANJI)" \
"JAPANESE=$(JAPANESE)" \
"RC_CFLAGS=$(RC_CFLAGS)" $@ \
) || exit $$?; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
$@ \
) || exit $$?; \
done
.PHONY: config
.PHONY: rebuild_config
include ${ROOT}/Make.rules
branches/xZen/src/util/fdisk/Makefile
11
2
2
33
44
55
......
77
88
99
10
1110
11
1212
13
14
15
1613
17
18
19
20
21
22
2314
2415
2516
2617
18
19
2720
2821
2922
3023
31
32
33
34
35
36
37
38
24
25
26
27
28
29
30
31
32
3933
40
34
35
36
4137
38
4239
43
4440
4541
4642
SRCROOT = $(shell pwd)/../../../
OBJROOT = $(SRCROOT)/obj/i386/util/fdisk
override OBJROOT = $(SRCROOT)/obj/i386/util/fdisk
SYMROOT = $(SRCROOT)/sym/i386
DSTROOT = $(SRCROOT)/dst/i386
DOCROOT = $(SRCROOT)/doc
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
DIR = fdisk
OBJECTS = cmd disk fdisk getrawpartition mbr misc opendev part user auto
include ${SRCROOT}/Make.rules
LDFLAGS := $(LDFALGS) -mmacosx-version-min=10.5
OBJS = cmd.o32 disk.o32 fdisk.o32 getrawpartition.o32 mbr.o32 misc.o32 opendev.o32 part.o32 user.o32 auto.o32 \
cmd.o64 disk.o64 fdisk.o64 getrawpartition.o64 mbr.o64 misc.o64 opendev.o64 part.o64 user.o64 auto.o64
PROGRAM = fdisk440
PROGRAM:= $(addprefix $(SYMROOT)/, $(PROGRAM))
include ${ROOT}/Make.rules
ifeq ($(CONFIG_FDISK440),y)
all: $(SYMROOT) $(OBJROOT) $(PROGRAM)
$(PROGRAM): $(addprefix $(OBJROOT)/, $(OBJS))
@echo "\t[LD32] $@_32"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $@_32 $(filter %.o32,$^)
@echo "\t[LD64] $@_64"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $@_64 $(filter %.o64,$^)
@echo "\t[LIPO] $@"
@lipo -create -arch i386 $@_32 -arch x86_64 $@_64 -output $@
@rm $@_32 $@_64
$(PROGRAM): $(ACTUAL_OBJECTS)
@echo "\t[LD:I386] $(@F)"
@$(X86_CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F).i386 $(OBJROOT)/*.i386o
@echo "\t[LD:X86_64] $(@F)"
@$(X86_CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F).x86_64 $(OBJROOT)/*.x86_64o
@echo "\t[LD:PPC] $(@F)"
@$(PPC_CC) $(CFLAGS) $(PPC_LDFLAGS) $(LDFLAGS) $(DEFINES) -arch ppc -o $(SYMROOT)/$(@F).ppc $(OBJROOT)/*.ppco
@#echo "\t[LD:ARM] $(@F)"
@#$(ARM_CC) $(CFLAGS) $(ARM_LDFLAGS) $(LDFLAGS) $(DEFINES) -arch arm -o $(SYMROOT)/$(@F).arm $(OBJROOT)/*.armo
else
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(@F).i386 -arch x86_64 $(SYMROOT)/$(@F).x86_64 -arch ppc $(SYMROOT)/$(@F).ppc -output $(SYMROOT)/$(@F)
@$(RM) $(SYMROOT)/$(@F).i386 $(SYMROOT)/$(@F).x86_64 $(SYMROOT)/$(@F).ppc
else
all:
endif
branches/xZen/src/util/Cconfig
77
88
99
10
10
1111
1212
1313
chameleon boot sequence.
When in doubt, say "Y".
source "src/util/fdisk/Cconfig"
source "util/fdisk/Cconfig"
config OPENUP
bool "openUp utility"
branches/xZen/src/util/Makefile
33
44
55
6
7
8
9
10
11
12
13
146
7
8
9
10
11
12
1513
1614
17
1815
1916
20
17
2118
22
2319
2420
25
21
2622
2723
2824
2925
30
26
3127
3228
3329
......
3733
3834
3935
36
37
38
39
40
4041
4142
42
43
44
45
46
47
48
49
5043
5144
45
46
47
48
49
50
51
52
53
5254
55
56
57
58
59
5360
5461
5562
......
5764
5865
5966
60
67
68
# we'll just keep the generated files in this directory
# and install them directly, rather than generating them again.
#
SRCROOT = $(shell pwd)/../../
OBJROOT = $(SRCROOT)/obj/i386/util
SYMROOT = $(SRCROOT)/sym/i386
DSTROOT = $(SRCROOT)/dst/i386
DOCROOT = $(SRCROOT)/doc
IMGROOT = $(SRCROOT)/sym/cache
IMGSKELROOT = $(SRCROOT)/imgskel
CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot
ROOT = $(shell pwd)/../../
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj/util
SYMROOT = $(ROOT)/sym/util
DSTROOT = $(ROOT)/dst/usr/bin/
DOCROOT = $(ROOT)/doc
DIR = util
include ${SRCROOT}/Make.rules
PROGRAMS = machOconv dyldsymboltool
OBJECTS = dyldsymboltool.o32 dyldsymboltool.o64 machOconv.o32 machOconv.o64
OBJECTS = dyldsymboltool machOconv
ifeq (${CONFIG_BDMESG}, y)
PROGRAMS += bdmesg
OBJECTS += bdmesg.o32 bdmesg.o64
OBJECTS += bdmesg
endif
ifeq (${CONFIG_OPENUP}, y)
PROGRAMS += openUp
OBJECTS += openUp.o64 openUp.o32
OBJECTS += openUp
endif
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
include ${SRCROOT}/../Make.rules
all: $(DIRS_NEEDED) $(SYMPROG) fdisk440
$(SYMPROG): $(addprefix $(OBJROOT)/, $(OBJECTS))
@echo "\t[LD32] $(@F)_32"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/$(@F).o32
@echo "\t[LD64] $(@F)_64"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/$(@F).o64
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(@F)_32 -arch x86_64 $(SYMROOT)/$(@F)_64 -output $(SYMROOT)/$(@F)
@$(RM) $(SYMROOT)/$(@F)_32 $(SYMROOT)/$(@F)_64
$(SYMPROG): ${ACTUAL_OBJECTS}
@echo "\t[LD:I386] $(@F)"
@$(X86_CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F).i386 $(OBJROOT)/$(@F).i386o
@echo "\t[LD:X86_64] $(@F)"
@$(X86_CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F).x86_64 $(OBJROOT)/$(@F).x86_64o
@echo "\t[LD:PPC] $(@F)"
@$(PPC_CC) $(CFLAGS) $(PPC_LDFLAGS) $(LDFLAGS) $(DEFINES) -arch ppc -o $(SYMROOT)/$(@F).ppc $(OBJROOT)/$(@F).ppco
@#echo "\t[LD:ARM] $(@F)"
@#$(ARM_CC) $(CFLAGS) $(ARM_LDFLAGS) $(LDFLAGS) $(DEFINES) -arch arm -o $(SYMROOT)/$(@F).arm $(OBJROOT)/$(@F).armo
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(@F).i386 -arch x86_64 $(SYMROOT)/$(@F).x86_64 -arch ppc $(SYMROOT)/$(@F).ppc -output $(SYMROOT)/$(@F)
@$(RM) $(SYMROOT)/$(@F).i386 $(SYMROOT)/$(@F).x86_64 $(SYMROOT)/$(@F).ppc
.PHONY: fdisk440
fdisk440:
@echo ================= make all for fdisk =================;
#dependencies
-include $(OBJROOT)/Makedep
-include $(OBJROOT)/Makedep
branches/xZen/Makefile
11
2
3
4
5
6
2
3
4
5
6
7
78
8
9
910
1011
1112
13
1214
13
1415
1516
1617
......
2021
2122
2223
23
24
25
24
25
26
27
28
2629
2730
28
29
30
31
32
33
34
35
36
37
38
39
40
41
31
32
33
34
35
4236
43
44
45
46
47
48
49
50
51
52
53
54
55
56
37
38
#Makefile for kernel booter
SRCROOT = $(shell pwd)
OBJROOT = $(SRCROOT)/obj
SYMROOT = $(SRCROOT)/sym
DSTROOT = $(SRCROOT)/dst
DOCROOT = $(SRCROOT)/../doc
ROOT = $(shell pwd)
SRCROOT = ${ROOT}/src
OBJROOT = $(ROOT)/obj
SYMROOT = $(ROOT)/sym
DSTROOT = $(ROOT)/dst
DOCROOT = $(ROOT)/doc
include ${SRCROOT}/Make.rules
include Make.rules
THEME = default
REVISION = `svnversion -n | tr -d [:alpha:] > revision`
VERSION = `cat version`
REVISION = `cat revision`
SUBDIRS="src"
# Currently builds for i386
#
all config rebuild_config: $(SYMROOT) $(OBJROOT) $(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/autoconf.inc $(SRCROOT)/.config $(SYMROOT)/vers.h
for i in $$SUBDIRS; \
do \
all install: $(SYMROOT) $(OBJROOT) rebuild_config
@echo ================= make $@ =================
@for i in ${SUBDIRS}; \
do \
if [ -d $$i ]; then \
echo ================= make $@ for $$i =================; \
( OBJROOT=$(OBJROOT)/$${i}; \
SYMROOT=$(SYMROOT)/$${i}; \
DSTROOT=$(DSTROOT); \
SRCROOT=$(SRCROOT); \
cd $$i; ${MAKE} \
"OBJROOT=$$OBJROOT" \
"SYMROOT=$$SYMROOT" \
"DSTROOT=$$DSTROOT" \
"SRCROOT=$$SRCROOT" \
"ARCHS=$$ARCHS" \
"TARGET=$$i" \
$@ \
) || exit $$?; \
else \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
$@ \
) || exit $$?; \
else \
echo "========= nothing to build for $$i ========="; \
fi; \
done
$(SYMROOT)/vers.h: version
@if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi
@echo "#define BOOT_VERSION \"5.0.132\"" > $@
@echo "#define BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $@
@echo "#define BOOT_CHAMELEONVERSION \"$$VERSION\"" >> $@
@echo "#define BOOT_CHAMELEONREVISION \"$$REVISION\"" >> $@
.PHONY: $(SYMROOT)/vers.h
.PHONY: config
fi; \
done

Archive Download the corresponding diff file

Revision: 1243