Chameleon

Chameleon Commit Details

Date:2011-08-07 04:02:44 (12 years 8 months ago)
Author:Evan Lojewski
Commit:1315
Parents: 1314
Message:Add make install option + universal modules
Changes:
M/branches/xZenu/src/arch/ppc/Makefile
M/branches/xZenu/src/Makefile
M/branches/xZenu/Make.rules
M/branches/xZenu/src/modules/Cconfig
M/branches/xZenu/src/arch/i386/Makefile
M/branches/xZenu/src/arch/armv5/Makefile
M/branches/xZenu/src/modules/TinyXML/Cconfig
M/branches/xZenu/src/modules/Makefile
M/branches/xZenu/Makefile
M/branches/xZenu/src/arch/x86_64/Makefile
M/branches/xZenu/src/util/Makefile
M/branches/xZenu/src/arch/Makefile
M/branches/xZenu/src/modules/HelloWorld/Cconfig
M/branches/xZenu/src/modules/MakeInc.dir
M/branches/xZenu/src/arch/i386/cdboot/Makefile
M/branches/xZenu/src/modules/uClibcxx/Cconfig
M/branches/xZenu/src/modules/klibc/Cconfig
M/branches/xZenu/src/arch/i386/libsaio/Makefile
M/branches/xZenu/src/modules/uClibcxx/Makefile
M/branches/xZenu/src/arch/i386/boot0/Makefile
M/branches/xZenu/src/arch/i386/boot1/Makefile
M/branches/xZenu/src/arch/i386/boot2/Makefile
M/branches/xZenu/src/modules/FileSystem/Makefile
M/branches/xZenu/src/modules/Disk/Cconfig

File differences

branches/xZenu/Make.rules
2929
3030
3131
32
32
3333
3434
3535
NATIVE_OBJECTS = $(addsuffix .o, $(addprefix $(OBJROOT)/, $(OBJECTS)))
$(DIRS_NEEDED) $(INSTALLDIR) $(OBJROOT) $(SYMROOT):
$(DIRS_NEEDED) $(INSTALLDIR) $(OBJROOT) $(SYMROOT) $(DSTROOT):
@echo "\t[MKDIR] $@"
@$(MKDIRS) $@
branches/xZenu/src/modules/uClibcxx/Makefile
44
55
66
7
87
98
109
MODULE_VERSION = "0.2.2"
MODULE_COMPAT_VERSION = "0.2.2"
MODULE_START = $(MODULE_NAME)_start
MODULE_DEPENDENCIES = klibc
DIR = uClibc++
# sstream fstream
branches/xZenu/src/modules/uClibcxx/Cconfig
33
44
55
6
7
8
6
7
98
109
1110
#
config UCLIBCXX_MODULE
tristate "uClibc++ Module"
default m
depends on KLIBC_MODULE
bool "uClibc++ Module"
default y
---help---
Say Y here if you want to enable to use of this module.
branches/xZenu/src/modules/FileSystem/Makefile
66
77
88
9
9
1010
1111
1212
MODULE_START = $(MODULE_NAME)_start
MODULE_DEPENDENCIES = uClibcxx BiosDisk
DIR = HelloWorld
DIR = FileSystem
SUBDIRS = HFS
MODULE_OBJS = Main FileSystem
branches/xZenu/src/modules/MakeInc.dir
101101
102102
103103
104
104
105105
106106
107107
......
119119
120120
121121
122
123
122
123
124124
125125
126126
......
137137
138138
139139
140
140141
142
143
144
145
141146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
142165
143166
144167
......
149172
150173
151174
152
153175
154176
155177
......
165187
166188
167189
190
168191
169192
###### Build module into the code binary ######
$(SYMROOT)/$(MODULE_NAME).${ARCH}.linker.dylib: $(MODULE_DEPENDENCIES) ${MODULE_OBJECTS} $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author Makefile
@echo "\t[LD:${ARCH}] (LINKER) $(MODULE_NAME).${ARCH}dylib"
@echo "\t[LD:${ARCH}] (LINKER) $(MODULE_NAME).${ARCH}.dylib"
@ld -arch ${ARCH} \
-alias _$(MODULE_START) start \
-dylib -read_only_relocs suppress \
-o $@
##### BUild module as a seperate module #####
$(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"
$(SYMROOT)/$(MODULE_NAME).${ARCH}.dylib: $(MODULE_DEPENDENCIES) ${MODULE_OBJECTS} $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author $(ROOT)/obj/${ARCH}/boot2/Symbols_LINKER_ONLY.dylib Makefile
@echo "\t[LD:${ARCH}] $(MODULE_NAME).${ARCH}.dylib"
@ld -arch ${ARCH} \
-alias _$(MODULE_START) start \
-sectcreate __INFO __description $(OBJROOT)/$(MODULE_NAME).desc \
-macosx_version_min 10.6 \
-o $@
$(SYMROOT)/$(MODULE_NAME).dylib:
@# Create Universal Binary
@echo "\t[LIPO] $(MODULE_NAME).dylib"
@lipo -create $(SYMROOT)/$(MODULE_NAME).*.dylib -output $(SYMROOT)/$(MODULE_NAME).dylib
ifeq ($(MODULE_DEFINITION),m)
ifeq ($(BUILT_IN),yes)
install:
else
install: ${DSTROOT} $(SYMROOT)/$(MODULE_NAME).dylib
@echo "\t[CP] $(MODULE_NAME).dylib"
@cp $(SYMROOT)/$(MODULE_NAME).dylib ${DSTROOT}
endif
else
install:
endif
#clean:
#@echo "\t[RM] $(SYMROOT)/modules/$(MODULE_NAME).dylib"
#@echo "\t[RM] $(OBJROOT)"
#@rm -rf $(OBJROOT) $(DSTROOT) $(SRCROOT)/revision $(SRCROOT)/i386/modules/module_includes
.PHONY: $(SYMROOT)/boot_modules.h
.PHONY: $(SYMROOT)/boot_modules.c
$(OBJROOT)/$(MODULE_NAME).desc: Makefile
@echo "$(MODULE_DESCRIPTION)" > $@
#dependencies
-include $(OBJROOT)/Makedep
branches/xZenu/src/modules/TinyXML/Cconfig
55
66
77
8
98
109
config TINYXML_MODULE
tristate "TinyXML"
default y
depends on UCLIBCXX_MODULE
---help---
Say Y here if you want to enable to use of this module.
branches/xZenu/src/modules/klibc/Cconfig
33
44
55
6
7
6
7
88
99
1010
#
config KLIBC_MODULE
tristate "klibc Module"
default m
bool "klibc Module"
default y
---help---
Say Y here if you want to enable the use of this module.
branches/xZenu/src/modules/Cconfig
11
22
33
4
5
6
4
5
76
87
9
8
109
1110
1211
......
1817
1918
2019
20
21
22
23
24
25
2126
2227
2328
#
# Chameleon Modules
#
config MODULESYSTEM_MODULE
bool "Module System"
config MODULES
bool "Modules"
default y
---help---
Say Y here if you want to enable to use of modules.
Say Y here if you want to enable the use of modules.
config MODULE_DEBUG
bool "debug support"
menu "Modules"
# NOTE: ModuleSystem should always be compiled in
config MODULESYSTEM_MODULE
bool "Module System"
default y
---help---
Say Y here if you want to enable to use of modules.
source "modules/ModuleSystem/Cconfig"
# NOTE BiosDisk, FileSystem should both be enabled as well as at least one file system driver
branches/xZenu/src/modules/Disk/Cconfig
55
66
77
8
98
109
config DISK_MODULE
tristate "Disk"
default y
depends on UCLIBCXX_MODULE
---help---
Say Y here if you want to enable to use of this module.
branches/xZenu/src/modules/HelloWorld/Cconfig
55
66
77
8
98
109
1110
config HELLOWORLD_MODULE
tristate "HelloWorld Module"
default n
depends on UCLIBCXX_MODULE
---help---
Say Y here if you want to enable to use of this module.
branches/xZenu/src/modules/Makefile
2020
2121
2222
23
23
2424
2525
2626
ifeq (${CONFIG_MODULESYSTEM_MODULE}, y)
all: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h
all install: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
branches/xZenu/src/Makefile
88
99
1010
11
11
1212
1313
1414
1515
1616
1717
18
18
1919
2020
2121
SUBDIRS=util arch modules
all:
all install:
@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 arch $(ARCH) =================; \
( \
cd $$i; ${MAKE}ARCH=${ARCH} \
cd $$i; ${MAKE}ARCHS="${ARCHS}" ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZenu/src/arch/ppc/Makefile
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
# The order of building is important.
SUBDIRS = libclite ci
all: ${OBJROOT} ${SYMROOT}
all install: ${OBJROOT} ${SYMROOT}
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( \
cd $$i; ${MAKE} \
cd $$i; ${MAKE} ARCHS="${ARCHS}" ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZenu/src/arch/i386/libsaio/Makefile
3535
3636
3737
38
39
3840
3941
4042
include ${ROOT}/Make.rules
install:
all: $(OBJROOT) $(SYMROOT) $(LIBS)
$(LIBS): ${ACTUAL_OBJECTS}
branches/xZenu/src/arch/i386/boot0/Makefile
88
99
1010
11
12
13
1411
1512
1613
17
14
1815
1916
2017
2118
2219
20
21
22
23
2324
2425
include ${ROOT}/Make.rules
DIRS_NEEDED =
BOOT0_OBJS = boot0 boot0hfs boot0md chain0
BOOT0_OBJS := $(addprefix $(SYMROOT)/, $(BOOT0_OBJS))
all: $(SYMROOT) $(BOOT0_OBJS)
all: ${DIRS_NEEDED} $(SYMROOT) $(BOOT0_OBJS)
$(BOOT0_OBJS):
@echo "\t[NASM] $(@F)"
@$(NASM) $(@F).s -o $@
install: ${DSTROOT} ${BOOT0_OBJS}
@echo "\t[CP] boot0*"
@cp ${BOOT0_OBJS} ${DSTROOT}
#dependencies
branches/xZenu/src/arch/i386/boot1/Makefile
2525
2626
2727
28
29
30
2831
32
2933
3034
3135
all: $(SYMROOT) $(PROGRAMS)
install: ${DSTROOT} ${PROGRAMS}
@echo "\t[CP] boot1*"
@cp ${PROGRAMS} ${DSTROOT}
$(PROGRAMS):
@echo "\t[NASM] $(@F)"
@$(NASM) $(@F).s -o $@
branches/xZenu/src/arch/i386/boot2/Makefile
5656
5757
5858
59
60
61
62
5963
60
6164
65
6266
63
6467
68
6569
70
6671
6772
6873
include ${ROOT}/Make.rules
install: ${DSTROOT} $(SYMROOT)/boot
@echo "\t[CP] boot"
@cp $(SYMROOT)/boot ${DSTROOT}
@# TODO: copy Symbols (linker) so that other can extend w/o having the source
all: $(DIRS_NEEDED) $(OBJROOT) $(SYMROOT) boot
all: $(DIRS_NEEDED) $(OBJROOT) $(SYMROOT) $(SYMROOT)/boot
boot: $(SYMROOT)/embedded.h $(ACTUAL_OBJECTS) $(addprefix $(SYMROOT)/, $(LIBDEP))
$(SYMROOT)/boot: $(SYMROOT)/embedded.h $(ACTUAL_OBJECTS) $(addprefix $(SYMROOT)/, $(LIBDEP))
@${MKDIRS} $(OBJROOT)/../boot2_modules/
@echo "\t[LD] boot.sys"
@$(CC) -Wl,-segaddr,__INIT,$(BOOT2ADDR) -Wl,-segalign,20 -Wl,-preload \
branches/xZenu/src/arch/i386/cdboot/Makefile
1212
1313
1414
15
16
17
18
19
1520
1621
1722
all: $(DIRS_NEEDED) $(SYMROOT)/cdboot
install: ${DSTROOT} $(SYMROOT)/cdboot
@echo "\t[CP] cdboot"
@cp $(SYMROOT)/cdboot ${DSTROOT}
$(SYMROOT)/cdboot:
@echo "\t[NASM] cdboot.s"
@$(NASM) cdboot.s -o $(SYMROOT)/cdboot
branches/xZenu/src/arch/i386/Makefile
1515
1616
1717
18
19
20
21
18
2219
2320
2421
2522
26
23
2724
2825
2926
# The order of building is important.
SUBDIRS = libsaio boot0 boot1 boot2 cdboot
all: ${OBJROOT} ${SYMROOT}
@#cd modules; ${MAKE} BUILT_IN=yes $@
all install: ${OBJROOT} ${SYMROOT}
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( \
cd $$i; ${MAKE} \
cd $$i; ${MAKE}ARCHS="${ARCHS}" ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZenu/src/arch/armv5/Makefile
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
# The order of building is important.
SUBDIRS =
all: ${OBJROOT} ${SYMROOT}
all install: ${OBJROOT} ${SYMROOT}
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( \
cd $$i; ${MAKE} \
cd $$i; ${MAKE} ARCHS="${ARCHS}" ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZenu/src/arch/Makefile
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
# The order of building is important.
SUBDIRS = ${ARCH}
all: ${OBJROOT} ${SYMROOT}
all install: ${OBJROOT} ${SYMROOT}
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( \
cd $$i; ${MAKE} \
cd $$i; ${MAKE}ARCHS="${ARCHS}" ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZenu/src/arch/x86_64/Makefile
1515
1616
1717
18
18
1919
2020
2121
2222
23
23
2424
2525
2626
# The order of building is important.
SUBDIRS =
all: ${OBJROOT} ${SYMROOT}
all install: ${OBJROOT} ${SYMROOT}
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( \
cd $$i; ${MAKE} \
cd $$i; ${MAKE} ARCHS="${ARCHS}" ARCH=${ARCH} \
$@ \
) || exit $$?; \
done
branches/xZenu/src/util/Makefile
5050
5151
5252
53
54
5355
5456
5557
@$(MAKE) ARCH=${ARCH} -C fdisk
install:
#dependencies
-include $(OBJROOT)/Makedep
branches/xZenu/Makefile
99
1010
1111
12
13
14
1512
1613
1714
......
2623
2724
2825
29
26
3027
3128
3229
#default architechtures to compile.
ARCHS=i386 ppc armv5
#force a universal binary build
override ARCHS := ${ARCHS} universal
THEME = default
SUBDIRS="src"
if [ -d $$i ]; then \
echo "================= make $@ for $$i arch $$a================="; \
( \
cd $$i; ${MAKE}ROOT=$(ROOT) ARCH=$$a \
cd $$i; ${MAKE}ROOT=$(ROOT) ARCHS="${ARCHS}" ARCH=$$a \
$@ \
) || exit $$?; \
else \

Archive Download the corresponding diff file

Revision: 1315