Subversion Repositories Kolibri OS

Rev

Rev 7666 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7700 leency 1
# sudo apt-get install gcc-multilib g++-multilib
2
 
3
Compiler                = gcc
4
 
5
Compiler_Options       = -m32 -c -fno-exceptions -D_UNIX_
6
#Compiler_Options       = -c -fno-exceptions -O2 -D_WIN32_
7
 
8
#-D: _WIN32_ or _UNIX_
9
#-D: for _WIN32_ add -D__CONSOLE__
10
 
11
Exe_file                = cmm
12
 
13
 
14
 
15
Path_Libs		= -Ld:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/lib/gcc -Ld:/TEMP/Dev-Cpp/lib -Ld:/TEMP/Dev-Cpp/lib
16
 
17
Add_Libs		= d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtbegin.o d:/TEMP/Dev-Cpp/lib/crt2.o d:/TEMP/Dev-Cpp/lib/gcc/mingw32/3.4.2/crtend.o
18
 
19
Link_Libs		= -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
20
 
21
My_Libs	 		= main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o
22
 
23
 
24
#Link_Libs		= -lmingw32 -lgcc -lmoldname -lmingwex -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc  -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
25
 
26
####################
27
## Makefile rules ##
28
####################
29
 
30
all        : $(Exe_file)
31
 
32
$(Exe_file) : $(My_Libs)
33
#	ld -o cmm.exe $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs)
34
	$(Compiler) -m32 -o $(Exe_file) $(My_Libs)
35
#	ld -o cmm.exe -Bdynamic d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtend.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../crt2.o d:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/crtbegin.o -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2 -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. -Ld:/TEMP/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../.. main.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o port.o -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt -lgcc
36
 
37
 
38
 
39
 
40
clean:
41
	rm *.o
42
 
43
 
44
# next are the exceptions that don't have to be compiled with the /zu option
45
# since they will never be called from a interrupt. hey.. I _tried_ to find
46
# a clean solution..
47
 
48
main.o :  main.cpp
49
	$(Compiler) $(Compiler_Options) $<
50
 
51
toka.o :  toka.cpp
52
	$(Compiler) $(Compiler_Options) $<
53
 
54
tokb.o :  tokb.cpp
55
	$(Compiler) $(Compiler_Options) $<
56
 
57
tokc.o :  tokc.cpp
58
	$(Compiler) $(Compiler_Options) $<
59
 
60
toke.o :  toke.cpp
61
	$(Compiler) $(Compiler_Options) $<
62
 
63
tokr.o :  tokr.cpp
64
	$(Compiler) $(Compiler_Options) $<
65
 
66
errors.o :errors.cpp
67
	$(Compiler) $(Compiler_Options) $<
68
 
69
debug.o : debug.cpp
70
	$(Compiler) $(Compiler_Options) $<
71
 
72
outobj.o : outobj.cpp
73
	$(Compiler) $(Compiler_Options) $<
74
 
75
outpe.o : outpe.cpp
76
	$(Compiler) $(Compiler_Options) $<
77
 
78
disasm.o : disasm.cpp
79
	$(Compiler) $(Compiler_Options) $<
80
 
81
switch.o : switch.cpp
82
	$(Compiler) $(Compiler_Options) $<
83
 
84
outle.o : outle.cpp
85
	$(Compiler) $(Compiler_Options) $<
86
 
87
pointer.o : pointer.cpp
88
	$(Compiler) $(Compiler_Options) $<
89
 
90
new_type.o : new_type.cpp
91
	$(Compiler) $(Compiler_Options) $<
92
 
93
class.o : class.cpp
94
	$(Compiler) $(Compiler_Options) $<
95
 
96
res.o : res.cpp
97
	$(Compiler) $(Compiler_Options) $<
98
 
99
optreg.o : optreg.cpp
100
	$(Compiler) $(Compiler_Options) $<
101
 
102
libobj.o : libobj.cpp
103
	$(Compiler) $(Compiler_Options) $<
104
 
105
port.o: port.cpp
106
	$(Compiler) $(Compiler_Options) $<
107
 
108
.cpp.o:
109
	$(Compiler) $(Compiler_Options) $<
110
 
111
.asm.o:
112
	fasm $<