Subversion Repositories Kolibri OS

Rev

Rev 6618 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6618 Rev 7666
1
Compiler                = kos32-gcc
1
Compiler                = kos32-gcc
2
Linker					= kos32-ld
2
Linker					= kos32-ld
3
 
3
 
4
SDK_DIR:= $(abspath ../../../contrib/sdk)
4
SDK_DIR:= $(abspath ../../../contrib/sdk)
5
 
5
 
6
Includes = -Id:\TEMP\mprog\kos\includes -I$(SDK_DIR)/sources/newlib/libc/include
6
Includes = -Id:\TEMP\mprog\kos\includes -I$(SDK_DIR)/sources/newlib/libc/include
7
 
7
 
8
Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
8
Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
9
 
9
 
10
Compiler_Options = -c -fno-exceptions -D_KOS_ -U_Win32 -U_WIN32 -U__MINGW32__ \
10
Compiler_Options = -c -fno-exceptions -D_KOS_ -U_Win32 -U_WIN32 -U__MINGW32__ \
11
	-mno-ms-bitfields -Wno-write-strings $(Includes) $(Compatib_Posix)
11
	-mno-ms-bitfields -Wno-write-strings $(Includes) $(Compatib_Posix)
12
 
12
 
13
Exe_file                = cmm.kex
13
Exe_file                = cmm.kex
14
 
14
 
15
 
15
 
16
Path_Libs		= -Ld:/TEMP/Dev-Cpp/lib/kos -L $(SDK_DIR)/lib
16
Path_Libs		= -Ld:/TEMP/Dev-Cpp/lib/kos -L $(SDK_DIR)/lib
17
#-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
17
#-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
18
 
18
 
19
Add_Libs		=
19
Add_Libs		=
20
 
20
 
21
#Link_Libs		= -lc -lgcc
21
#Link_Libs		= -lc -lgcc
22
Link_Libs = -static -S -nostdlib -T $(SDK_DIR)/lib/app-dynamic.lds \
22
Link_Libs = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds \
23
          --image-base 0 -lgcc -ldll -lc.dll 
23
          --image-base 0 -lgcc -ldll -lc.dll 
24
 
24
 
25
My_Libs	 		= main.o port.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
25
My_Libs	 		= main.o port.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
26
 
26
 
27
####################
27
####################
28
## Makefile rules ##
28
## Makefile rules ##
29
####################
29
####################
30
 
30
 
31
all        : $(Exe_file)
31
all        : $(Exe_file)
32
 
32
 
33
$(Exe_file) : $(My_Libs)
33
$(Exe_file) : $(My_Libs)
34
	$(Linker) -o cmm.kex --stack 0x100000 $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs)
34
	$(Linker) -o cmm.kex --stack 0x100000 $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs)
35
	objcopy cmm.kex -O binary
35
	objcopy cmm.kex -O binary
36
	kpack cmm.kex
36
	kpack cmm.kex
37
 
37
 
38
clean: 	
38
clean: 	
39
	rm *.o
39
	rm *.o
40
 
40
 
41
 
41
 
42
# next are the exceptions that don't have to be compiled with the /zu option
42
# next are the exceptions that don't have to be compiled with the /zu option
43
# since they will never be called from a interrupt. hey.. I _tried_ to find
43
# since they will never be called from a interrupt. hey.. I _tried_ to find
44
# a clean solution..
44
# a clean solution..
45
 
45
 
46
main.o :  main.cpp
46
main.o :  main.cpp
47
	$(Compiler) $(Compiler_Options) $<
47
	$(Compiler) $(Compiler_Options) $<
48
 
48
 
49
toka.o :  toka.cpp
49
toka.o :  toka.cpp
50
	$(Compiler) $(Compiler_Options) $<
50
	$(Compiler) $(Compiler_Options) $<
51
 
51
 
52
tokb.o :  tokb.cpp
52
tokb.o :  tokb.cpp
53
	$(Compiler) $(Compiler_Options) $<
53
	$(Compiler) $(Compiler_Options) $<
54
 
54
 
55
tokc.o :  tokc.cpp
55
tokc.o :  tokc.cpp
56
	$(Compiler) $(Compiler_Options) $<
56
	$(Compiler) $(Compiler_Options) $<
57
 
57
 
58
toke.o :  toke.cpp
58
toke.o :  toke.cpp
59
	$(Compiler) $(Compiler_Options) $<
59
	$(Compiler) $(Compiler_Options) $<
60
 
60
 
61
tokr.o :  tokr.cpp
61
tokr.o :  tokr.cpp
62
	$(Compiler) $(Compiler_Options) $<
62
	$(Compiler) $(Compiler_Options) $<
63
 
63
 
64
errors.o :errors.cpp
64
errors.o :errors.cpp
65
	$(Compiler) $(Compiler_Options) $<
65
	$(Compiler) $(Compiler_Options) $<
66
 
66
 
67
debug.o : debug.cpp
67
debug.o : debug.cpp
68
	$(Compiler) $(Compiler_Options) $<
68
	$(Compiler) $(Compiler_Options) $<
69
 
69
 
70
outobj.o : outobj.cpp
70
outobj.o : outobj.cpp
71
	$(Compiler) $(Compiler_Options) $<
71
	$(Compiler) $(Compiler_Options) $<
72
 
72
 
73
outpe.o : outpe.cpp
73
outpe.o : outpe.cpp
74
	$(Compiler) $(Compiler_Options) $<
74
	$(Compiler) $(Compiler_Options) $<
75
 
75
 
76
disasm.o : disasm.cpp
76
disasm.o : disasm.cpp
77
	$(Compiler) $(Compiler_Options) $<
77
	$(Compiler) $(Compiler_Options) $<
78
 
78
 
79
switch.o : switch.cpp
79
switch.o : switch.cpp
80
	$(Compiler) $(Compiler_Options) $<
80
	$(Compiler) $(Compiler_Options) $<
81
 
81
 
82
outle.o : outle.cpp
82
outle.o : outle.cpp
83
	$(Compiler) $(Compiler_Options) $<
83
	$(Compiler) $(Compiler_Options) $<
84
 
84
 
85
pointer.o : pointer.cpp
85
pointer.o : pointer.cpp
86
	$(Compiler) $(Compiler_Options) $<
86
	$(Compiler) $(Compiler_Options) $<
87
 
87
 
88
new_type.o : new_type.cpp
88
new_type.o : new_type.cpp
89
	$(Compiler) $(Compiler_Options) $<
89
	$(Compiler) $(Compiler_Options) $<
90
 
90
 
91
class.o : class.cpp
91
class.o : class.cpp
92
	$(Compiler) $(Compiler_Options) $<
92
	$(Compiler) $(Compiler_Options) $<
93
 
93
 
94
res.o : res.cpp
94
res.o : res.cpp
95
	$(Compiler) $(Compiler_Options) $<
95
	$(Compiler) $(Compiler_Options) $<
96
 
96
 
97
optreg.o : optreg.cpp
97
optreg.o : optreg.cpp
98
	$(Compiler) $(Compiler_Options) $<
98
	$(Compiler) $(Compiler_Options) $<
99
 
99
 
100
libobj.o : libobj.cpp
100
libobj.o : libobj.cpp
101
	$(Compiler) $(Compiler_Options) $<
101
	$(Compiler) $(Compiler_Options) $<
102
 
102
 
103
port.o: port.cpp
103
port.o: port.cpp
104
	$(Compiler) $(Compiler_Options) $<
104
	$(Compiler) $(Compiler_Options) $<
105
 
105
 
106
.cpp.o:
106
.cpp.o:
107
	$(Compiler) $(Compiler_Options) $<
107
	$(Compiler) $(Compiler_Options) $<
108
 
108
 
109
.asm.o:
109
.asm.o:
110
	fasm $<
110
	fasm $<
111
 
111
 
112
.asm.o:
112
.asm.o:
113
>
113
>
114
 
114
 
115
.cpp.o:
115
.cpp.o:
116
>
116
>
117
 
117
 
118
port.o:>
118
port.o:>
119
 
119
 
120
libobj.o>
120
libobj.o>
121
 
121
 
122
optreg.o>
122
optreg.o>
123
 
123
 
124
res.o>
124
res.o>
125
 
125
 
126
class.o>
126
class.o>
127
 
127
 
128
new_type.o>
128
new_type.o>
129
 
129
 
130
pointer.o>
130
pointer.o>
131
 
131
 
132
outle.o>
132
outle.o>
133
 
133
 
134
switch.o>
134
switch.o>
135
 
135
 
136
disasm.o>
136
disasm.o>
137
 
137
 
138
outpe.o>
138
outpe.o>
139
 
139
 
140
outobj.o>
140
outobj.o>
141
 
141
 
142
debug.o>
142
debug.o>
143
 
143
 
144
errors.o>
144
errors.o>
145
 
145
 
146
tokr.o>
146
tokr.o>
147
 
147
 
148
toke.o>
148
toke.o>
149
 
149
 
150
tokc.o>
150
tokc.o>
151
 
151
 
152
tokb.o>
152
tokb.o>
153
 
153
 
154
toka.o>
154
toka.o>