source: branches/v2.9_Lars/classes/makefile

Last change on this file was 119, checked in by erdmann, 2 years ago

rework the way the MMCDTrack class object is loaded: we cannot load it via dynamic linking because CWMM.DLL is not on libpath. Therefore, on class construction of CWMediaFolder, we query the location of class library for class MMCDTrack dynamically (find CWMM.DLL) and then have the class object for MMCDTrack constructed and saved in a member variable of CWMediaFolder

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