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

Last change on this file since 9 was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 8.1 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
121
122#######################################
123#
124# Define *.ih files.
125#
126#######################################
127MM_IHFILES = ./include/cwmmdataf.ih ./include/cwmmdisk.ih ./include/mmfolder.ih
128
129IHFILES = ./include/cwmp3.ih \
130 ./include/cwogg.ih \
131 ./include/cwaudio.ih \
132 ./include/cwcdtrack.ih \
133 ./include/mmwav.ih \
134 ./include/cwaif.ih \
135 ./include/cwau.ih \
136 ./include/cw_au.ih \
137 ./include/cwiff.ih \
138 ./include/cwsndf.ih \
139 ./include/cwvoc.ih \
140 ./include/cwastream.ih \
141 ./include/cwmidi.ih \
142 ./include/cwm3u.ih \
143 ./include/cwflac.ih
144
145VID_IHFILES = ./include/cwvideo.ih \
146 ./include/cwmpg.ih \
147 ./include/cwmov.ih \
148 ./include/cwfli.ih \
149 ./include/cwavi.ih
150
151IMG_IHFILES = ./include/wpimage.ih \
152 ./include/cwimage.ih \
153 ./include/cwavc.ih \
154 ./include/cwdib.ih \
155 ./include/cwgif.ih \
156 ./include/cwjpg.ih \
157 ./include/cwpcd.ih \
158 ./include/cwpcx.ih \
159 ./include/cwtga.ih \
160 ./include/cwtiff.ih \
161 ./include/cwmmotion.ih \
162 ./include/cwbmp.ih \
163 ./include/cwpng.ih
164
165#######################################
166#
167# Define targets to build
168#
169#######################################
170all: cwmm.dll $(HLP_FILES)
171 cd ./mm-progs && make
172
173
174RESDLL :
175
176cwmm.dll: $(MM_IHFILES) $(IHFILES) $(VID_IHFILES) $(IMG_IHFILES) \
177 $(ALL_OBJECTS)
178 @create_cwmm_def.CMD ./c/cwmm.def
179 $(CC) $(LDFLAGS) /L /Fm$(basename $@) /Fe$@ $(ALL_OBJECTS) $(LIBS) ./c/cwmm.def
180#Add icons to DLL
181 cd ./res && make
182 rc ./res/common_res/cwaudio.res cwmm.dll
183 MAPSYM $(basename $@)
184
185###################################
186#
187# Rules for generating online help
188#
189###################################
190# German
191./Help/de/cwmm049.hlp: ./Help/de/cwmm049.ipf
192 cd ./Help/de && make
193
194# English
195./Help/en/cwmm.hlp: ./Help/en/cwmm.ipf
196 cd ./Help/en && make
197
198# Dutch
199./Help/nl/cwmm031.hlp: ./Help/nl/cwmm031.ipf
200 cd ./Help/nl && make
201
202# Italian
203./Help/it/cwmm039.hlp: ./Help/it/cwmm039.ipf
204 cd ./Help/it && make
205
206###################################
207#
208# Create all the *.ih files from the IDL files #
209#
210###################################
211
212##### Create *.ih files for base MM classes ####
213./include/%.ih: $(IDLDIR)/idl_mm/%.idl
214 $(MM_SCCOMPILEC)
215 $(MM_SCCOMPILEIH)
216
217#### Create *.ih files for audio classes ####
218./include/%.ih: $(IDLDIR)/idl_audio/%.idl
219 $(AUD_SCCOMPILEC)
220 $(AUD_SCCOMPILEIH)
221
222#### Create *.ih files for video classes ####
223./include/%.ih: $(IDLDIR)/idl_video/%.idl
224 $(VID_SCCOMPILEC)
225 $(VID_SCCOMPILEIH)
226
227#### Create *.ih files for image classes ####
228./include/wpimage.ih: $(IDLDIR)/idl_image/wpimage.idl
229 $(IMG_SCCOMPILEIH)
230
231./include/cwimage.ih: $(IDLDIR)/idl_image/cwimage.idl
232 $(IMG_SCCOMPILEIH)
233 $(IMG_SCCOMPILEC)
234 sc -shh -I $(IDLDIR)/idl_image -S128000 -dinclude -m noqualifytypes $<
235
236./include/%.ih: $(IDLDIR)/idl_image/%.idl
237 $(IMG_SCCOMPILEC)
238 $(IMG_SCCOMPILEIH)
239
240###################################
241#
242# Rules for compiling
243#
244###################################
245
246# Compile base MM classes
247$(OBJDIR)/%.obj: $(CDIR)/c_mm/%.c ./include/%.ih
248 $(COMPILE)
249
250# Compile audio MM classes
251$(OBJDIR)/%.obj: $(CDIR)/c_audio/%.c ./include/%.ih
252 $(COMPILE)
253
254# Compile video MM classes
255$(OBJDIR)/%.obj: $(CDIR)/c_video/%.c ./include/%.ih
256 $(COMPILE)
257
258# Compile image MM classes
259$(OBJDIR)/%.obj: $(CDIR)/c_image/%.c ./include/%.ih
260 $(COMPILE)
261
262$(OBJDIR)/bitmap.obj: $(CDIR)/c_image/bitmap.c
263 $(COMPILE)
264
265# Compile common functions
266$(OBJDIR)/except.obj: $(CDIR)/c_common/except.c ./inc/omf.h ./inc/sym.h
267 $(COMPILE)
268
269$(OBJDIR)/%.obj: $(CDIR)/c_common/%.c
270 $(COMPILE)
271
272# Compile lib files containg generic function
273$(LIBDIR)/%.obj: $(COMMONSRC)/%.c
274 $(COMPILE)
275
276###################################
277#
278# Rules for cleaning the tree
279#
280###################################
281
282clean:
283 -cd $(OBJDIR) && rm *.obj
284 -cd ./include && rm *.ih
285 -cd ./include && rm *.h
286 -cd ./include && rm *.hh
287 -cd $(LIBDIR) && rm *.obj
288 -rm *.dll
289 -rm *.map
290 -rm *.sym
291 -cd ./Help/de && make clean
292 -cd ./Help/en && make clean
293 -cd ./Help/nl && make clean
294 -cd ./Help/it && make clean
295 -cd ./res && make clean
296 -cd ./mm-progs && make clean
297
298
299cleaner:
300 -cd ./c && make clean
301 -cd ./common_functions && make cleaner
302 -cd ./mm-progs && make cleaner
303 -cd ./Help/de && make cleaner
304 -cd ./Help/en && make cleaner
305 -cd ./Help/nl && make cleaner
306 -cd ./Help/it && make cleaner
307 -cd ./res && make cleaner
308 -cd ./mm-progs && make cleaner
309 -cd ./include && rm *.*~
310 -cd ./inc && rm *.*~
311 -cd $(IDLDIR)/idl_audio && rm *.*~
312 -cd $(IDLDIR)/idl_image && rm *.*~
313 -cd $(IDLDIR)/idl_mm && rm *.*~
314 -cd $(IDLDIR)/idl_video && rm *.*~
315
316distribution:
317 make
318
319
Note: See TracBrowser for help on using the repository browser.