source: cmedia/trunk/Install/makefile.os2@ 554

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

Update to version 0.2.3

File size: 8.9 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##############################################################################
179# UPDINI.SCR Target Descriptions #
180##############################################################################
181
182updini.scr: $(DEF_DEP)
183# @%write $^@ ProfileData =
184# @%write $^@ (
185# @%write $^@ ini = "$$(DIR)0\\MIDITYPE.INI"
186# @%write $^@ appname = "MidiTypes"
187# @%write $^@ keyname = "$(BLDLVL_PRODUCT)"
188# @%write $^@ dll = "$$(DEST)$(MIDIDLL).DLL"
189# @%write $^@ id = 100L
190# @%write $^@ )
191# @%write $^@
192 @%write $^@ WPObject =
193 @%write $^@ (
194 @%write $^@ WPClassName = "WPProgram"
195 @%write $^@ WPTitle = "C-Media Control"
196 @%write $^@ WPSetupString = "EXENAME=$$(DEST)CMPCISET.EXE;OBJECTID=<CMEDIA_CONTROL>"
197 @%write $^@ WPLocation = "<MMPM2_FOLDER>"
198 @%write $^@ WPFlags = 1L
199 @%write $^@ )
200 @%write $^@
201 @%write $^@ WPObject =
202 @%write $^@ (
203 @%write $^@ WPClassName = "WPShadow"
204 @%write $^@ WPTitle = ""
205 @%write $^@ WPSetupString = "SHADOWID=<CMEDIA_CONTROL>"
206 @%write $^@ WPLocation = "<WP_DESKTOP>"
207 @%write $^@ WPFlags = 1L
208 @%write $^@ )
209 @%write $^@
210 @%write $^@ SpiInstall =
211 @%write $^@ (
212 @%write $^@ SpiDllName = "$$(DEST)$(SPIDLL).DLL"
213 @%write $^@ )
214 @%write $^@
215
216
217
218##############################################################################
219# AUDHELP.HLP Target Descriptions #
220##############################################################################
221
222help: $(HELPFILE).hlp
223
224$(HELPFILE).hlp: $(HELPFILE).itl makefile.os2
225 @echo Creating file $@ > con
226 $(IPF) $(HELPFILE).itl /l=$(L) /codepage=$(P) /country=$(C)
227 @copy $(HELPFILE).hlp ..\bin\*.hlp > nul
228
229
230
231
232##############################################################################
233# Resource DLL Target Descriptions #
234# This DLL will also contain an (optional) MIDIMAP #
235##############################################################################
236
237rc: $(RCDLL).dll
238
239$(RCDLL).lrf: makefile.os2
240 @%write $^@ Name $(RCDLL).DLL
241 @%write $^@ System os2v2 dll
242 @%write $^@ Option Stub='..\tools\nostub.bin'
243 @%write $^@ Library OS2386.LIB
244 @%write $^@ Option Description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) Install Dll'
245 @%write $^@ File $(RCOBJS:.obj=,)
246
247
248$(RCDLL).dll: $(RCOBJS) $(RCRES).rc $(RCDLL).lrf $(DEF_DEP)
249 $(LINK) $(LFLAGS) @$(RCDLL).lrf
250 $(RC) $(RFLAGS) $(RCRES).rc $(RCDLL).dll
251 ..\Tools\repack /e:2 $(RCDLL).dll
252 ..\Tools\drvpck $(RCDLL).dll
253 @copy $(RCDLL).dll ..\bin > nul
254
255
256
257
258##############################################################################
259# SPI Resource DLL Target Descriptions #
260##############################################################################
261
262spi: $(SPIDLL).dll
263
264$(SPIDLL).lrf: makefile.os2
265 @%write $^@ Name $(SPIDLL).DLL
266 @%write $^@ System os2v2 dll
267 @%write $^@ Option Stub='..\tools\nostub.bin'
268 @%write $^@ Library OS2386.LIB
269 @%write $^@ Option Description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) SPI Resource Dll'
270 @%write $^@ File $(SPIOBJS:.obj=,)
271
272
273$(SPIDLL).dll: $(SPIOBJS) $(SPIRES).rc $(SPIDLL).lrf $(DEF_DEP)
274 $(LINK) $(LFLAGS) @$(SPIDLL).lrf
275 $(RC) $(RFLAGS) $(SPIRES).rc $(SPIDLL).dll
276 ..\Tools\repack /e:2 $(SPIDLL).dll
277 ..\Tools\drvpck $(SPIDLL).dll
278 @copy $(SPIDLL).dll ..\bin > nul
279
280
281##############################################################################
282# Cleanup directory #
283##############################################################################
284
285clean:
286 del *.dll *.obj *.err *.lrf *.res *.hlp *.scr
287
288
289
Note: See TracBrowser for help on using the repository browser.