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 | !include ..\include\version.mak
|
---|
23 |
|
---|
24 | INC = .;$(%WATCOM)\H;..\runtime;..\include;$(%DDK)\base\h
|
---|
25 | INCA = -I:$(%DDK)\BASE\INC
|
---|
26 |
|
---|
27 | #===================================================================
|
---|
28 | #
|
---|
29 | # Auto-dependency information
|
---|
30 | #
|
---|
31 | #===================================================================
|
---|
32 | .ERASE
|
---|
33 | .SUFFIXES:
|
---|
34 | .SUFFIXES: .lst .obj .lib .cpp .c .asm .def
|
---|
35 |
|
---|
36 | !if "$(DEBUG)" == "1"
|
---|
37 | CFLAGS = -dDEBUG -bt=os2v2 -e60 -hc -d2 -5r -i$(INC) -omlinear -s -w4 -xd -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -zp1
|
---|
38 | ASFLAGS = -Mb -Li -Sv:M510
|
---|
39 | !else
|
---|
40 | CFLAGS = -bt=os2v2 -e60 -5r -i$(INC) -omlinear -s -w4 -xd -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -zp1
|
---|
41 | ASFLAGS = -Mb -Li -Sv:M510
|
---|
42 | !endif
|
---|
43 |
|
---|
44 | !if "$(KEE)" == "1"
|
---|
45 | CFLAGS = $(CFLAGS) -mf -DKEE
|
---|
46 | ASFLAGS = $(ASFLAGS) -D:KEE
|
---|
47 | !else
|
---|
48 | CFLAGS = $(CFLAGS) -mc -zu
|
---|
49 | !endif
|
---|
50 |
|
---|
51 | CC = WPP386 $(CFLAGS) $(IWC)
|
---|
52 | ASM = alp $(ASFLAGS) $(INCA)
|
---|
53 |
|
---|
54 | DFLAGS = -l -s
|
---|
55 | DIS = WDISASM $(DFLAGS)
|
---|
56 |
|
---|
57 | !if "$(DEBUG)" == "1"
|
---|
58 | LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global d codeview
|
---|
59 | !else
|
---|
60 | LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global
|
---|
61 | !endif
|
---|
62 | QFLAGS = system os2 option quiet, map, align=512
|
---|
63 | LINK = WLINK $(LFLAGS)
|
---|
64 |
|
---|
65 | BFLAGS = -s -t -c -b -q -n
|
---|
66 | LIB = WLIB $(BFLAGS)
|
---|
67 |
|
---|
68 | IFLAGS = /nologo
|
---|
69 | IMPLIB = IMPLIB $(IFLAGS)
|
---|
70 |
|
---|
71 | .obj.lst:
|
---|
72 | $(DIS) $*
|
---|
73 |
|
---|
74 | .c.obj: .AUTODEPEND
|
---|
75 | $(CC) $*.c
|
---|
76 |
|
---|
77 | .cpp.obj: .AUTODEPEND
|
---|
78 | $(CC) $*.cpp
|
---|
79 |
|
---|
80 | .asm.obj: .AUTODEPEND
|
---|
81 | $(ASM) $*.asm -Fl:$*.lst
|
---|
82 |
|
---|
83 | .def.lib:
|
---|
84 | $(IMPLIB) $*.lib $*.def
|
---|
85 |
|
---|
86 | #===================================================================
|
---|
87 | #
|
---|
88 | # List of source files
|
---|
89 | #
|
---|
90 | #===================================================================
|
---|
91 | FILEFIRST= startup.obj
|
---|
92 | FILE2 = strategy.obj
|
---|
93 | FILE3 = init.obj
|
---|
94 | FILE4 = impmvdm.lib devhlp.obj
|
---|
95 | FILE5 = idc.obj dispatch.obj
|
---|
96 | FILE6 = impdos.lib
|
---|
97 | !if "$(KEE)" == "1"
|
---|
98 | FILE7 = impkee.lib
|
---|
99 | !endif
|
---|
100 | FILE8 = ..\sblive\sblive32.lib ..\lib32\linuxlib.lib
|
---|
101 | FILELAST = end.obj
|
---|
102 | FILES = $(FILEFIRST) $(FILE0) $(FILE1) $(FILE2) $(FILE3) $(FILE4) $(FILE5) $(FILE6) $(FILE7) $(FILE8) $(FILE9) $(FILELAST)
|
---|
103 | TARGET = sblive32
|
---|
104 | WMAPNAME = sblive32.wmap
|
---|
105 |
|
---|
106 |
|
---|
107 |
|
---|
108 | #===================================================================
|
---|
109 | #
|
---|
110 | # Specific dependencies
|
---|
111 | #
|
---|
112 | #===================================================================
|
---|
113 | all: $(TARGET).sys
|
---|
114 |
|
---|
115 | $(TARGET).lnk: makefile.os2 ..\include\version.mak
|
---|
116 | @%write $^@ name $(TARGET).sys
|
---|
117 | @%write $^@ option alignment=16
|
---|
118 | @%write $^@ option description '@$#$(_VENDOR):$(_VERSION)$#@'
|
---|
119 | @%write $^@ option map=$(WMAPNAME)
|
---|
120 | @for %f in ($(FILES)) do @%append $^@ file %f
|
---|
121 | #!if "$(KEE)" == "1"
|
---|
122 | @%write $^@ import DOSIODELAYCNT DOSCALLS.427
|
---|
123 | #!endif
|
---|
124 | @%write $^@ library $(%WATCOM)\lib386\os2\clib3r.lib
|
---|
125 |
|
---|
126 | $(TARGET).sys: $(TARGET).lnk $(FILES)
|
---|
127 | $(LINK) @$(TARGET).lnk
|
---|
128 | ..\drv16\wat2map $(WMAPNAME) $(TARGET).MAP
|
---|
129 | mapsym $(TARGET).MAP
|
---|
130 | copy $(TARGET).sys ..\bin
|
---|
131 | !ifdef KEE
|
---|
132 | copy $(TARGET).sys ..\bin\$(TARGET)kee.sys
|
---|
133 | !else
|
---|
134 | copy $(TARGET).sys ..\bin\$(TARGET)w4.sys
|
---|
135 | !endif
|
---|
136 | copy $(TARGET).sym ..\bin
|
---|
137 |
|
---|
138 | clean:
|
---|
139 | del *.obj *.err *.lnk *.sys *.sym *.lst *.map *.wmap *.lib
|
---|
140 |
|
---|