Chameleon

Chameleon Commit Details

Date:2011-05-12 00:24:49 (8 years 2 months ago)
Author:Evan Lojewski
Commit:799
Parents: 798
Message:More module makefile changes. make clean & make now work from the modules directory, as wel as module subdirectories.
Changes:
M/trunk/i386/modules/Makefile
M/trunk/i386/modules/MakeInc.dir

File differences

trunk/i386/modules/MakeInc.dir
11
2
2
33
44
55
......
77
88
99
10
10
11
1112
13
1214
15
16
17
18
19
20
21
1322
1423
15
24
1625
1726
1827
......
3241
3342
3443
35
44
3645
3746
3847
48
3949
4050
4151
......
4454
4555
4656
57
58
59
60
61
62
63
64
65
4766
4867
4968
5069
51
70
5271
5372
54
73
74
75
5576
5677
78
5779
5880
59
60
61
OBJROOT = ../../../obj/i386/modules/$(DIR)
SYMROOT = ../../../sym/i386/
SYMROOT = ../../../sym/i386/modules/
DSTROOT = ../../../dst/i386/
UTILDIR = ../../util
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
MODULE_DEPENDENCIES := $(foreach x,$(MODULE_DEPENDENCIES),-weak_library $(SYMROOT)/modules/$(x).dylib)
MODULE_DEPENDENCIES := $(foreach x,$(MODULE_DEPENDENCIES),-weak_library $(SYMROOT)/$(x).dylib)
MODULE_OBJECTS := $(foreach x,$(MODULE_OBJS),$(OBJROOT)/$(x))
CPP = g++ -fno-exceptions -fno-rtti
ifneq "" "$(wildcard /bin/mkdirs)"
MKDIRS = /bin/mkdirs
else
MKDIRS = /bin/mkdir -p
endif
INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
dylib: ${OBJROOT} ${MODULE_OBJS} dylib_final
dylib: ${OBJROOT} ${MODULE_OBJECTS} dylib_final
dylib_final:
@rm -rf $(SYMROOT)/$(MODULE_NAME).dylib#ensure module doesn't link with old version of self
-weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \
$(MODULE_DEPENDENCIES) \
-macosx_version_min 10.6 \
-o $(SYMROOT)/modules/$(MODULE_NAME).dylib
-o $(SYMROOT)/$(MODULE_NAME).dylib
@cp -rf include/* ../module_includes/ &> /dev/null || true
%.o: %.c
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
@echo "\t[CPP] $<"
@$(CPP) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
$(OBJROOT)/%.o: %.c
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$@"
$(OBJROOT)/%.o: %.cpp
@echo "\t[CPP] $<"
@$(CPP) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$@"
clean:
@echo "\t[RM] $(OBJROOT)"
@rm -rf ${OBJROOT}
@echo "\t[RM] $(SYMROOT)/modules/$(MODULE_NAME).dylib"
@rm -rf $(SYMROOT)/modules/$(MODULE_NAME).dylib &> /dev/null
@rm -rf $(SYMROOT)/$(MODULE_NAME).dylib &> /dev/null
$(DIRS_NEEDED) $(INSTALLDIR) $(SRCROOT):
@echo "\t[MKDIR] $@/"
@$(MKDIRS) $@/
# dependencies
#-include $(OBJROOT)/Makedep
include ../../MakeInc.dir
trunk/i386/modules/Makefile
11
22
33
4
4
55
66
77
......
2121
2222
2323
24
25
26
24
25
26
2727
2828
2929
3030
31
3132
32
33
3334
3435
3536
3637
37
38
39
38
39
40
4041
4142
4243
......
4546
4647
4748
48
49
50
51
52
53
54
49
50
51
52
53
54
55
56
5557
56
57
58
59
60
61
62
#Makefile for i386 modules
# The order of building is important.
SUBDIRS = klibc uClibc++ Resolution
SUBDIRS = klibc uClibc++ Resolution KernelPatcher KextPatcher
#SUBDIRS = klibc uClibc++ Resolution HelloWorld
#
# these paths are only valid in subdirectories of this directory
#
OBJROOT=`pwd`/../../obj/i386/modules/
SYMROOT=`pwd`/../../sym/i386/modules/
DSTROOT=`pwd`/../../dst/i386/modules/
OBJROOT=../../obj/i386/modules/
SYMROOT=../../sym/i386/modules/
DSTROOT=../../dst/i386/modules/
SRCROOT=/tmp
VPATH = $(OBJROOT):$(SYMROOT)
DIRS_NEEDED = $(OBJROOT) $(SYMROOT) module_includes
all embedtheme optionrom tags debug install installhdrs: objroot_dirs
all embedtheme optionrom tags debug: $(DIRS_NEEDED)
@for i in ${SUBDIRS}; \
do \
echo ================= make $@ for $$i =================; \
( cd $$i; $(MKDIRS) $(OBJROOT)/$$i; ${MAKE} \
"OBJROOT=$(OBJROOT)/$$i" \
"SYMROOT=$(SYMROOT)/" \
"DSTROOT=$(DSTROOT)/" \
"OBJROOT=../$(OBJROOT)/$$i" \
"SYMROOT=../$(SYMROOT)/" \
"DSTROOT=../$(DSTROOT)/" \
"SRCROOT=$(SRCROOT)" \
"RC_ARCHS=$(RC_ARCHS)" \
"RC_KANJI=$(RC_KANJI)" \
) || exit $$?; \
done
objroot_dirs:
@rm -rf "$(OBJROOT)"
@mkdir "$(OBJROOT)" &> /dev/null
@rm -rf module_includes
@mkdir module_includes
@rm -rf "$(SYMROOT)/modules/"
@mkdir "$(SYMROOT)/modules/"
clean:
@echo "\t[RM] $(OBJROOT)"
@rm -rf ${OBJROOT}
@echo "\t[RM] $(SYMROOT)"
@rm -rf ${SYMROOT}
@echo "\t[RM] module_includes"
@rm -rf module_includes &> /dev/null
installsrc:
tar cf - . | (cd ${SRCROOT}; tar xfBp -)
include ../MakeInc.dir

Archive Download the corresponding diff file

Revision: 799