source: trunk/classes/makefile@ 4

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

Import modifications from cwmm-0_2_9-work-01_10_2006.zip dated 2006-08-27

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