source: cmedia/trunk/Install/makefile.os2

Last change on this file was 558, checked in by rudi, 14 years ago

Allow cleanup

File size: 9.4 KB
Line 
1#******************************************************************************
2# Makefile for 32 bits OS/2 SB Live driver
3#
4# Copyright 2000 Sander van Leeuwen (sandervl@xs4all.nl)
5#
6# Modifications for C-Media 8738
7#
8# Copyright 2001 Rdiger Ihle (r.ihle@s-t.de)
9#
10# This program is free software; you can redistribute it and/or
11# modify it under the terms of the GNU General Public License as
12# published by the Free Software Foundation; either version 2 of
13# the License, or (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public
21# License along with this program; if not, write to the Free
22# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
23# USA.
24#
25#******************************************************************************
26
27.ERASE
28
29.SUFFIXES:
30.SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .rc .h .lib
31
32!include ..\include\version.mak
33
34CINCLUDES = ..\include
35HELPFILE = audhelp
36
37RCDLL = cardinfo
38RCRES = cardinfo
39
40MIDIDLL = cardinfo
41MIDIRES = cardinfo
42
43SPIDLL = spiinfo
44SPIRES = spiinfo
45
46
47DEF_DEP = makefile.os2 ..\include\sbversion.h ..\include\version.mak
48
49
50
51#################################
52# Definitions for C Compiler
53#################################
54
55CC = wcc386
56CFLAGS = -i$(CINCLUDES) -wx -e25 -zq -bt=os2 -mf -bd -s -zl
57
58
59#################################
60# Definitions for linker
61#################################
62LINK = wlink
63LFLAGS = op c op maxe=25 op many op map
64
65
66#########################################
67# Definitions for RESOURCE compiler
68#########################################
69RC = rc
70RFLAGS = -i $(CINCLUDES) -i $(DDK)\base\h
71
72
73#########################################
74# Definitions for Help Compiler
75#########################################
76IPF = ipfc
77L = ENU
78P = 437
79C = 1
80
81
82#################################
83# Inference Rules
84#################################
85.c.obj:
86 $(CC) $(CFLAGS) $^&.c
87
88
89#################################
90# Object file lists
91#################################
92
93RCOBJS = rcstub.obj
94MIDIOBJS = rcstub.obj
95SPIOBJS = rcstub.obj
96
97
98#############################################################################
99# Target Descriptions
100#############################################################################
101
102all: scripts rc spi help
103
104
105
106##################################
107# Script generation
108##################################
109
110scripts: control.scr audfiles.scr updini.scr midimap.scr
111 @copy control.scr ..\bin > nul
112 @copy audfiles.scr ..\bin > nul
113 @copy updini.scr ..\bin > nul
114# @copy midimap.scr ..\bin > nul
115
116
117##################################
118# CONTROL.SCR Target Descriptions
119##################################
120
121control.scr: $(DEF_DEP)
122 @%write $^@ package="$(BLDLVL_PRODUCT) Audio Installation"
123 @%write $^@ codepage=437
124 @%write $^@ filelist="audfiles.scr"
125 @%write $^@ groupcount=2
126 @%write $^@ munitcount=1
127 @%write $^@
128 @%write $^@ medianame="$(BLDLVL_PRODUCT) Audio Adapter Diskette"
129 @%write $^@
130 @%write $^@ sourcedir="\\"= 0
131 @%write $^@
132 @%write $^@ destindir="\\MMOS2\\" = 0
133 @%write $^@ destindir="\\MMOS2\\DLL\\" = 2
134 @%write $^@ destindir="\\MMOS2\\MOVIES\\" = 3
135 @%write $^@ destindir="\\MMOS2\\INSTALL\\" = 4
136 @%write $^@ destindir="\\MMOS2\\DSP\\" = 5
137 @%write $^@ destindir="\\MMOS2\\MACROS\\" = 6
138 @%write $^@ destindir="\\MMOS2\\HELP\\" = 7
139 @%write $^@ destindir="\\MMOS2\\SOUNDS\\" = 9
140 @%write $^@
141 @%write $^@ ssgroup=0
142 @%write $^@ ssname="mmbase"
143 @%write $^@ ssversion="1.1.3"
144 @%write $^@ sstermdll="iterm.dll"
145 @%write $^@ sstermdllentry="ITermEntry"
146 @%write $^@
147 @%write $^@ ssgroup=17
148 @%write $^@ ssname="$(BLDLVL_PRODUCT) Audio"
149 @%write $^@ ssversion="$(BLDLVL_REVISION).$(BLDLVL_FILEVER)"
150 @%write $^@ sssize=200
151 @%write $^@ ssdll="genin.dll"
152 @%write $^@ ssdllentry="InitGenin"
153 @%write $^@ ssdllinputparms="78"
154 @%write $^@ ssselect="VERSION"
155 @%write $^@ ssinich="updini.scr"
156
157
158##################################
159# AUDFILES.SCR Target Descriptions
160##################################
161
162audfiles.scr: $(DEF_DEP)
163 @%write $^@ /* Number of files */
164 @%write $^@ 9
165 @%write $^@ /* Disk Group Dest Source Filename */
166 @%write $^@ 0 17 0 0 "$(DRIVER16_FILE)"
167 @%write $^@ 0 17 0 0 "$(DRIVER32_FILE)"
168 @%write $^@ 0 17 0 0 "cmpciset.exe"
169 @%write $^@ 0 17 2 0 "$(RCDLL).dll"
170 @%write $^@ 0 17 2 0 "$(SPIDLL).dll"
171 @%write $^@ 0 17 4 0 "audplay.ico"
172 @%write $^@ 0 17 4 0 "midiplay.ico"
173 @%write $^@ 0 17 7 0 "audhelp.hlp"
174 @%write $^@ 0 17 4 0 "updini.scr"
175
176
177##############################################################################
178# UPDINI.SCR Target Descriptions #
179##############################################################################
180
181updini.scr: $(DEF_DEP)
182# @%write $^@ ProfileData =
183# @%write $^@ (
184# @%write $^@ ini = "$$(DIR)0\\MIDITYPE.INI"
185# @%write $^@ appname = "MidiTypes"
186# @%write $^@ keyname = "$(BLDLVL_PRODUCT)"
187# @%write $^@ dll = "$$(DEST)$(MIDIDLL).DLL"
188# @%write $^@ id = 100L
189# @%write $^@ )
190# @%write $^@
191 @%write $^@ WPObject =
192 @%write $^@ (
193 @%write $^@ WPClassName = "WPProgram"
194 @%write $^@ WPTitle = "C-Media Control"
195 @%write $^@ WPSetupString = "EXENAME=$$(DEST)CMPCISET.EXE;OBJECTID=<CMEDIA_CONTROL>"
196 @%write $^@ WPLocation = "<MMPM2_FOLDER>"
197 @%write $^@ WPFlags = 1L
198 @%write $^@ )
199 @%write $^@
200 @%write $^@ WPObject =
201 @%write $^@ (
202 @%write $^@ WPClassName = "WPShadow"
203 @%write $^@ WPTitle = ""
204 @%write $^@ WPSetupString = "SHADOWID=<CMEDIA_CONTROL>"
205 @%write $^@ WPLocation = "<WP_DESKTOP>"
206 @%write $^@ WPFlags = 1L
207 @%write $^@ )
208 @%write $^@
209 @%write $^@ SpiInstall =
210 @%write $^@ (
211 @%write $^@ SpiDllName = "$$(DEST)$(SPIDLL).DLL"
212 @%write $^@ )
213 @%write $^@
214
215
216##############################################################################
217# MIDIMAP.SCR Target Descriptions #
218##############################################################################
219
220midimap.scr: $(DEF_DEP)
221 @%write $^@ ProfileData =
222 @%write $^@ (
223 @%write $^@ ini = "$(DIR)0\\MIDITYPE.INI"
224 @%write $^@ appname = "MidiTypes"
225 @%write $^@ keyname = "C-Media 8738"
226 @%write $^@ dll = "$(DEST)CARDINFO.DLL"
227 @%write $^@ id = 100L
228 @%write $^@ )
229 @%write $^@
230
231
232##############################################################################
233# AUDHELP.HLP Target Descriptions #
234##############################################################################
235
236help: $(HELPFILE).hlp
237
238$(HELPFILE).hlp: $(HELPFILE).itl makefile.os2
239 @echo Creating file $@ > con
240 $(IPF) $(HELPFILE).itl /l=$(L) /codepage=$(P) /country=$(C)
241 @copy $(HELPFILE).hlp ..\bin\*.hlp > nul
242
243
244
245
246##############################################################################
247# Resource DLL Target Descriptions #
248# This DLL will also contain an (optional) MIDIMAP #
249##############################################################################
250
251rc: $(RCDLL).dll
252
253$(RCDLL).lrf: makefile.os2
254 @%write $^@ Name $(RCDLL).DLL
255 @%write $^@ System os2v2 dll
256 @%write $^@ Option Stub='..\tools\nostub.bin'
257 @%write $^@ Library OS2386.LIB
258 @%write $^@ Option Description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) Install Dll'
259 @%write $^@ File $(RCOBJS:.obj=,)
260
261
262$(RCDLL).dll: $(RCOBJS) $(RCRES).rc $(RCDLL).lrf $(DEF_DEP)
263 $(LINK) $(LFLAGS) @$(RCDLL).lrf
264 $(RC) $(RFLAGS) $(RCRES).rc $(RCDLL).dll
265 ..\Tools\repack /e:2 $(RCDLL).dll
266 ..\Tools\drvpck $(RCDLL).dll
267 @copy $(RCDLL).dll ..\bin > nul
268
269
270
271
272##############################################################################
273# SPI Resource DLL Target Descriptions #
274##############################################################################
275
276spi: $(SPIDLL).dll
277
278$(SPIDLL).lrf: makefile.os2
279 @%write $^@ Name $(SPIDLL).DLL
280 @%write $^@ System os2v2 dll
281 @%write $^@ Option Stub='..\tools\nostub.bin'
282 @%write $^@ Library OS2386.LIB
283 @%write $^@ Option Description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) SPI Resource Dll'
284 @%write $^@ File $(SPIOBJS:.obj=,)
285
286
287$(SPIDLL).dll: $(SPIOBJS) $(SPIRES).rc $(SPIDLL).lrf $(DEF_DEP)
288 $(LINK) $(LFLAGS) @$(SPIDLL).lrf
289 $(RC) $(RFLAGS) $(SPIRES).rc $(SPIDLL).dll
290 ..\Tools\repack /e:2 $(SPIDLL).dll
291 ..\Tools\drvpck $(SPIDLL).dll
292 @copy $(SPIDLL).dll ..\bin > nul
293
294
295#############################################################################
296# Cleanup directory
297#############################################################################
298.IGNORE
299
300clean:
301 del *.dll *.obj *.err *.lrf *.res *.hlp *.scr *.map *.bak 2>nul
302
Note: See TracBrowser for help on using the repository browser.