source: branches/v2.9/classes/makefile@ 23

Last change on this file since 23 was 23, checked in by dryeo, 5 years ago

Build the classes/tw help

File size: 8.2 KB
Line 
1# Makefile
2
3include ../make.inc
4
5DISTNAME = cwaudio-classes-$(VERSION)
6CC = icc
7
8LDFLAGS = -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+
9#-Wcnd /Weff /Wini /Wpar /Wpro /Wuse /Wrea
10#CFLAGS = /Wuse /Wrea -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C
11CFLAGS = -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C
12
13LIBS = somtk.lib mmPM2.lib rexx.lib
14DEFS =
15
16MOREINC = ./include -I./inc -I../common_functions/include
17CDIR = ./c
18IDLDIR = ./idl
19OBJDIR = ./obj
20# Object files of common functions are going here
21LIBDIR = ./lib
22#Where the resource dlls are going
23RESDLLDIR = ./RES/dll
24
25
26#######################################
27#
28# Define compile command
29#
30#######################################
31COMPILE = $(CC) -I $(MOREINC) $(CFLAGS) /Fo$@ $<
32
33#Audio classes
34AUD_SCCOMPILEC = sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_audio -maddstar -mnoint -S128000 -C128000 $<
35AUD_SCCOMPILEIH = sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000 $<
36
37#Video
38VID_SCCOMPILEC = sc -I $(IDLDIR)/idl_video -p -r -sc -d$(CDIR)/c_video -maddstar -mnoint -S128000 -C128000 $<
39VID_SCCOMPILEIH = sc -I $(IDLDIR)/idl_video -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000 $<
40
41#image
42IMG_SCCOMPILEC = sc -I $(IDLDIR)/idl_image -p -r -sc -d$(CDIR)/c_image -maddstar -mnoint -S128000 -C128000 $<
43IMG_SCCOMPILEIH = sc -I $(IDLDIR)/idl_image -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000 $<
44
45#base classes
46MM_SCCOMPILEC = sc -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_mm -maddstar -mnoint -S128000 -C128000 $<
47MM_SCCOMPILEIH = sc -I $(IDLDIR)/idl_mm -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000 $<
48
49
50
51#######################################
52#
53# Define objects to build
54#
55#######################################
56
57# These are the object files containing general functions
58LIBOBJS = $(LIBDIR)/menu_funcs.obj \
59 $(LIBDIR)/message.obj \
60 $(LIBDIR)/ea_funcs.obj \
61 $(LIBDIR)/som_wps_funcs.obj \
62 $(LIBDIR)/sys_funcs.obj
63
64#Audio objects
65OBJECTS = $(OBJDIR)/cwmp3.obj \
66 $(OBJDIR)/cwogg.obj \
67 $(OBJDIR)/cwcdtrack.obj \
68 $(OBJDIR)/cwaudio.obj \
69 $(OBJDIR)/mmwav.obj \
70 $(OBJDIR)/cwaif.obj \
71 $(OBJDIR)/cwau.obj \
72 $(OBJDIR)/cw_au.obj \
73 $(OBJDIR)/cwiff.obj \
74 $(OBJDIR)/cwsndf.obj \
75 $(OBJDIR)/cwvoc.obj \
76 $(OBJDIR)/cwmidi.obj \
77 $(OBJDIR)/cwastream.obj \
78 $(OBJDIR)/cwm3u.obj \
79 $(OBJDIR)/cwflac.obj
80
81VID_OBJECTS = $(OBJDIR)/cwvideo.obj \
82 $(OBJDIR)/cwmpg.obj \
83 $(OBJDIR)/cwmov.obj \
84 $(OBJDIR)/cwfli.obj \
85 $(OBJDIR)/cwavi.obj
86
87IMG_OBJECTS = $(OBJDIR)/cwimage.obj \
88 $(OBJDIR)/cwavc.obj \
89 $(OBJDIR)/cwdib.obj \
90 $(OBJDIR)/cwgif.obj \
91 $(OBJDIR)/cwjpg.obj \
92 $(OBJDIR)/cwpcd.obj \
93 $(OBJDIR)/cwpcx.obj \
94 $(OBJDIR)/cwtga.obj \
95 $(OBJDIR)/cwtiff.obj \
96 $(OBJDIR)/cwmmotion.obj \
97 $(OBJDIR)/cwbmp.obj \
98 $(OBJDIR)/bitmap.obj \
99 $(OBJDIR)/cwpng.obj
100
101MM_OBJECTS = $(OBJDIR)/cwmmdataf.obj \
102 $(OBJDIR)/cwmmdisk.obj \
103 $(OBJDIR)/mmfolder.obj
104
105COMMON_OBJECTS = $(OBJDIR)/except.obj \
106 $(OBJDIR)/message.obj \
107 $(OBJDIR)/cd.obj \
108 $(OBJDIR)/mmrexx.obj \
109 $(OBJDIR)/helper.obj \
110 $(OBJDIR)/som_and_wps.obj
111
112ALL_OBJECTS = $(MM_OBJECTS) $(OBJECTS) $(VID_OBJECTS) $(IMG_OBJECTS) \
113 $(COMMON_OBJECTS) $(LIBOBJS)
114
115
116HLP_FILES = ./Help/de/cwmm049.hlp \
117 ./Help/en/cwmm.hlp \
118 ./Help/nl/cwmm031.hlp \
119 ./Help/it/cwmm039.hlp \
120 ./Help/tw/cwmm088.hlp
121
122
123#######################################
124#
125# Define *.ih files.
126#
127#######################################
128MM_IHFILES = ./include/cwmmdataf.ih ./include/cwmmdisk.ih ./include/mmfolder.ih
129
130IHFILES = ./include/cwmp3.ih \
131 ./include/cwogg.ih \
132 ./include/cwaudio.ih \
133 ./include/cwcdtrack.ih \
134 ./include/mmwav.ih \
135 ./include/cwaif.ih \
136 ./include/cwau.ih \
137 ./include/cw_au.ih \
138 ./include/cwiff.ih \
139 ./include/cwsndf.ih \
140 ./include/cwvoc.ih \
141 ./include/cwastream.ih \
142 ./include/cwmidi.ih \
143 ./include/cwm3u.ih \
144 ./include/cwflac.ih
145
146VID_IHFILES = ./include/cwvideo.ih \
147 ./include/cwmpg.ih \
148 ./include/cwmov.ih \
149 ./include/cwfli.ih \
150 ./include/cwavi.ih
151
152IMG_IHFILES = ./include/wpimage.ih \
153 ./include/cwimage.ih \
154 ./include/cwavc.ih \
155 ./include/cwdib.ih \
156 ./include/cwgif.ih \
157 ./include/cwjpg.ih \
158 ./include/cwpcd.ih \
159 ./include/cwpcx.ih \
160 ./include/cwtga.ih \
161 ./include/cwtiff.ih \
162 ./include/cwmmotion.ih \
163 ./include/cwbmp.ih \
164 ./include/cwpng.ih
165
166#######################################
167#
168# Define targets to build
169#
170#######################################
171all: cwmm.dll $(HLP_FILES)
172 cd ./mm-progs && make
173
174
175RESDLL :
176
177cwmm.dll: $(MM_IHFILES) $(IHFILES) $(VID_IHFILES) $(IMG_IHFILES) \
178 $(ALL_OBJECTS)
179 @create_cwmm_def.CMD ./c/cwmm.def
180 $(CC) $(LDFLAGS) /L /Fm$(basename $@) /Fe$@ $(ALL_OBJECTS) $(LIBS) ./c/cwmm.def
181#Add icons to DLL
182 cd ./res && make
183 rc ./res/common_res/cwaudio.res cwmm.dll
184 MAPSYM $(basename $@)
185
186###################################
187#
188# Rules for generating online help
189#
190###################################
191# German
192./Help/de/cwmm049.hlp: ./Help/de/cwmm049.ipf
193 cd ./Help/de && make
194
195# English
196./Help/en/cwmm.hlp: ./Help/en/cwmm.ipf
197 cd ./Help/en && make
198
199# Dutch
200./Help/nl/cwmm031.hlp: ./Help/nl/cwmm031.ipf
201 cd ./Help/nl && make
202
203# Italian
204./Help/it/cwmm039.hlp: ./Help/it/cwmm039.ipf
205 cd ./Help/it && make
206
207# Taiwan
208./Help/tw/cwmm088.hlp: ./Help/tw/cwmm088.ipf
209 cd ./Help/tw && make
210
211###################################
212#
213# Create all the *.ih files from the IDL files #
214#
215###################################
216
217##### Create *.ih files for base MM classes ####
218./include/%.ih: $(IDLDIR)/idl_mm/%.idl
219 $(MM_SCCOMPILEC)
220 $(MM_SCCOMPILEIH)
221
222#### Create *.ih files for audio classes ####
223./include/%.ih: $(IDLDIR)/idl_audio/%.idl
224 $(AUD_SCCOMPILEC)
225 $(AUD_SCCOMPILEIH)
226
227#### Create *.ih files for video classes ####
228./include/%.ih: $(IDLDIR)/idl_video/%.idl
229 $(VID_SCCOMPILEC)
230 $(VID_SCCOMPILEIH)
231
232#### Create *.ih files for image classes ####
233./include/wpimage.ih: $(IDLDIR)/idl_image/wpimage.idl
234 $(IMG_SCCOMPILEIH)
235
236./include/cwimage.ih: $(IDLDIR)/idl_image/cwimage.idl
237 $(IMG_SCCOMPILEIH)
238 $(IMG_SCCOMPILEC)
239 sc -shh -I $(IDLDIR)/idl_image -S128000 -dinclude -m noqualifytypes $<
240
241./include/%.ih: $(IDLDIR)/idl_image/%.idl
242 $(IMG_SCCOMPILEC)
243 $(IMG_SCCOMPILEIH)
244
245###################################
246#
247# Rules for compiling
248#
249###################################
250
251# Compile base MM classes
252$(OBJDIR)/%.obj: $(CDIR)/c_mm/%.c ./include/%.ih
253 $(COMPILE)
254
255# Compile audio MM classes
256$(OBJDIR)/%.obj: $(CDIR)/c_audio/%.c ./include/%.ih
257 $(COMPILE)
258
259# Compile video MM classes
260$(OBJDIR)/%.obj: $(CDIR)/c_video/%.c ./include/%.ih
261 $(COMPILE)
262
263# Compile image MM classes
264$(OBJDIR)/%.obj: $(CDIR)/c_image/%.c ./include/%.ih
265 $(COMPILE)
266
267$(OBJDIR)/bitmap.obj: $(CDIR)/c_image/bitmap.c
268 $(COMPILE)
269
270# Compile common functions
271$(OBJDIR)/except.obj: $(CDIR)/c_common/except.c ./inc/omf.h ./inc/sym.h
272 $(COMPILE)
273
274$(OBJDIR)/%.obj: $(CDIR)/c_common/%.c
275 $(COMPILE)
276
277# Compile lib files containg generic function
278$(LIBDIR)/%.obj: $(COMMONSRC)/%.c
279 $(COMPILE)
280
281###################################
282#
283# Rules for cleaning the tree
284#
285###################################
286
287clean:
288 -cd $(OBJDIR) && rm *.obj
289 -cd ./include && rm *.ih
290 -cd ./include && rm *.h
291 -cd ./include && rm *.hh
292 -cd $(LIBDIR) && rm *.obj
293 -rm *.dll
294 -rm *.map
295 -rm *.sym
296 -cd ./Help/de && make clean
297 -cd ./Help/en && make clean
298 -cd ./Help/nl && make clean
299 -cd ./Help/it && make clean
300 -cd ./Help/tw && make clean
301 -cd ./res && make clean
302 -cd ./mm-progs && make clean
303
304
305cleaner:
306 -cd ./c && make clean
307 -cd ./common_functions && make cleaner
308 -cd ./mm-progs && make cleaner
309 -cd ./Help/de && make cleaner
310 -cd ./Help/en && make cleaner
311 -cd ./Help/nl && make cleaner
312 -cd ./Help/it && make cleaner
313 -cd ./Help/tw && make cleaner
314 -cd ./res && make cleaner
315 -cd ./mm-progs && make cleaner
316 -cd ./include && rm *.*~
317 -cd ./inc && rm *.*~
318 -cd $(IDLDIR)/idl_audio && rm *.*~
319 -cd $(IDLDIR)/idl_image && rm *.*~
320 -cd $(IDLDIR)/idl_mm && rm *.*~
321 -cd $(IDLDIR)/idl_video && rm *.*~
322
323distribution:
324 make
325
326
Note: See TracBrowser for help on using the repository browser.