Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6618 | siemargl | 1 | Compiler = kos32-gcc |
6446 | GerdtR | 2 | Linker = kos32-ld |
3 | |||
6618 | siemargl | 4 | SDK_DIR:= $(abspath ../../../contrib/sdk) |
6446 | GerdtR | 5 | |
6618 | siemargl | 6 | Includes = -Id:\TEMP\mprog\kos\includes -I$(SDK_DIR)/sources/newlib/libc/include |
6446 | GerdtR | 7 | |
6618 | siemargl | 8 | Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp |
9 | |||
10 | Compiler_Options = -c -fno-exceptions -D_KOS_ -U_Win32 -U_WIN32 -U__MINGW32__ \ |
||
11 | -mno-ms-bitfields -Wno-write-strings $(Includes) $(Compatib_Posix) |
||
12 | |||
6446 | GerdtR | 13 | Exe_file = cmm.kex |
14 | |||
15 | |||
6618 | siemargl | 16 | Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/kos -L $(SDK_DIR)/lib |
6446 | GerdtR | 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 | |||
19 | Add_Libs = |
||
20 | |||
6618 | siemargl | 21 | #Link_Libs = -lc -lgcc |
7666 | dunkaist | 22 | Link_Libs = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds \ |
6618 | siemargl | 23 | --image-base 0 -lgcc -ldll -lc.dll |
6446 | GerdtR | 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 |
||
26 | |||
27 | #################### |
||
28 | ## Makefile rules ## |
||
29 | #################### |
||
30 | |||
31 | all : $(Exe_file) |
||
32 | |||
33 | $(Exe_file) : $(My_Libs) |
||
6618 | siemargl | 34 | $(Linker) -o cmm.kex --stack 0x100000 $(Path_Libs) $(Add_Libs) $(My_Libs) $(Link_Libs) |
6446 | GerdtR | 35 | objcopy cmm.kex -O binary |
36 | kpack cmm.kex |
||
37 | |||
38 | clean: |
||
39 | rm *.o |
||
40 | |||
41 | |||
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 |
||
44 | # a clean solution.. |
||
45 | |||
46 | main.o : main.cpp |
||
47 | $(Compiler) $(Compiler_Options) $< |
||
48 | |||
49 | toka.o : toka.cpp |
||
50 | $(Compiler) $(Compiler_Options) $< |
||
51 | |||
52 | tokb.o : tokb.cpp |
||
53 | $(Compiler) $(Compiler_Options) $< |
||
54 | |||
55 | tokc.o : tokc.cpp |
||
56 | $(Compiler) $(Compiler_Options) $< |
||
57 | |||
58 | toke.o : toke.cpp |
||
59 | $(Compiler) $(Compiler_Options) $< |
||
60 | |||
61 | tokr.o : tokr.cpp |
||
62 | $(Compiler) $(Compiler_Options) $< |
||
63 | |||
64 | errors.o :errors.cpp |
||
65 | $(Compiler) $(Compiler_Options) $< |
||
66 | |||
67 | debug.o : debug.cpp |
||
68 | $(Compiler) $(Compiler_Options) $< |
||
69 | |||
70 | outobj.o : outobj.cpp |
||
71 | $(Compiler) $(Compiler_Options) $< |
||
72 | |||
73 | outpe.o : outpe.cpp |
||
74 | $(Compiler) $(Compiler_Options) $< |
||
75 | |||
76 | disasm.o : disasm.cpp |
||
77 | $(Compiler) $(Compiler_Options) $< |
||
78 | |||
79 | switch.o : switch.cpp |
||
80 | $(Compiler) $(Compiler_Options) $< |
||
81 | |||
82 | outle.o : outle.cpp |
||
83 | $(Compiler) $(Compiler_Options) $< |
||
84 | |||
85 | pointer.o : pointer.cpp |
||
86 | $(Compiler) $(Compiler_Options) $< |
||
87 | |||
88 | new_type.o : new_type.cpp |
||
89 | $(Compiler) $(Compiler_Options) $< |
||
90 | |||
91 | class.o : class.cpp |
||
92 | $(Compiler) $(Compiler_Options) $< |
||
93 | |||
94 | res.o : res.cpp |
||
95 | $(Compiler) $(Compiler_Options) $< |
||
96 | |||
97 | optreg.o : optreg.cpp |
||
98 | $(Compiler) $(Compiler_Options) $< |
||
99 | |||
100 | libobj.o : libobj.cpp |
||
101 | $(Compiler) $(Compiler_Options) $< |
||
102 | |||
103 | port.o: port.cpp |
||
104 | $(Compiler) $(Compiler_Options) $< |
||
105 | |||
106 | .cpp.o: |
||
107 | $(Compiler) $(Compiler_Options) $< |
||
108 | |||
109 | .asm.o: |
||
110 | fasm $<> |
||
111 |