Chameleon

Chameleon Commit Details

Date:2011-02-09 07:53:26 (13 years 1 month ago)
Author:Evan Lojewski
Commit:740
Parents: 739
Message:Makefile changes: modules must mow declare dependencies, wildcard has been remoced.
Changes:
M/branches/meklort/i386/modules/KextPatcher/hex_editor.c
M/branches/meklort/i386/modules/KextPatcher/Makefile
M/branches/meklort/i386/modules/ACPIPatcher/Makefile
M/branches/meklort/i386/modules/GUI/Makefile
M/branches/meklort/i386/modules/KextPatcher/kext_patcher.c
M/branches/meklort/i386/modules/MakeInc.dir
M/branches/meklort/i386/modules/uClibc++/Makefile
M/branches/meklort/i386/modules/KextPatcher/include/hex_editor.h
M/branches/meklort/i386/modules/Memory/Makefile

File differences

branches/meklort/i386/modules/KextPatcher/kext_patcher.c
530530
531531
532532
533
533
534534
535535
536536
char* orig_string= XMLCastString(replace);
verbose("Patching %s, replacing %s with %s\n", personalityName, orig_string, nameMatch);
replace_string(orig_string, nameMatch, plistbuffer + XMLCastStringOffset(replace), 10240);
return true;
}
bool patch_bcm_kext(TagPtr plist, char* plistbuffer, void* start)
branches/meklort/i386/modules/KextPatcher/include/hex_editor.h
1212
1313
1414
15
15
1616
1717
int replace_patern(char* pattern, char* repalcement, char* buffer, long buffer_size);
int replace_word(uint32_t pattern, uint32_t repalcement, char* buffer, long buffer_size);
void replace_string(char* find, char* replace, char* string, int length);
void replace_string(char* find, const char* replace, char* string, int length);
void replace_bytes(char* find, int find_size, char* replace, int replace_size, char* exec, int length);
#endif /* H_HEX_EDITOR */
branches/meklort/i386/modules/KextPatcher/hex_editor.c
7575
7676
7777
78
78
7979
8080
8181
return num_replaced;
}
void replace_string(char* find, char* replace, char* string, int length)
void replace_string(char* find, const char* replace, char* string, int length)
{
if(!find ||
!replace ||
branches/meklort/i386/modules/KextPatcher/Makefile
22
33
44
5
6
5
76
87
8
99
1010
1111
......
3939
4040
4141
42
4243
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES =
MODULE_DEPENDENCIES =
DIR = KextPatcher
MODULE_OBJS = kext_patcher.o inflate.o deflate.o zutil.o inftrees.o inffast.o adler32.o hex_editor.o trees.o
OPTIM = -Os -Oz
all embedtheme optionrom: dylib
include ../MakeInc.dir
branches/meklort/i386/modules/ACPIPatcher/Makefile
22
33
44
5
5
66
77
88
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES =
MODULE_DEPENDENCIES = klibc
DIR = ACPIPatcher
branches/meklort/i386/modules/GUI/Makefile
22
33
44
5
5
66
77
88
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES =
MODULE_DEPENDENCIES = Resolution
DIR = GUI
branches/meklort/i386/modules/MakeInc.dir
1111
1212
1313
14
15
16
1417
1518
1619
1720
18
19
20
21
22
2321
2422
2523
......
3634
3735
3836
39
37
4038
4139
4240
4341
4442
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
6943
7044
7145
LIBSAIODIR = ../../libsaio
BOOT2DIR = ../../boot2
MODULE_DEPENDENCIES := $(foreach x,$(MODULE_DEPENDENCIES),-weak_library $(SYMROOT)/$(x).dylib)
INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone
dylib: ${MODULE_OBJS} dylib_final
HAVE_MODULES := $(wildcard $(SYMROOT)/*.dylib)
##IS_CPP_MODULE = $(shell nm $(OBJROOT)/*.o | grep " __Z")
ifneq ($(strip $(HAVE_MODULES)),)
#### Other modules Exist ####
dylib_final:
@rm -rf $(SYMROOT)/$(MODULE_NAME).dylib#ensure module doesn't link with old version of self
@echo "\t[LD] $(MODULE_NAME).dylib"
-L$(SYMROOT)/ \
$(OBJROOT)/*.o \
-weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \
-weak_library $(SYMROOT)/*.dylib \
$(MODULE_DEPENDENCIES) \
-macosx_version_min 10.6 \
-o $(SYMROOT)/$(MODULE_NAME).dylib
@cp -rf include/* ../module_includes/ &> /dev/null || true
else
#### This is the first module ####
dylib_final:
@rm -rf $(SYMROOT)/$(MODULE_NAME).dylib#ensure module doesn't link with old version of self
@echo "\t[LD] $(MODULE_NAME).dylib"
@ld -arch i386 \
-alias $(MODULE_START) start \
-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) \
-L$(OBJROOT)/ \
-L$(OBJROOT)/../ \
-L$(SYMROOT)/ \
$(OBJROOT)/*.o \
-weak_library $(OBJROOT)/../../boot2/Symbols_LINKER_ONLY.dylib \
-macosx_version_min 10.6 \
-o $(SYMROOT)/$(MODULE_NAME).dylib
@cp -rf include/* ../module_includes/ &> /dev/null || true
endif
%.o: %.c
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) -I../include/ -Iinclude/ -I../module_includes/ -D__KLIBC__ $(DEFINES) -c "$<" $(INC) -o "$(OBJROOT)/$@"
branches/meklort/i386/modules/uClibc++/Makefile
33
44
55
6
6
77
88
99
MODULE_VERSION = "0.2.2"
MODULE_COMPAT_VERSION = "0.2.2"
MODULE_START = _uClibcxx_start
MODULE_DEPENDENCIES =
MODULE_DEPENDENCIES = klibc
DIR = uClibc++
# sstream.o fstream.o
branches/meklort/i386/modules/Memory/Makefile
22
33
44
5
5
66
77
88
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES =
MODULE_DEPENDENCIES = klibc
DIR = Memory

Archive Download the corresponding diff file

Revision: 740