]> 4ch.mooo.com Git - 16.git/blob - makefile
20796d085f1779f360a3499edf2a691cb75d3a2f
[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=-zkl -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 WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
24
25 16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16text.$(OBJ) 16_ca.$(OBJ)
26 GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ)
27
28 all: 16.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe inputest.exe exmmtest.exe fonttes0.exe
29
30 #
31 #executables
32 #
33 16.exe: 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
34         wcl $(FLAGS) 16.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
35
36 scroll.exe: scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ) dos_kb.$(OBJ)
37         wcl $(FLAGS) scroll.$(OBJ) 16.lib mapread.$(OBJ) jsmn.$(OBJ) dos_kb.$(OBJ)
38 scroll.$(OBJ): $(SRC)scroll.c
39         wcl $(FLAGS) -c $(SRC)scroll.c
40 test.exe: test.$(OBJ) gfx.lib
41         wcl $(FLAGS) test.$(OBJ) gfx.lib
42
43 test2.exe: test2.$(OBJ) gfx.lib
44         wcl $(FLAGS) test2.$(OBJ) gfx.lib
45
46 fonttest.exe: fonttest.$(OBJ) 16.lib
47         wcl $(FLAGS) fonttest.$(OBJ) 16.lib
48
49 fonttes0.exe: fonttes0.$(OBJ) 16.lib
50         wcl $(FLAGS) fonttes0.$(OBJ) 16.lib
51
52 inputest.exe: inputest.$(OBJ) 16.lib
53         wcl $(FLAGS) inputest.$(OBJ) 16.lib
54
55 pcxtest.exe: pcxtest.$(OBJ) gfx.lib
56         wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib
57
58 palettec.exe: palettec.$(OBJ) modex16.$(OBJ)
59         wcl $(FLAGS) palettec.$(OBJ) modex16.$(OBJ)
60
61 maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
62         wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
63
64 #maptest0.exe: maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)# 16.lib
65 #       wcl $(FLAGS) $(MFLAGS) maptest0.$(OBJ) fmapread.$(OBJ) farjsmn.$(OBJ)# 16.lib
66
67 #emmtest.exe: emmtest.$(OBJ) memory.$(OBJ)
68 #       wcl $(FLAGS) $(MFLAGS) emmtest.$(OBJ) memory.$(OBJ)
69
70 #emsdump.exe: emsdump.$(OBJ) memory.$(OBJ)
71 #       wcl $(FLAGS) $(MFLAGS) emsdump.$(OBJ) memory.$(OBJ)
72
73 fmemtest.exe: fmemtest.$(OBJ) 16.lib
74         wcl $(FLAGS) fmemtest.$(OBJ) 16.lib
75
76 exmmtest.exe: exmmtest.$(OBJ) 16.lib
77         wcl $(FLAGS) exmmtest.$(OBJ) 16.lib
78
79 #
80 #executable's objects
81 #
82 16.$(OBJ): $(SRC)16.h $(SRC)16.c
83         wcl $(FLAGS) -c $(SRC)16.c
84
85 test.$(OBJ): $(SRC)test.c $(SRCLIB)modex16.h
86         wcl $(FLAGS) -c $(SRC)test.c
87
88 test2.$(OBJ): $(SRC)test2.c $(SRCLIB)modex16.h
89         wcl $(FLAGS) -c $(SRC)test2.c
90
91 pcxtest.$(OBJ): $(SRC)pcxtest.c $(SRCLIB)modex16.h
92         wcl $(FLAGS) -c $(SRC)pcxtest.c
93
94 palettec.$(OBJ): $(SRC)palettec.c
95         wcl $(FLAGS) -c $(SRC)palettec.c
96
97 maptest.$(OBJ): $(SRC)maptest.c $(SRCLIB)modex16.h
98         wcl $(FLAGS) -c $(SRC)maptest.c
99
100 #maptest0.$(OBJ): $(SRC)maptest0.c# $(SRCLIB)modex16.h
101 #       wcl $(FLAGS) $(MFLAGS) -c $(SRC)maptest0.c
102
103 #emmtest.$(OBJ): $(SRC)emmtest.c
104 #       wcl $(FLAGS) $(MFLAGS) -c $(SRC)emmtest.c
105
106 #emsdump.$(OBJ): $(SRC)emsdump.c
107 #       wcl $(FLAGS) $(MFLAGS) -c $(SRC)emsdump.c
108
109 fmemtest.$(OBJ): $(SRC)fmemtest.c
110         wcl $(FLAGS) -c $(SRC)fmemtest.c
111
112 fonttest.$(OBJ): $(SRC)fonttest.c
113         wcl $(FLAGS) -c $(SRC)fonttest.c
114
115 fonttes0.$(OBJ): $(SRC)fonttes0.c
116         wcl $(FLAGS) -c $(SRC)fonttes0.c
117
118 inputest.$(OBJ): $(SRC)inputest.c
119         wcl $(FLAGS) -c $(SRC)inputest.c
120
121 exmmtest.$(OBJ): $(SRC)exmmtest.c
122         wcl $(FLAGS) -c $(SRC)exmmtest.c
123
124 #
125 #non executable objects libraries
126 #
127 16.lib: $(16LIBOBJS) gfx.lib
128         wlib -b 16.lib $(16LIBOBJS) gfx.lib
129
130 gfx.lib: $(GFXLIBOBJS)
131         wlib -b gfx.lib $(GFXLIBOBJS)
132
133 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
134         wcl $(FLAGS) -c $(SRCLIB)modex16.c
135
136 #dos_kb.$(OBJ): $(SRCLIB)dos_kb.h $(SRCLIB)dos_kb.c
137 #       wcl $(FLAGS) -c $(SRCLIB)dos_kb.c
138
139 bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
140         wcl $(FLAGS) -c $(SRCLIB)bitmap.c
141
142 planar.$(OBJ): $(SRCLIB)planar.h $(SRCLIB)planar.c
143         wcl $(FLAGS) -c $(SRCLIB)planar.c
144
145 scroll16.$(OBJ): $(SRCLIB)scroll16.h $(SRCLIB)scroll16.c
146         wcl $(FLAGS) -c $(SRCLIB)scroll16.c
147
148 wcpu.$(OBJ): $(WCPULIB)wcpu.h $(WCPULIB)wcpu.c
149         wcl $(FLAGS) -c $(WCPULIB)wcpu.c
150
151 16text.$(OBJ): $(SRCLIB)16text.c
152         wcl $(FLAGS) -c $(SRCLIB)16text.c
153
154 mapread.$(OBJ): $(SRCLIB)mapread.h $(SRCLIB)mapread.c 16.lib
155         wcl $(FLAGS) -c $(SRCLIB)mapread.c 16.lib
156
157 #fmapread.$(OBJ): $(SRCLIB)fmapread.h $(SRCLIB)fmapread.c 16.lib
158 #       wcl $(FLAGS) $(MFLAGS) -c $(SRCLIB)fmapread.c 16.lib
159
160 16_in.$(OBJ): $(SRCLIB)16_in.h $(SRCLIB)16_in.c
161         wcl $(FLAGS) -c $(SRCLIB)16_in.c
162
163 16_mm.$(OBJ): $(SRCLIB)16_mm.h $(SRCLIB)16_mm.c
164         wcl $(FLAGS) -c $(SRCLIB)16_mm.c
165
166 16_ca.$(OBJ): $(SRCLIB)16_ca.h $(SRCLIB)16_ca.c
167         wcl $(FLAGS) -c $(SRCLIB)16_ca.c
168
169 16_head.$(OBJ): $(SRCLIB)16_head.h $(SRCLIB)16_head.c
170         wcl $(FLAGS) -c $(SRCLIB)16_head.c
171
172 jsmn.$(OBJ): $(JSMNLIB)jsmn.h $(JSMNLIB)jsmn.c
173         wcl $(FLAGS) -c $(JSMNLIB)jsmn.c
174
175 #farjsmn.$(OBJ): $(JSMNLIB)farjsmn.h $(JSMNLIB)farjsmn.c
176 #       wcl $(FLAGS) $(MFLAGS) -c $(JSMNLIB)farjsmn.c
177
178 #memory.$(OBJ): $(EXMMLIB)memory.h $(EXMMLIB)memory.c
179 #       wcl $(FLAGS) $(MFLAGS) -c $(EXMMLIB)memory.c
180
181 #
182 #other~
183 #
184 clean: .symbolic
185         @$(REMOVECOMMAND) *.$(OBJ)
186         @$(REMOVECOMMAND) *.lib
187         @wlib -n 16.lib
188         @wlib -n  gfx.lib
189 #       @$(REMOVECOMMAND) *.OBJ
190 #       @$(REMOVECOMMAND) *.out
191 #       @$(REMOVECOMMAND) *.OUT
192 #       @$(REMOVECOMMAND) makefi~1
193 #       @$(REMOVECOMMAND) makefile~
194 #       @$(REMOVECOMMAND) __WCL__.LNK
195 #       @$(REMOVECOMMAND) *.smp
196 #       @$(REMOVECOMMAND) *.SMP
197