source: cmedia/trunk/Drv32/makefile.os2@ 558

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

Allow cleanup

File size: 4.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# This program is free software; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License as
8# published by the Free Software Foundation; either version 2 of
9# the License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public
17# License along with this program; if not, write to the Free
18# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
19# USA.
20#
21#******************************************************************************
22.ERASE
23
24.SUFFIXES:
25.SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .h .lib
26
27!include ..\include\version.mak
28
29CINCLUDES = .;$(%WATCOM)\H;..\runtime;..\include;$(%DDK)\base\h
30AINCLUDES = -I:$(%DDK)\BASE\INC
31
32LNKFILE = $(OBJDIR)\cmpci32.lrf
33
34EVERYTHING_AS_CPP=1
3532BIT=1
36!include ..\makefile.inc
37!include ..\include\sblive32.mak
38
39#===================================================================
40#
41# List of source files
42#
43#===================================================================
44FILEFIRST= startup.obj
45FILE2 = strategy.obj
46FILE3 = init.obj
47FILE4 = devhlp.obj
48FILE5 = idc.obj dispatch.obj
49FILE6 = impdos.lib
50!if "$(KEE)" == "1"
51FILE7 = impkee.lib
52!endif
53FILE8 = impmvdm.lib
54FILELAST = end.obj
55FILES = $(FILEFIRST) $(FILE0) $(FILE1) $(FILE2) $(FILE3) $(FILE4) $(FILE5) $(FILE6) $(FILE7) $(FILE8) $(FILE9) $(FILELAST)
56
57TARGET = cmpci32
58WMAPNAME = $(OBJDIR)\cmpci32.wmap
59
60
61
62#===================================================================
63#
64# Specific dependencies
65#
66#===================================================================
67all: $(OBJDIR)\$(TARGET).sys $(OBJDIR)\$(TARGET).sym
68
69$(LNKFILE): makefile.os2 ..\include\version.mak
70 @%write $^@ disable 1014, 1023
71 @%write $^@ option quiet
72 @%write $^@ option verbose
73 @%write $^@ option caseexact
74 @%write $^@ option cache
75 @%write $^@ Option stub='..\tools\nostub.bin'
76 @%write $^@ option map=$(WMAPNAME)
77!if "$(KEE)" == "1"
78 @%write $^@ option description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) Audio Driver (KEE)'
79!else
80 @%write $^@ option description '@$#$(BLDLVL_VENDOR):$(BLDLVL_REVISION)$#@$#$#1$#$# $(BLDLVL_DATETIME) $(BLDLVL_MACHINE)::::$(BLDLVL_FILEVER)::@@$(BLDLVL_PRODUCT) Audio Driver (W4)'
81!endif
82 @%write $^@ name $(OBJDIR)\$(TARGET).sys
83 @for %f in ($(FILES)) do @%append $^@ file $(OBJDIR)\%f
84 @%write $^@ import DOSIODELAYCNT DOSCALLS.427
85!if "$(KEE)" == "1"
86 @%write $^@ library $(SBLIVE_LIB)\cmpci32kee.lib
87 @%write $^@ library $(SBLIVE_LIB)\linuxlibkee.lib
88!else
89 @%write $^@ library $(SBLIVE_LIB)\cmpci32.lib
90 @%write $^@ library $(SBLIVE_LIB)\linuxlib.lib
91!endif
92 @%write $^@ library $(%WATCOM)\lib386\os2\clib3r.lib
93
94$(OBJDIR)\$(TARGET).sys: $(LNKFILE) $(FILES)
95 $(LINK) @$(LNKFILE)
96
97 -$(SBLIVE_TOOLS)\watfix $(OBJDIR)\$(TARGET).sys
98!ifndef DEBUG
99 $(SBLIVE_TOOLS)\repack /e:2 $(OBJDIR)\$(TARGET).sys
100 $(SBLIVE_TOOLS)\drvpck $(OBJDIR)\$(TARGET).sys
101!endif
102
103 copy $(OBJDIR)\$(TARGET).sys $(SBLIVE_BIN)
104!ifdef KEE
105 copy $(OBJDIR)\$(TARGET).sys $(SBLIVE_BIN)\$(TARGET)kee.sys
106 copy $(OBJDIR)\$(TARGET).sys $(SBLIVE_BIN_)\$(TARGET)kee.sys
107!else
108 copy $(OBJDIR)\$(TARGET).sys $(SBLIVE_BIN)\$(TARGET)w4.sys
109 copy $(OBJDIR)\$(TARGET).sys $(SBLIVE_BIN_)\$(TARGET)w4.sys
110!endif
111
112$(OBJDIR)\$(TARGET).sym: $(WMAPNAME)
113 $(WAT2MAP) $(WMAPNAME) $(OBJDIR)\$(TARGET).MAP
114 cd $(OBJDIR)
115 mapsym $(TARGET).MAP
116 cd ..\..
117 copy $(OBJDIR)\$(TARGET).sym $(SBLIVE_BIN)
118
119#############################################################################
120# Cleanup directory
121#############################################################################
122.IGNORE
123
124clean:
125 cd $(OBJDIR)
126 del *.obj *.err *.lnk *.sys *.sym *.lst *.map *.wmap *.lrf *.lib *.bak 2>nul
127 cd ..\..
128
Note: See TracBrowser for help on using the repository browser.