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

Last change on this file since 354 was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

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 $^@ 8
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
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##############################################################################
218# AUDHELP.HLP Target Descriptions #
219##############################################################################
220
221help: $(HELPFILE).hlp
222
223$(HELPFILE).hlp: $(HELPFILE).itl makefile.os2
224 @echo Creating file $@ > con
225 $(IPF) $(HELPFILE).itl /l=$(L) /codepage=$(P) /country=$(C)
226 @copy $(HELPFILE).hlp ..\bin\*.hlp > nul
227
228
229
230
231##############################################################################
232# Resource DLL Target Descriptions #
233# This DLL will also contain an (optional) MIDIMAP #
234##############################################################################
235
236rc: $(RCDLL).dll
237
238$(RCDLL).lrf: makefile.os2
239 @%write $^@ Name $(RCDLL).DLL
240 @%write $^@ System os2v2 dll
241 @%write $^@ Option Stub='..\tools\nostub.bin'
242 @%write $^@ Library OS2386.LIB
243 @%write $^@ Option Description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) Install Dll'
244 @%write $^@ File $(RCOBJS:.obj=,)
245
246
247$(RCDLL).dll: $(RCOBJS) $(RCRES).rc $(RCDLL).lrf $(DEF_DEP)
248 $(LINK) $(LFLAGS) @$(RCDLL).lrf
249 $(RC) $(RFLAGS) $(RCRES).rc $(RCDLL).dll
250 ..\Tools\repack /e:2 $(RCDLL).dll
251 ..\Tools\drvpck $(RCDLL).dll
252 @copy $(RCDLL).dll ..\bin > nul
253
254
255
256
257##############################################################################
258# SPI Resource DLL Target Descriptions #
259##############################################################################
260
261spi: $(SPIDLL).dll
262
263$(SPIDLL).lrf: makefile.os2
264 @%write $^@ Name $(SPIDLL).DLL
265 @%write $^@ System os2v2 dll
266 @%write $^@ Option Stub='..\tools\nostub.bin'
267 @%write $^@ Library OS2386.LIB
268 @%write $^@ Option Description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) SPI Resource Dll'
269 @%write $^@ File $(SPIOBJS:.obj=,)
270
271
272$(SPIDLL).dll: $(SPIOBJS) $(SPIRES).rc $(SPIDLL).lrf $(DEF_DEP)
273 $(LINK) $(LFLAGS) @$(SPIDLL).lrf
274 $(RC) $(RFLAGS) $(SPIRES).rc $(SPIDLL).dll
275 ..\Tools\repack /e:2 $(SPIDLL).dll
276 ..\Tools\drvpck $(SPIDLL).dll
277 @copy $(SPIDLL).dll ..\bin > nul
278
279
280##############################################################################
281# Cleanup directory #
282##############################################################################
283
284clean:
285 del *.dll *.obj *.err *.lrf *.res *.hlp *.scr
286
287
288
Note: See TracBrowser for help on using the repository browser.