#/* SCCSID = src/dev/mme/tropez/makefile, tropez, c.basedd 97/10/22 */ #**************************************************************************** #* * #* Copyright (c) IBM Corporation 1994 - 1997. * #* * #* The following IBM OS/2 source code is provided to you solely for the * #* the purpose of assisting you in your development of OS/2 device drivers. * #* You may use this code in accordance with the IBM License Agreement * #* provided in the IBM Device Driver Source Kit for OS/2. * #* * #****************************************************************************/ # #- Set the environmental variables for compiling # .ERASE .SUFFIXES: .SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .h .lib NAME = sblive16 WMAPNAME = sblive16.wmap .BEFORE !ifndef %WATCOM set WATCOM=..\..\..\..\WATCOM !endif set LIB=$(%DDK)\BASE\LIB set INCLUDE=;.;$(%WATCOM)\H;..\runtime;$(%DDK)\BASE\SRC\DEV\RESOURCE\RMCALLS;$(%DDK)\BASE\H;$(%DDK)\BASE\SRC\INC;..\OS2Runtime;$(%DDK)\base\src\dev\mme\midi;..\include set PATH=$(%DDK)\BASE\TOOLS;$(%WATCOM)\BINP;$(%WATCOM)\BINW !include ..\include\version.mak ######################################### # Options for Watcom 16-bit C compiler ######################################### # -bt=os2 = Build target OS is OS/2 # -ms = Memory model small # -3 = Enable use of 80386 instructions # -4 = Optimize for 486 (assumes -3) # -5 = Optimize for Pentium (assumes -3) # -j = char default is unsigned # -d1 = Include line number info in object # (necessary to produce assembler listing) # -d2 = Include debugging info for ICAT # (necessary to produce assembler listing) # -o = Optimization - i = enable inline intrinsic functions # r = optimize for 80486 and pentium pipes # s = space is preferred to time # l = enable loop optimizations # a = relax aliasing constraints # n = allow numerically unstable optimizations # -s = Omit stack size checking from start of each function # -zl = Place no library references into objects # -wx = Warning level set to maximum (vs 1..4) # -zfp = Prevent use of FS selector # -zgp = Prevent use of GS selector # -zq = Operate quietly # -zm = Put each function in its own segment # -zu = Do not assume that SS contains segment of DGROUP # CC=wcc CPP=wpp !if "$(DEBUG)" == "1" CFLAGS =-ms -5 -bt=os2 -hc -d2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DDEBUG -DTARGET_OS216 CPPFLAGS=-ms -5 -bt=os2 -hc -d2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DDEBUG -DTARGET_OS216 LFLAGS = d codeview !else CFLAGS =-ms -5 -bt=os2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DTARGET_OS216 CPPFLAGS=-ms -5 -bt=os2 -olinars -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DTARGET_OS216 LFLAGS = !endif ######################################### # Options for Watcom assembler ######################################### # -bt=os2 = Build target OS is OS/2 # -d1 = Include line number info in object # (necessary to produce assembler listing) # -i = Include list # -zq = Operate quietly # -3p = 80386 protected-mode instructions # ASM=wasm AFLAGS=-d1 -zq -3p -i LINK=wlink $(LFLAGS) ######################################### # Inference rules ######################################### .c.obj: .AUTODEPEND $(CC) $(CPPFLAGS) $*.c .cpp.obj: .AUTODEPEND $(CPP) $(CPPFLAGS) $*.cpp .asm.obj: .AUTODEPEND $(ASM) $(AFLAGS) $*.asm ######################################### # Object file list ######################################### OBJS1=segments.obj header.obj OBJS2=audiohw.obj event.obj commdbg.obj OBJS3= OBJS4=idc_vdd.obj init.obj ioctl.obj irq.obj OBJS5=malloc.obj maudio.obj memutil.obj OBJS6=midimsg.obj midipars.obj midistrm.obj mpu401.obj OBJS7=parse.obj queue.obj rm.obj rtmidi.obj OBJS8=ssm_idc.obj strategy.obj stream.obj timer.obj vddentry.obj waudio.obj OBJS9=waveplay.obj waverec.obj wavestrm.obj dwavestrm.obj ossidc16.obj OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9) all: $(NAME).sys $(NAME).sym $(NAME).lrf: makefile.os2 ..\include\version.mak @%write $^@ system os2 dll @%write $^@ option quiet @%write $^@ option verbose @%write $^@ option caseexact @%write $^@ option cache @%write $^@ option map=$(WMAPNAME) @%write $^@ option description '@$#$(_VENDOR):$(_VERSION)$#@' @%write $^@ name $(NAME).sys @for %f in ($(OBJS)) do @%append $^@ file %f @%write $^@ import DOSIODELAYCNT DOSCALLS.427 @%write $(NAME).lrf library $(%DDK)\BASE\lib\os2286.lib @%write $(NAME).lrf library ..\runtime\runtime.lib @%write $(NAME).lrf library $(%DDK)\BASE\src\dev\resource\rmcalls\rmcalls.lib @%write $(NAME).lrf library $(%DDK)\BASE\SRC\DEV\THINKPAD\DOCKII\APMCALLS\apmcalls.lib @%write $(NAME).lrf library $(%WATCOM)\lib286\plibs.lib $(NAME).sys: $(OBJS) $(NAME).lrf makefile.os2 $(%DDK)\BASE\lib\os2286.lib ..\runtime\runtime.lib $(%DDK)\BASE\src\dev\resource\rmcalls\rmcalls.lib $(LINK) @$(NAME).lrf copy $(NAME).sys ..\bin $(NAME).sym: $(WMAPNAME) wat2map $(WMAPNAME) $(NAME).MAP mapsym $(NAME).MAP copy $(NAME).sym ..\bin clean: del *.obj *.err *.lnk *.sys *.sym *.lst *.map *.wmap *.lrf