Chameleon

Chameleon Commit Details

Date:2011-08-03 04:43:25 (7 years 1 month ago)
Author:Evan Lojewski
Commit:1259
Parents: 1258
Message:Update makefiles + cconfigs for updated folders
Changes:
A/branches/xZen/src/arch/Cconfig
M/branches/xZen/src/arch/x86_64/Make.rules
M/branches/xZen/src/arch/ppc/Make.rules
M/branches/xZen/src/modules/Makefile
M/branches/xZen/Makefile
M/branches/xZen/src/Make.rules
M/branches/xZen/src/Cconfig
M/branches/xZen/src/util/Makefile
M/branches/xZen/src/util/fdisk/Makefile
M/branches/xZen/src/arch/i386/Make.rules
M/branches/xZen/src/modules/MakeInc.dir
M/branches/xZen/src/Makefile
M/branches/xZen/src/arch/armv5/Make.rules
M/branches/xZen/src/arch/i386/Cconfig

File differences

branches/xZen/src/Make.rules
22
33
44
5
6
75
8
9
6
7
8
ifneq ($(ARCH),)
include ${SRCROOT}/arch/${ARCH}/Make.rules
endif
#print transformed OBJECTS
#$(warning ${ACTUAL_OBJECTS})
#$(warning ARCH=${ARCH} OBJ: ${ACTUAL_OBJECTS})
#$(warning ARCH=${ARCH} OBJ: ${MODULE_OBJECTS})
endif
branches/xZen/src/Cconfig
44
55
66
7
7
88
mainmenu "Chameleon Configuration"
source "util/Cconfig"
source "i386/Cconfig"
source "arch/Cconfig"
source "modules/Cconfig"
branches/xZen/src/modules/MakeInc.dir
3939
4040
4141
42
4243
4344
4445
45
4646
4747
4848
......
5151
5252
5353
54
54
5555
5656
5757
......
9898
9999
100100
101
101
102102
103103
104104
105105
106106
107
108
109
107
108
109
110110
111111
112112
......
116116
117117
118118
119
119
120120
121
122
123
124
125
126
127
128
129
130
131
132
133
134121
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
122
123
124
125
126
154127
155
128
156129
157130
158131
159
160
132
133
161134
162
135
163136
164137
165138
endif
include ${ROOT}/Make.rules
UTILDIR = ../../util
LIBSADIR = ../../libsa
LIBSAIODIR = ../../libsaio
MODULE_INCLUDES := $(foreach x,ModuleSystem $(MODULE_DEPENDENCIES),-I$(SRCROOT)/modules/$(x)/include/)
INC = -I$(SRCROOT)/include/ -I$(SRCROOT)/sym/ -I$(SRCROOT)/modules/include/ -Iinclude/ -I$(SRCROOT)/i386/libsaio/ -I$(SRCROOT)/i386/libsa/ -I$(SRCROOT)/i386/include/ -I$(SRCROOT)/i386/boot2/ $(MODULE_INCLUDES)
INC = -I$(SRCROOT)/include/ -I$(SRCROOT)/sym/ -I$(SRCROOT)/modules/include/ -Iinclude/ -I$(SRCROOT)/arch/i386/libsaio/ -I$(SRCROOT)/arch/i386/libsa/ -I$(SRCROOT)/arch/i386/include/ -I$(SRCROOT)/i386/boot2/ $(MODULE_INCLUDES)
DEFINES := -D__KLIBC__ $(DEFINES)
MODULE_DEPENDENCIES := $(wildcard $(foreach x,$(MODULE_DEPENDENCIES),$(SYMROOT)/$(x).dylib)) \
dylib_LINKER: ${OBJROOT} $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h dylib
dylib: ${OBJROOT} $(SYMROOT)/$(MODULE_NAME).dylib
dylib: ${OBJROOT} $(SYMROOT)/$(MODULE_NAME).${ARCH}.dylib
ifeq ($(BUILT_IN),yes)
###### 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:I386] $(MODULE_NAME).dylib"
@ld -arch i386 -undefined dynamic_lookup \
$(SYMROOT)/$(MODULE_NAME).${ARCH}.dylib: $(MODULE_DEPENDENCIES) ${MODULE_OBJECTS} $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author Makefile
@echo "\t[LD:${ARCH}] $(MODULE_NAME).${ARCH}.dylib"
@ld -arch ${ARCH} -undefined dynamic_lookup \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
-macosx_version_min 10.6 \
-sectcreate __INFO __author $(OBJROOT)/$(MODULE_NAME).author \
-sectcreate __INFO __description $(OBJROOT)/$(MODULE_NAME).desc \
-o $(SYMROOT)/$(MODULE_NAME).i386.dylib
-o $(SYMROOT)/$(MODULE_NAME).${ARCH}.dylib
@echo "\t[LD:PPC] $(MODULE_NAME).dylib"
@ld -arch ppc -undefined dynamic_lookup \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
-current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \
-final_output $(MODULE_NAME) \
$(filter %.ppco,$^) \
/usr/lib/dylib1.o \
-macosx_version_min 10.6 \
-sectcreate __INFO __author $(OBJROOT)/$(MODULE_NAME).author \
-sectcreate __INFO __description $(OBJROOT)/$(MODULE_NAME).desc \
-o $(SYMROOT)/$(MODULE_NAME).ppc.dylib
@echo "\t[LD:ARM] $(MODULE_NAME).dylib"
@ld -arch ${ARM_ARCH} -undefined dynamic_lookup \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
-no_uuid \
-current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \
-final_output $(MODULE_NAME) \
$(filter %.armo,$^) \
/Developer/Platforms/iPhoneOS.platform//Developer/SDKs/iPhoneOS4.2.sdk/usr/lib/dylib1.o \
-macosx_version_min 10.6 \
-sectcreate __INFO __author $(OBJROOT)/$(MODULE_NAME).author \
-sectcreate __INFO __description $(OBJROOT)/$(MODULE_NAME).desc \
-o $(SYMROOT)/$(MODULE_NAME).arm.dylib
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(MODULE_NAME).i386.dylib \
-arch ppc $(SYMROOT)/$(MODULE_NAME).ppc.dylib \
-arch ${ARM_ARCH} $(SYMROOT)/$(MODULE_NAME).arm.dylib \
-output $(SYMROOT)/$(MODULE_NAME).dylib
@#@echo "\t[LIPO] $(@F)"
@#@lipo -create -arch i386 $(SYMROOT)/$(MODULE_NAME).i386.dylib \
@# -arch ppc $(SYMROOT)/$(MODULE_NAME).ppc.dylib \
@# -arch ${ARM_ARCH} $(SYMROOT)/$(MODULE_NAME).arm.dylib \
@# -output $(SYMROOT)/$(MODULE_NAME).dylib
@rm $(SYMROOT)/$(MODULE_NAME).i386.dylib $(SYMROOT)/$(MODULE_NAME).ppc.dylib $(SYMROOT)/$(MODULE_NAME).arm.dylib
@#@rm $(SYMROOT)/$(MODULE_NAME).i386.dylib $(SYMROOT)/$(MODULE_NAME).ppc.dylib $(SYMROOT)/$(MODULE_NAME).arm.dylib
else
##### BUild module as a seperate module #####
$(SYMROOT)/$(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"
$(SYMROOT)/$(MODULE_NAME).${ARCH}.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:${ARCH}] $(MODULE_NAME).${ARCH}dylib"
@ld -arch i386 \
@ld -arch ${ARCH} \
-alias _$(MODULE_START) start \
-dylib -read_only_relocs suppress \
-S -x -Z -dead_strip_dylibs \
branches/xZen/src/modules/Makefile
2525
2626
2727
28
28
2929
3030
3131
do \
echo ================= make $@ for $$i =================; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
cd $$i; ${MAKE} ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZen/src/Makefile
66
77
88
9
9
1010
1111
12
13
12
13
1414
1515
16
16
1717
18
18
1919
2020
2121
DSTROOT = $(ROOT)/dst
DOCROOT = $(ROOT)/doc
SUBDIRS=util modules i386 ppc arm
SUBDIRS=util modules arch/${ARCH}
all:
@echo ================= make $@ BUILT_IN=yes for modules =================
@cd modules; ${MAKE} BUILT_IN=yes $@
@echo ================= make $@ BUILT_IN=yes for modules arch $(ARCH) =================
@cd modules; ${MAKE} ARCH=${ARCH} BUILT_IN=yes $@
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
echo ================= make $@ for $$i arch $(ARCH) =================; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE} \
cd $$i; ${MAKE}ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZen/src/arch/ppc/Make.rules
1
2
3
4
1
2
3
4
55
6
7
8
9
10
11
6
7
8
9
10
11
1212
1313
1414
1515
1616
17
17
1818
1919
2020
2121
2222
23
23
2424
2525
2626
2727
2828
29
29
3030
3131
3232
3333
3434
35
35
3636
3737
3838
PPC_AS = /usr/bin/as -arch ${ARCH}
PPC_LD = /usr/bin/ld -arch ${ARCH}
PPC_CC = /usr/bin/gcc-4.2
PPC_CPP = /usr/bin/g++-4.2
TARGET_AS = /usr/bin/as -arch ${ARCH}
TARGET_LD = /usr/bin/ld -arch ${ARCH}
TARGET_CC = /usr/bin/gcc-4.2
TARGET_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"
TARGET_SDK = /Developer/SDKs/MacOSX10.5.sdk/
TARGET_CFLAGS += -I"$(TARGET_SDK)/usr/include"
TARGET_LDFLAGS += -L"$(TARGET_SDK)/usr/lib"
TARGET_LDFLAGS += -L"$(TARGET_SDK)/usr/lib/system/"
TARGET_LDFLAGS += -F"$(TARGET_SDK)/System/Library/Frameworks"
TARGET_LDFLAGS += -F"$(TARGET_SDK)/System/Library/PrivateFrameworks"
##### PPC Rules #####
$(OBJROOT)/%.${ARCH}o: %.c $(OBJROOT)
@echo "\t[CC:PPC] $<"
@$(PPC_CC) -arch ${ARCH} $(PPC_CFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch ${ARCH} $(TARGET_CFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.m $(OBJROOT)
@echo "\t[M:PPC] $<"
@$(PPC_CC) -arch ${ARCH} $(PPC_CFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch ${ARCH} $(TARGET_CFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.cpp $(OBJROOT)
@echo "\t[CPP:PPC] $<"
@$(PPC_CPP) -arch ${ARCH} $(PPC_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
@$(TARGET_CPP) -arch ${ARCH} $(TARGET_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.s
@echo "\t[AS:PPC] $<"
@$(PPC_CC) -arch ${ARCH} $(CPPFLAGS) -c $(INC) -arch ppc -o $@ $< \
@$(TARGET_CC) -arch ${ARCH} $(CPPFLAGS) -c $(INC) -o $@ $< \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
branches/xZen/src/arch/Cconfig
1
2
3
4
5
#
# Chameleon architecture
#
source "arch/i386/Cconfig"
branches/xZen/src/arch/i386/Make.rules
1
2
3
4
1
2
3
4
55
66
77
88
9
9
1010
1111
1212
1313
1414
15
15
1616
1717
1818
1919
2020
21
21
2222
2323
2424
2525
2626
27
27
2828
2929
3030
31
32
31
32
X86_AS = /usr/bin/as
X86_LD = /usr/bin/ld
X86_CC = /usr/bin/gcc-4.2
X86_CPP = /usr/bin/g++-4.2
TARGET_AS = /usr/bin/as
TARGET_LD = /usr/bin/ld
TARGET_CC = /usr/bin/gcc-4.2
TARGET_CPP = /usr/bin/g++-4.2
##### i386 Rules #####
$(OBJROOT)/%.${ARCH}o: %.c $(OBJROOT)
@echo "\t[CC:I386] $<"
@$(X86_CC) -arch i386 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch i386 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.m $(OBJROOT)
@echo "\t[M:I386] $<"
@$(X86_CC) -arch i386 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch i386 $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.cpp $(OBJROOT)
@echo "\t[CPP:I386] $<"
@$(X86_CPP) -arch i386 $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
@$(TARGET_CPP) -arch i386 $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.s
@echo "\t[AS:I386] $<"
@$(X86_CC) $(CPPFLAGS) -c $(INC) -arch i386 -o $@ $< \
@$(TARGET_CC) $(CPPFLAGS) -c $(INC) -o $@ $< \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
ACTUAL_OBJECTS := ${ACTUAL_OBJECTS} $(addsuffix .${ARCH}o , $(addprefix $(OBJROOT)/, $(OBJECTS)))
MODULE_OBJECTS := ${MODULE_OBJECTS} $(addsuffix .${ARCH}o, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
ACTUAL_OBJECTS = $(addsuffix .${ARCH}o , $(addprefix $(OBJROOT)/, $(OBJECTS)))
MODULE_OBJECTS = $(addsuffix .${ARCH}o, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
branches/xZen/src/arch/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 "i386/boot0/Cconfig"
source "arch/i386/boot0/Cconfig"
source "i386/boot1/Cconfig"
source "arch/i386/boot1/Cconfig"
source "i386/boot2/Cconfig"
source "arch/i386/boot2/Cconfig"
source "i386/libsa/Cconfig"
source "arch/i386/libsa/Cconfig"
source "i386/libsaio/Cconfig"
source "arch/i386/libsaio/Cconfig"
branches/xZen/src/arch/armv5/Make.rules
11
22
3
4
5
6
3
4
5
6
77
8
9
10
11
12
13
148
9
10
11
12
13
14
1515
16
1617
1718
1819
19
20
2021
2122
2223
2324
2425
25
26
2627
2728
2829
2930
3031
31
32
3233
3334
3435
3536
3637
37
38
3839
3940
4041
4142
4243
4344
45
CPU = arm926ej-s
ARM_AS = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as -arch ${ARCH}
ARM_LD = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld -arch ${ARCH}
ARM_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -mcpu=${CPU}
ARM_CPP = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -mcpu=${CPU}
TARGET_AS = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as -arch ${ARCH}
TARGET_LD = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld -arch ${ARCH}
TARGET_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -mcpu=${CPU}
TARGET_CPP = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -mcpu=${CPU}
ARM_SDK=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.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"
TARGET_SDK=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/
TARGET_CFLAGS += -I"$(TARGET_SDK)/usr/include"
TARGET_LDFLAGS += -L"$(TARGET_SDK)/usr/lib"
TARGET_LDFLAGS += -L"$(TARGET_SDK)/usr/lib/system/"
TARGET_LDFLAGS += -F"$(TARGET_SDK)/System/Library/Frameworks"
TARGET_LDFLAGS += -F"$(TARGET_SDK)/System/Library/PrivateFrameworks"
##### ARM Rules #####
$(OBJROOT)/%.${ARCH}o: %.c $(OBJROOT)
@echo "\t[CC:ARM] $<"
@$(ARM_CC) -arch ${ARCH} ${AMR_CFLAGS} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch ${ARCH} ${TARGET_CFLAGS} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.m $(OBJROOT)
@echo "\t[M:ARM] $<"
@$(ARM_CC) -arch ${ARCH} ${AMR_CFLAGS} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch ${ARCH} ${TARGET_CFLAGS} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.cpp $(OBJROOT)
@echo "\t[CPP:ARM] $<"
@$(ARM_CPP) -arch ${ARCH} ${AMR_CFLAGS} $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
@$(TARGET_CPP) -arch ${ARCH} ${TARGET_CFLAGS} $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.s
@echo "\t[AS:I386] $<"
@$(ARM_CC) -arch ${ARCH} $(CPPFLAGS) -c $(INC) -o $@ $< \
@$(TARGET_CC) -arch ${ARCH} $(CPPFLAGS) -c $(INC) -o $@ $< \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
ACTUAL_OBJECTS := ${ACTUAL_OBJECTS} $(addsuffix .${ARCH}o, $(addprefix $(OBJROOT)/, $(OBJECTS)))
MODULE_OBJECTS := ${MODULE_OBJECTS} $(addsuffix .${ARCH}o, $(addprefix $(OBJROOT)/, $(MODULE_OBJS)))
branches/xZen/src/arch/x86_64/Make.rules
1
2
3
4
1
2
3
4
55
66
77
88
99
10
10
1111
1212
1313
1414
1515
16
16
1717
1818
1919
2020
2121
22
22
2323
2424
2525
2626
2727
28
28
2929
3030
3131
X86_AS = /usr/bin/as -arch ${ARCH}
X86_LD = /usr/bin/ld -arch ${ARCH}
X86_CC = /usr/bin/gcc-4.2
X86_CPP = /usr/bin/g++-4.2
TARGET_AS = /usr/bin/as -arch ${ARCH}
TARGET_LD = /usr/bin/ld -arch ${ARCH}
TARGET_CC = /usr/bin/gcc-4.2
TARGET_CPP = /usr/bin/g++-4.2
##### x86_64 Rules #####
$(OBJROOT)/%.${ARCH}o: %.c $(OBJROOT)
@echo "\t[CC:X86_64] $<"
@$(X86_CC) -arch ${ARCH} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch ${ARCH} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.m $(OBJROOT)
@echo "\t[M:X86_64] $<"
@$(X86_CC) -arch ${ARCH} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
@$(TARGET_CC) -arch ${ARCH} $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.cpp $(OBJROOT)
@echo "\t[CPP:X86_64] $<"
@$(X86_CPP) -arch ${ARCH} $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
@$(TARGET_CPP) -arch ${ARCH} $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ \
-MD -dependency-file $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.${ARCH}o: %.s
@echo "\t[AS:X86_64] $<"
@$(CC) -arch ${ARCH} $(CPPFLAGS) -c $(INC) -arch x86_64 -o $@ $< \
@$(CC) -arch ${ARCH} $(CPPFLAGS) -c $(INC) -o $@ $< \
-MD -dependency-file $*.d
@md -u $(OBJROOT)/Makedep -f -d $*.d
branches/xZen/src/util/fdisk/Makefile
2020
2121
2222
23
24
25
26
27
28
29
30
23
24
3125
32
33
34
26
27
28
3529
3630
3731
all: $(SYMROOT) $(OBJROOT) $(PROGRAM)
$(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
@echo "\t[LD:${ARCH}] $(@F)"
@$(TARGET_CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch ${ARCH} -o $(SYMROOT)/$(@F).${ARCH} $(ACTUAL_OBJECTS)
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(@F).i386 -arch ppc $(SYMROOT)/$(@F).ppc -output $(SYMROOT)/$(@F)
@$(RM) $(SYMROOT)/$(@F).i386 $(SYMROOT)/$(@F).x86_64 $(SYMROOT)/$(@F).ppc
@#echo "\t[LIPO] $(@F)"
@#lipo -create -arch i386 $(SYMROOT)/$(@F).i386 -arch ppc $(SYMROOT)/$(@F).ppc -output $(SYMROOT)/$(@F)
@#$(RM) $(SYMROOT)/$(@F).i386 $(SYMROOT)/$(@F).x86_64 $(SYMROOT)/$(@F).ppc
else
all:
branches/xZen/src/util/Makefile
2929
3030
3131
32
32
3333
3434
3535
......
3939
4040
4141
42
43
44
45
46
47
48
49
50
42
43
44
5145
46
47
48
5249
53
54
55
56
5750
5851
5952
60
53
6154
6255
6356
LDFLAGS := $(LDFALGS) -framework IOKit -framework CoreFoundation -mmacosx-version-min=10.4
SYMPROG = $(addprefix $(SYMROOT)/, $(PROGRAMS))
SYMPROG = $(addpostfix $(addprefix $(SYMROOT)/, $(PROGRAMS)), ${ARCH})
DIRS_NEEDED = $(OBJROOT) $(SYMROOT)
all: $(DIRS_NEEDED) $(SYMPROG) fdisk440
$(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
$(SYMPROG).${ARCH}: ${ACTUAL_OBJECTS}
@echo "\t[LD:${ARCH}] $(@F)"
@$(TARGET_CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch ${ARCH} -o $(SYMROOT)/$(@F).${ARCH} $(OBJROOT)/$(@F).${ARCH}o
@#echo "\t[LIPO] $(@F)"
@#lipo -create -arch i386 $(SYMROOT)/$(@F).i386 -arch ppc $(SYMROOT)/$(@F).ppc -output $(SYMROOT)/$(@F)
@#$(RM) $(SYMROOT)/$(@F).i386 $(SYMROOT)/$(@F).ppc
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(@F).i386 -arch ppc $(SYMROOT)/$(@F).ppc -output $(SYMROOT)/$(@F)
@$(RM) $(SYMROOT)/$(@F).i386 $(SYMROOT)/$(@F).ppc
.PHONY: fdisk440
fdisk440:
@echo ================= make all for fdisk =================;
@$(MAKE) -C fdisk
@$(MAKE) ARCH=${ARCH} -C fdisk
#dependencies
branches/xZen/Makefile
66
77
88
9
9
10
1011
11
12
13
1214
1315
1416
15
16
17
1817
1918
20
2119
22
23
24
25
2620
2721
28
29
30
31
32
33
34
35
36
37
38
39
40
41
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
DSTROOT = $(ROOT)/dst
DOCROOT = $(ROOT)/doc
include Make.rules
#default architechtures to compile.
ARCHS=i386 ppc armv5
ARCHS="i386 ppc arm"
#force a universal binary build
override ARCHS := ${ARCHS} universal
THEME = default
REVISION = `svnversion -n | tr -d [:alpha:] > revision`
VERSION = `cat version`
SUBDIRS="src"
GENERIC_SUBDIRS = modules
#
# Currently builds for i386
#
all install: $(SYMROOT) $(OBJROOT) rebuild_config
@echo ================= make $@ =================
@for i in ${SUBDIRS}; \
do \
if [ -d $$i ]; then \
echo ================= make $@ for $$i =================; \
( ROOT=$(ROOT); \
ARCHS=$(ARCHS) \
cd $$i; ${MAKE} \
$@ \
) || exit $$?; \
else \
echo "========= nothing to build for $$i ========="; \
fi; \
done
@for a in ${ARCHS}; \
do \
for i in ${SUBDIRS}; \
do \
if [ -d $$i ]; then \
echo "================= make $@ for $$i arch $$a================="; \
( ROOT=$(ROOT); \
cd $$i; ${MAKE}ARCH=$$a \
$@ \
) || exit $$?; \
else \
echo "========= nothing to build for $$i arch $$a========="; \
fi; \
done \
done
include Make.rules

Archive Download the corresponding diff file

Revision: 1259