Chameleon

Chameleon Commit Details

Date:2010-12-13 02:38:23 (8 years 7 months ago)
Author:Evan Lojewski
Commit:657
Parents: 656
Message:More makefile updates, just for fun. Fixed /removed a few warnings.
Changes:
M/branches/meklort/i386/libsaio/smbios_patcher.c
M/branches/meklort/i386/cdboot/Makefile
M/branches/meklort/i386/libsa/Makefile
M/branches/meklort/i386/libsaio/smbios_patcher.h
M/branches/meklort/i386/util/Makefile
M/branches/meklort/i386/modules/MakeInc.dir
M/branches/meklort/i386/libsaio/Makefile
M/branches/meklort/i386/boot0/Makefile
M/branches/meklort/i386/boot1/Makefile
M/branches/meklort/i386/boot2/Makefile
M/branches/meklort/i386/libsaio/xml.c
M/branches/meklort/i386/modules/klibc/limits.h
M/branches/meklort/i386/modules/uClibc++/include/limits
M/branches/meklort/i386/MakeInc.dir

File differences

branches/meklort/i386/libsaio/xml.c
643643
644644
645645
646
647646
648647
649648
650649
651
650
652651
653652
654653
......
685684
686685
687686
687
688688
689689
690690
{
long length;
char * string;
TagPtr tmpTag;
length = FixDataMatchingTag(buffer, kXMLTagString);
if (length == -1) return -1;
tmpTag = NewTag();
TagPtr tmpTag = NewTag();
if (tmpTag == 0) return -1;
string = NewSymbol(buffer);
{
printf("Warning integer is non existant\n");
getc();
tmpTag = NewTag();
tmpTag->type = kTagTypeInteger;
tmpTag->string = 0;
tmpTag->tag = 0;
branches/meklort/i386/libsaio/Makefile
7575
7676
7777
78
79
80
78
79
80
81
82
83
8184
8285
8386
#ranlib $(SYMROOT)/$@
libsaio.a: $(SAIO_EXTERN_OBJS) $(SAIO_OBJS)
rm -f $(SYMROOT)/$(@F)
ar q $(SYMROOT)/$(@F) $^
ranlib $(SYMROOT)/$(@F)
@echo "\t[RM] $(SYMROOT)/$(@F)"
@rm -f $(SYMROOT)/$(@F)
@echo "\t[AR] $@"
@ar q $(SYMROOT)/$(@F) $^ &> /dev/null
@echo "\t[RANLIB] $@"
@ranlib $(SYMROOT)/$(@F)
#saio_internal.h: saio_external.h
#saio_table.c: saio_external.h
branches/meklort/i386/libsaio/smbios_patcher.c
11331133
11341134
11351135
1136
11361137
11371138
DT__AddProperty(node, "orig-model", tmpLen, gSMBIOSBoardModel);
}
verbose("Actual model name is '%s'\n", tempString);
return gSMBIOSBoardModel;
}
branches/meklort/i386/libsaio/smbios_patcher.h
5656
5757
5858
59
5960
6061
extern struct DMIHeader* FindNextDmiTableOfType(int type, int minlen);
extern struct DMIHeader* FindFirstDmiTableOfType(int type, int minlen);
const char * smbiosStringAtIndex(DMIHeader*, int index, int *length );
char* getSmbiosProductName();
#endif /* !__LIBSAIO_SMBIOS_PATCHER_H */
branches/meklort/i386/boot0/Makefile
99
1010
1111
12
12
13
1314
1415
15
16
17
1618
1719
18
20
21
1922
2023
2124
all embedtheme optionrom: $(DIRS_NEEDED) boot0 boot0hfs chain0
boot0: boot0.s Makefile $(NASM)
$(NASM) boot0.s -o $(SYMROOT)/$@
@echo "\t[NASM] $@"
@$(NASM) boot0.s -o $(SYMROOT)/$@
boot0hfs: boot0.s Makefile $(NASM)
$(NASM) boot0.s -DHFSFIRST -o $(SYMROOT)/$@
@echo "\t[NASM] $@"
@$(NASM) boot0.s -DHFSFIRST -o $(SYMROOT)/$@
chain0: chain0.s Makefile $(NASM)
$(NASM) chain0.s -o $(SYMROOT)/$@
@echo "\t[NASM] $@"
@$(NASM) chain0.s -o $(SYMROOT)/$@
install_i386:: all $(INSTALLDIR)
cp $(SYMROOT)/boot0 $(SYMROOT)/chain0 $(INSTALLDIR)
branches/meklort/i386/MakeInc.dir
4343
4444
4545
46
46
47
4748
48
49
4950
5051
51
52
53
5254
53
55
5456
5557
56
58
59
5760
58
61
5962
6063
6164
6265
6366
6467
65
68
69
6670
6771
68
72
73
6974
7075
71
76
77
7278
7379
74
80
81
.SUFFIXES: .s .i .c .o
.c.o .m.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
-MD -dependency-file $(OBJROOT)/$*.d
md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
-MD -dependency-file $(OBJROOT)/$*.d
md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
$(OBJROOT)/%.o: %.m
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
@echo "\t[CC] $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o \
-MD -dependency-file $(OBJROOT)/$*.d
md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
@md -u $(OBJROOT)/Makedep -f -d $(OBJROOT)/$*.d
#.s.o:
#cc $(INC) -E $< > $(OBJROOT)/$*.o2
#$(AS) -o $(OBJROOT)/$@ $(OBJROOT)/$*.o2
.s.o:
cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
@echo "\t[AS] $<"
@cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
boot2.o:
cc $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) boot2.s
@echo "\t[AS] boot2.s"
@cc $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) boot2.s
$(OBJROOT)/%.o: %.s
cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
@echo "\t[CC] $<"
@cc $(CPPFLAGS) -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $<
$(DIRS_NEEDED) $(INSTALLDIR) $(SRCROOT):
$(MKDIRS) $@
@echo "\t[MKDIR] $@"
@$(MKDIRS) $@
branches/meklort/i386/boot1/Makefile
2020
2121
2222
23
24
25
26
23
24
25
26
27
28
29
30
2731
2832
2933
all embedtheme optionrom: $(DIRS_NEEDED) $(VERSIONED_FILES)
boot1h: boot1.s Makefile
$(NASM) boot1.s -o $(SYMROOT)/boot1h
$(NASM) boot1hp.s -o $(SYMROOT)/boot1hp
$(NASM) boot1he.s -o $(SYMROOT)/boot1he
$(NASM) boot1f32.s -o $(SYMROOT)/boot1f32
@echo "\t[NASM] boot1.s"
@$(NASM) boot1.s -o $(SYMROOT)/boot1h
@echo "\t[NASM] boot1hp.s"
@$(NASM) boot1hp.s -o $(SYMROOT)/boot1hp
@echo "\t[NASM] boot1he.s"
@$(NASM) boot1he.s -o $(SYMROOT)/boot1he
@echo "\t[NASM] boot1f32.s"
@$(NASM) boot1f32.s -o $(SYMROOT)/boot1f32
install_i386:: all $(INSTALLDIR)
cp $(SYMROOT)/boot1h $(INSTALLDIR)/
branches/meklort/i386/boot2/Makefile
7171
7272
7373
74
74
75
7576
7677
7778
7879
79
80
81
8082
8183
8284
8385
8486
8587
86
88
8789
88
89
90
91
9092
9193
9294
......
9799
98100
99101
100
102
103
101104
102
103
105
106
107
108
104109
105
106110
107
108111
109112
110113
......
117120
118121
119122
123
124
125
126
120127
121128
122129
......
127134
128135
129136
137
130138
131139
132140
133
134
135
136
141
137142
138143
139144
......
148153
149154
150155
156
157
151158
152
153159
154
155160
156161
157162
all embedtheme optionrom: $(DIRS_NEEDED) boot
boot: embedded.h machOconv $(OBJS) $(LIBDEP)
$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
@echo "\t[LD] boot.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext
@make Symbols.dylib
$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
@echo "\t[LD] boot_embeded.sys"
@$(LD) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \
-nostdlib -arch i386 -Wl,-segalign,20 \
-Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \
-o $(SYMROOT)/boot_embeded.sys $(filter %.o,$^) $(LIBS) -lcc_kext
@make embed_symbols# this is done in a sub process after boot.sys exists so the strings are populated correctly
##${RM} $(SYMROOT)/${SYMBOLS_MODULE}
@##${RM} $(SYMROOT)/${SYMBOLS_MODULE}
size $(SYMROOT)/boot.sys
ls -l $(SYMROOT)/boot
@##size $(SYMROOT)/boot.sys
@ls -l $(SYMROOT)/boot
@( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \
if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\
then \
embed_symbols: machOconv
@echo ================= Embedding Symbols.dylib =================
machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot
@echo "\t[MACHOCONV] boot"
@$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot &> /dev/null
echo ******* Patching at $(PATCH_ADDR) ******
stat -f%z $(SYMROOT)/boot | perl -ane "print pack('V',@F[0]);" | dd conv=notrunc of=${SYMROOT}/boot_embeded.sys bs=1 count=4 seek=$(PATCH_ADDR)
@echo ******* Patching at $(PATCH_ADDR) ******
@stat -f%z $(SYMROOT)/boot | perl -ane "print pack('V',@F[0]);" | dd conv=notrunc of=${SYMROOT}/boot_embeded.sys bs=1 count=4 seek=$(PATCH_ADDR) &> /dev/null
@echo "\t[MACHOCONV] boot_embeded"
@$(SYMROOT)/machOconv $(SYMROOT)/boot_embeded.sys $(SYMROOT)/boot_embeded
machOconv $(SYMROOT)/boot_embeded.sys $(SYMROOT)/boot_embeded
prompt.o: vers.h
vers.h:
@echo "#define I386BOOT_VERSION \"5.0.132\"" > $(SYMROOT)/vers.h
Symbols.dylib: Symbols.o
@echo ================= Compiling ${SYMBOLS_MODULE} =================
@echo "start" >> ${OBJROOT}/Symbols.save
@echo "_lookup_symbol" >> ${OBJROOT}/Symbols.save
@echo "\t[LD] $@"
@ld -arch i386 \
-undefined dynamic_lookup \
-alias _Symbols_start start \
-current_version 1.0.0 \
-compatibility_version 1.0.0 \
-final_output Symbols \
-exported_symbols_list ${OBJROOT}/Symbols.save \
${OBJROOT}/Symbols.o \
-o $(SYMROOT)/${SYMBOLS_MODULE}
echo "start" >> ${OBJROOT}/Symbols.save
echo "_lookup_symbol" >> ${OBJROOT}/Symbols.save
strip -s ${OBJROOT}/Symbols.save $(SYMROOT)/${SYMBOLS_MODULE}
@size $(SYMROOT)/${SYMBOLS_MODULE}
@##size $(SYMROOT)/${SYMBOLS_MODULE}
Symbols.o:
@rm -rf $(SYMROOT)/Symbols.h
@echo "symbol_t symbolList[] = {" >> $(SYMROOT)/Symbols.h
@nm -g $(SYMROOT)/boot.sys | tr . _ | awk '{print "{.symbol = "$$3"_string, .addr = 0x"$$1"},";}' >> $(SYMROOT)/Symbols.h
@echo "};" >> $(SYMROOT)/Symbols.h
@echo "\t[CC] $@"
@$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c Symbols.c $(INC) -o $(OBJROOT)/Symbols.o
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c Symbols.c $(INC) -o $(OBJROOT)/Symbols.o
install_i386:: all $(INSTALLDIR)
cp $(SYMROOT)/boot $(OTHER_FILES) $(INSTALLDIR)
cd $(INSTALLDIR); chmod u+w boot $(OTHER_FILES)
branches/meklort/i386/modules/MakeInc.dir
11
2
23
34
45
......
5354
5455
5556
56
5757
5858
59
59
include ../../MakePaths.dir
include ../../MakeInc.dir
OBJROOT=../../../obj/i386/modules/$(DIR)
SYMROOT=../../../sym/i386/modules/
include ../../MakeInc.dir
# dependencies
-include $(OBJROOT)/Makedep
#-include $(OBJROOT)/Makedep
branches/meklort/i386/modules/klibc/limits.h
11
22
33
4
4
55
6
6
#define CHAR_BIT8
#define UCHAR_MAX255
#define UCHAR_MAX255u
#define INT_MAX2147483647
#define UINT_MAX4294967295
#define UINT_MAX4294967295u
branches/meklort/i386/modules/uClibc++/include/limits
2121
2222
2323
24
24
2525
2626
2727
#ifndef __STD_HEADER_LIMITS
#define __STD_HEADER_LIMITS 1
#warning limits header is nowhere complete or accurate
//#warning limits header is nowhere complete or accurate
#pragma GCC visibility push(default)
branches/meklort/i386/cdboot/Makefile
99
1010
1111
12
13
12
13
14
1415
15
16
16
17
1718
18
19
1920
2021
2122
all embedtheme optionrom: $(DIRS_NEEDED) cdboot
cdboot: cdboot.s $(SYMROOT)/boot Makefile $(NASM)
$(NASM) cdboot.s -o $(SYMROOT)/cdboot
dd if=$(SYMROOT)/boot of=$(SYMROOT)/cdboot conv=sync bs=2k seek=1
@echo "\t[NASM] cdboot.s"
@$(NASM) cdboot.s -o $(SYMROOT)/cdboot
@dd if=$(SYMROOT)/boot of=$(SYMROOT)/cdboot conv=sync bs=2k seek=1 &> /dev/null
# Update cdboot with boot file size info
stat -f%z $(SYMROOT)/boot \
@# Update cdboot with boot file size info
@stat -f%z $(SYMROOT)/boot \
| perl -ane "print pack('V',@F[0]);" \
| dd of=$(SYMROOT)/cdboot bs=1 count=4 seek=2044 conv=notrunc
| dd of=$(SYMROOT)/cdboot bs=1 count=4 seek=2044 conv=notrunc &> /dev/null
install_i386:: all $(INSTALLDIR)
cp $(SYMROOT)/cdboot $(INSTALLDIR)
branches/meklort/i386/libsa/Makefile
4747
4848
4949
50
51
52
50
51
52
53
54
55
5356
5457
5558
all embedtheme optionrom: $(DIRS_NEEDED) $(LIBS)
libsa.a: $(SA_OBJS)
rm -f $(SYMROOT)/$(@F)
ar q $(SYMROOT)/$(@F) $^
ranlib $(SYMROOT)/$(@F)
@echo "\t[RM] $(SYMROOT)/$(@F)"
@rm -f $(SYMROOT)/$(@F)
@echo "\t[AR] $@"
@ar q $(SYMROOT)/$(@F) $^ &> /dev/null
@echo "\t[RANLIB] $@"
@ranlib $(SYMROOT)/$(@F)
$(INSTALL_SA_DIR) $(INSTALL_MD_DIR):
$(MKDIRS) $@
branches/meklort/i386/util/Makefile
2727
2828
2929
30
30
31
3132
3233
33
34
35
3436
3537
3638
all embedtheme optionrom: $(DIRS_NEEDED) $(PROGRAMS)
machOconv: machOconv.o
$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) machOconv.o
@echo "\t[LD] $@"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $(SYMROOT)/$(@F) machOconv.o
bdmesg: bdmesg.o
$(CC) $(CFLAGS) $(LDFLAGS) -framework IOKit -framework CoreFoundation -mmacosx-version-min=10.5 -o $(SYMROOT)/$(@F) bdmesg.o
@echo "\t[LD] $@"
@$(CC) $(CFLAGS) $(LDFLAGS) -framework IOKit -framework CoreFoundation -mmacosx-version-min=10.5 -o $(SYMROOT)/$(@F) bdmesg.o
include ../MakeInc.dir

Archive Download the corresponding diff file

Revision: 657