]> 4ch.mooo.com Git - 16.git/blob - makefile
added some files~
[16.git] / makefile
1 !ifdef __LINUX__
2 REMOVECOMMAND=rm
3 DIRSEP=/
4 OBJ=o
5 !else
6 REMOVECOMMAND=del
7 DIRSEP=\
8 OBJ=obj
9 !endif
10 TARGET_OS = dos
11 #-zk0u = translate kanji to unicode... wwww
12 #-zk0 = kanji support~
13 #-zkl = current codepage
14
15 #MFLAGS=-mc# -zm
16 CFLAGS=-zk0 -wo -x -mc# -zdp# -zp16 -zq
17 OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
18 FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS)
19 SRC=src$(DIRSEP)
20 SRCLIB=$(SRC)lib$(DIRSEP)
21 JSMNLIB=$(SRCLIB)jsmn$(DIRSEP)
22 EXMMLIB=$(SRCLIB)exmm$(DIRSEP)
23 DOSLIB=$(SRCLIB)doslib$(DIRSEP)
24 WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
25
26 16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16_ca.$(OBJ) adlib.$(OBJ) 8254.$(OBJ) cpu.$(OBJ)
27 #16_snd.$(OBJ)
28 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ)
29
30 all: 16.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe exmmtest.exe fonttes0.exe fontgfx.exe sountest.exe
31 #inputest.exe
32
33 #
34 #executables
35 #
36 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
37         wcl $(FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
38
39 scroll.exe: scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ) dos_kb.$(OBJ)
40         wcl $(FLAGS) scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ) dos_kb.$(OBJ)
41 scroll.$(OBJ): $(SRC)scroll.c
42         wcl $(FLAGS) -c $(SRC)scroll.c
43 test.exe: test.$(OBJ) gfx.lib
44         wcl $(FLAGS) test.$(OBJ) gfx.lib
45
46 test2.exe: test2.$(OBJ) gfx.lib
47         wcl $(FLAGS) test2.$(OBJ) gfx.lib
48
49 fonttest.exe: fonttest.$(OBJ) 16.lib
50         wcl $(FLAGS) fonttest.$(OBJ) 16.lib
51
52 fonttes0.exe: fonttes0.$(OBJ) 16.lib
53         wcl $(FLAGS) fonttes0.$(OBJ) 16.lib
54
55 fontgfx.exe: fontgfx.$(OBJ) 16.lib
56         wcl $(FLAGS) fontgfx.$(OBJ) 16.lib
57
58 inputest.exe: inputest.$(OBJ) 16.lib
59         wcl $(FLAGS) inputest.$(OBJ) 16.lib
60
61 sountest.exe: sountest.$(OBJ) 16.lib
62         wcl $(FLAGS) sountest.$(OBJ) 16.lib
63
64 pcxtest.exe: pcxtest.$(OBJ) gfx.lib
65         wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib
66
67 palettec.exe: palettec.$(OBJ) 16.lib
68         wcl $(FLAGS) palettec.$(OBJ) 16.lib
69
70 maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
71         wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
72
73 #maptest0.exe: maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)# 16.lib
74 #       wcl $(FLAGS) $(MFLAGS) maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)# 16.lib
75
76 #emmtest.exe: emmtest.$(OBJ) memory.$(OBJ)
77 #       wcl $(FLAGS) $(MFLAGS) emmtest.$(OBJ) memory.$(OBJ)
78
79 #emsdump.exe: emsdump.$(OBJ) memory.$(OBJ)
80 #       wcl $(FLAGS) $(MFLAGS) emsdump.$(OBJ) memory.$(OBJ)
81
82 fmemtest.exe: fmemtest.$(OBJ) 16.lib
83         wcl $(FLAGS) fmemtest.$(OBJ) 16.lib
84
85 exmmtest.exe: exmmtest.$(OBJ) 16.lib
86         wcl $(FLAGS) exmmtest.$(OBJ) 16.lib
87
88 #
89 #executable's objects
90 #
91 16.$(OBJ): $(SRC)16.h $(SRC)16.c
92         wcl $(FLAGS) -c $(SRC)16.c
93
94 test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
95         wcl $(FLAGS) -c $(SRC)test.c
96
97 test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h
98         wcl $(FLAGS) -c $(SRC)test2.c
99
100 pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h
101         wcl $(FLAGS) -c $(SRC)pcxtest.c
102
103 palettec.$(OBJ): $(SRC)palettec.c
104         wcl $(FLAGS) -c $(SRC)palettec.c
105
106 maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h
107         wcl $(FLAGS) -c $(SRC)maptest.c
108
109 #maptest0.$(OBJ): $(SRC)maptest0.c# $(SRCLIB)modex16.h
110 #       wcl $(FLAGS) $(MFLAGS) -c $(SRC)maptest0.c
111
112 #emmtest.$(OBJ): $(SRC)emmtest.c
113 #       wcl $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
114
115 #emsdump.$(OBJ): $(SRC)emsdump.c
116 #       wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
117
118 fmemtest.$(OBJ): $(SRC)fmemtest.c
119         wcl $(FLAGS) -c $(SRC)fmemtest.c
120
121 fonttest.$(OBJ): $(SRC)fonttest.c
122         wcl $(FLAGS) -c $(SRC)fonttest.c
123
124 fonttes0.$(OBJ): $(SRC)fonttes0.c
125         wcl $(FLAGS) -c $(SRC)fonttes0.c
126
127 fontgfx.$(OBJ): $(SRC)fontgfx.c
128         wcl $(FLAGS) -c $(SRC)fontgfx.c
129
130 inputest.$(OBJ): $(SRC)inputest.c
131         wcl $(FLAGS) -c $(SRC)inputest.c
132
133 sountest.$(OBJ): $(SRC)sountest.c
134         wcl $(FLAGS) -c $(SRC)sountest.c
135
136 exmmtest.$(OBJ): $(SRC)exmmtest.c
137         wcl $(FLAGS) -c $(SRC)exmmtest.c
138
139 #
140 #non executable objects libraries
141 #
142 16.lib: $(16LIBOBJS) gfx.lib
143         wlib -b 16.lib $(16LIBOBJS) gfx.lib
144
145 gfx.lib: $(GFXLIBOBJS)
146         wlib -b gfx.lib $(GFXLIBOBJS)
147
148 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
149         wcl $(FLAGS) -c $(SRCLIB)modex16.c
150
151 #dos_kb.$(OBJ): $(SRCLIB)dos_kb.h $(SRCLIB)dos_kb.c
152 #       wcl $(FLAGS) -c $(SRCLIB)dos_kb.c
153
154 bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
155         wcl $(FLAGS) -c $(SRCLIB)bitmap.c
156
157 planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c
158         wcl $(FLAGS) -c $(SRCLIB)planar.c
159
160 scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c
161         wcl $(FLAGS) -c $(SRCLIB)scroll16.c
162
163 wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c
164         wcl $(FLAGS) -c $(WCPULIB)wcpu.c
165
166 16text.$(OBJ): $(SRCLIB)16text.c
167         wcl $(FLAGS) -c $(SRCLIB)16text.c
168
169 mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c 16.lib
170         wcl $(FLAGS) -c $(SRCLIB)mapread.c 16.lib
171
172 #fmapread.$(OBJ): $(SRCLIB)fmapread.h $(SRCLIB)fmapread.c 16.lib
173 #       wcl $(FLAGS) $(MFLAGS) -c $(SRCLIB)fmapread.c 16.lib
174
175 16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
176         wcl $(FLAGS) -c $(SRCLIB)16_in.c
177
178 16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c
179         wcl $(FLAGS) -c $(SRCLIB)16_mm.c
180
181 16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c
182         wcl $(FLAGS) -c $(SRCLIB)16_ca.c
183
184 #16_snd.$(OBJ): $(SRCLIB)16_snd.h $(SRCLIB)16_snd.c
185 #       wcl $(FLAGS) -c $(SRCLIB)16_snd.c
186
187 adlib.$(OBJ): $(DOSLIB)adlib.h $(DOSLIB)adlib.c
188         wcl $(FLAGS) -c $(DOSLIB)adlib.c
189
190 8254.$(OBJ): $(DOSLIB)8254.h $(DOSLIB)8254.c
191         wcl $(FLAGS) -c $(DOSLIB)8254.c
192
193 cpu.$(OBJ): $(DOSLIB)cpu.h $(DOSLIB)cpu.c
194         wcl $(FLAGS) -c $(DOSLIB)cpu.c
195
196 16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
197         wcl $(FLAGS) -c $(SRCLIB)16_head.c
198
199 jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
200         wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
201
202 #farjsmn.$(OBJ): $(JSMNLIB)farjsmn.h $(JSMNLIB)farjsmn.c
203 #       wcl $(FLAGS) $(MFLAGS) -c $(JSMNLIB)farjsmn.c
204
205 #memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
206 #       wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
207
208 #
209 #other~
210 #
211 clean: .symbolic
212         @$(REMOVECOMMAND) *.$(OBJ)
213         @$(REMOVECOMMAND) *.lib
214         @wlib -n 16.lib
215         @wlib -n  gfx.lib
216 #       @$(REMOVECOMMAND) *.OBJ
217 #       @$(REMOVECOMMAND) *.out
218 #       @$(REMOVECOMMAND) *.OUT
219 #       @$(REMOVECOMMAND) makefi~1
220 #       @$(REMOVECOMMAND) makefile~
221 #       @$(REMOVECOMMAND) __WCL__.LNK
222 #       @$(REMOVECOMMAND) *.smp
223 #       @$(REMOVECOMMAND) *.SMP
224