#****************************************************************************** # Makefile for 32 bits OS/2 SB Live driver # # Copyright 2000 Sander van Leeuwen (sandervl@xs4all.nl) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public # License along with this program; if not, write to the Free # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, # USA. # #****************************************************************************** !include ..\include\version.mak INC = .;$(%WATCOM)\H;..\runtime;..\include;$(%DDK)\base\h INCA = -I:$(%DDK)\BASE\INC #=================================================================== # # Auto-dependency information # #=================================================================== .ERASE .SUFFIXES: .SUFFIXES: .lst .obj .lib .cpp .c .asm .def !if "$(DEBUG)" == "1" CFLAGS = -dDEBUG -bt=os2v2 -e60 -hc -d2 -5r -i$(INC) -omlinear -s -w4 -xd -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -zp1 ASFLAGS = -Mb -Li -Sv:M510 !else CFLAGS = -bt=os2v2 -e60 -5r -i$(INC) -omlinear -s -w4 -xd -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -zp1 ASFLAGS = -Mb -Li -Sv:M510 !endif !if "$(KEE)" == "1" CFLAGS = $(CFLAGS) -mf -DKEE ASFLAGS = $(ASFLAGS) -D:KEE LNKFILE = sblivekee.lnk !else CFLAGS = $(CFLAGS) -mc -zu LNKFILE = sblive.lnk !endif CC = WPP386 $(CFLAGS) $(IWC) ASM = alp $(ASFLAGS) $(INCA) DFLAGS = -l -s DIS = WDISASM $(DFLAGS) !if "$(DEBUG)" == "1" LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global d codeview !else LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global !endif QFLAGS = system os2 option quiet, map, align=512 LINK = WLINK $(LFLAGS) BFLAGS = -s -t -c -b -q -n LIB = WLIB $(BFLAGS) IFLAGS = /nologo IMPLIB = IMPLIB $(IFLAGS) .obj.lst: $(DIS) $* .c.obj: .AUTODEPEND $(CC) $*.c .cpp.obj: .AUTODEPEND $(CC) $*.cpp .asm.obj: .AUTODEPEND $(ASM) $*.asm -Fl:$*.lst .def.lib: $(IMPLIB) $*.lib $*.def #=================================================================== # # List of source files # #=================================================================== FILEFIRST= startup.obj FILE2 = strategy.obj FILE3 = init.obj FILE4 = impmvdm.lib devhlp.obj FILE5 = idc.obj dispatch.obj FILE6 = impdos.lib !if "$(KEE)" == "1" FILE7 = impkee.lib !endif FILE8 = ..\sblive\sblive32.lib ..\lib32\linuxlib.lib FILELAST = end.obj FILES = $(FILEFIRST) $(FILE0) $(FILE1) $(FILE2) $(FILE3) $(FILE4) $(FILE5) $(FILE6) $(FILE7) $(FILE8) $(FILE9) $(FILELAST) TARGET = sblive32 WMAPNAME = sblive32.wmap #=================================================================== # # Specific dependencies # #=================================================================== all: $(TARGET).sys $(LNKFILE): makefile.os2 ..\include\version.mak @%write $^@ name $(TARGET).sys @%write $^@ option alignment=16 @%write $^@ option description '@$#$(_VENDOR):$(_VERSION)$#@' @%write $^@ option map=$(WMAPNAME) @for %f in ($(FILES)) do @%append $^@ file %f #!if "$(KEE)" == "1" @%write $^@ import DOSIODELAYCNT DOSCALLS.427 #!endif @%write $^@ library $(%WATCOM)\lib386\os2\clib3r.lib $(TARGET).sys: $(LNKFILE) $(FILES) $(LINK) @$(LNKFILE) ..\drv16\wat2map $(WMAPNAME) $(TARGET).MAP mapsym $(TARGET).MAP copy $(TARGET).sys ..\bin !ifdef KEE copy $(TARGET).sys ..\bin\$(TARGET)kee.sys !else copy $(TARGET).sys ..\bin\$(TARGET)w4.sys !endif copy $(TARGET).sym ..\bin clean: del *.obj *.err *.lnk *.sys *.sym *.lst *.map *.wmap *.lib