| 1 | # To build you must have installed :
|
|---|
| 2 | # OpenWatcom
|
|---|
| 3 | #
|
|---|
| 4 | # 07-Sep-2010 David Azarewicz Makefile changed to use Watcom tools
|
|---|
| 5 |
|
|---|
| 6 | WATCOM=E:\Watcom
|
|---|
| 7 |
|
|---|
| 8 | .ERASE
|
|---|
| 9 | .SUFFIXES
|
|---|
| 10 | .SUFFIXES: .lst .exe .obj .c .cpp .asm .lib .def
|
|---|
| 11 |
|
|---|
| 12 | # Options for Watcom C compiler
|
|---|
| 13 | # -bt=os2v2 = Build target OS is OS/2
|
|---|
| 14 | # -5s = Optimize for Pentium, use stack for variables in calls
|
|---|
| 15 | # -o = Optimization - i = enable inline intrinsic functions
|
|---|
| 16 | # l = enable loop optimizations
|
|---|
| 17 | # -s = Omit stack size checking from start of each function
|
|---|
| 18 | # -wx = Warning level set to maximum (vs 1..4)
|
|---|
| 19 | # -zq = Operate quietly
|
|---|
| 20 | # -zp4 = default packing 4
|
|---|
| 21 | CC=wcc386
|
|---|
| 22 | CFLAGS=-5s -bm -s -wx -orli -zq -zp4 -bt=os2v2_dll
|
|---|
| 23 |
|
|---|
| 24 | LINK=wlink
|
|---|
| 25 |
|
|---|
| 26 | # Options for Watcom assembler
|
|---|
| 27 | # -bt=os2 = Build target OS is OS/2
|
|---|
| 28 | # -d1 = Include line number info in object
|
|---|
| 29 | # (necessary to produce assembler listing)
|
|---|
| 30 | # -i = Include list
|
|---|
| 31 | # -zq = Operate quietly
|
|---|
| 32 | # -3p = 80386 protected-mode instructions
|
|---|
| 33 | #
|
|---|
| 34 | ASM=wasm
|
|---|
| 35 | AFLAGS=-5p -d1 -zq -bt=os2
|
|---|
| 36 |
|
|---|
| 37 | #since BEGINLIBPATH doesn't work, we load the dll's manually
|
|---|
| 38 | !ifdef __LOADDLL__
|
|---|
| 39 | !loaddll wlink $(WATCOM)\binp\dll\wlinkd.dll
|
|---|
| 40 | !loaddll wcc386 $(WATCOM)\binp\dll\wccd386.dll
|
|---|
| 41 | !loaddll wlib $(WATCOM)\binp\dll\wlibd.dll
|
|---|
| 42 | !endif
|
|---|
| 43 |
|
|---|
| 44 | OBJ=unilib.obj unictl.obj unipcm.obj uniaud.obj pcmmulti.obj cputest.obj fast_memcpy.obj fastmemcpy.obj resample.obj resample2.obj
|
|---|
| 45 |
|
|---|
| 46 | .before:
|
|---|
| 47 | @set WATCOM=$(WATCOM)
|
|---|
| 48 | @set PATH=$(WATCOM)\BINP;$(WATCOM)\BINW;$(%PATH)
|
|---|
| 49 | @set EDPATH=$(WATCOM)\EDDAT
|
|---|
| 50 | @set INCLUDE=.;$(WATCOM)\H;$(WATCOM)\H\OS2;
|
|---|
| 51 |
|
|---|
| 52 | .c.obj: .AUTODEPEND
|
|---|
| 53 | $(CC) $(CFLAGS) $*.c
|
|---|
| 54 |
|
|---|
| 55 | .asm.obj: .AUTODEPEND
|
|---|
| 56 | $(ASM) $(AFLAGS) $*.asm
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 | all: uniaud.dll uniaud.lib
|
|---|
| 60 |
|
|---|
| 61 | uniaud.dll: $(OBJ) uniaud.def
|
|---|
| 62 | @%create $^*.lrf
|
|---|
| 63 | @%append $^*.lrf system os2v2_dll initinstance terminstance
|
|---|
| 64 | @%append $^*.lrf option quiet
|
|---|
| 65 | @%append $^*.lrf option manyautodata
|
|---|
| 66 | @%append $^*.lrf option map
|
|---|
| 67 | @%append $^*.lrf name $^.
|
|---|
| 68 | @for %i in ($(OBJ)) do @%append $^*.lrf file %i
|
|---|
| 69 | @%append $^*.lrf export=uniaud.def
|
|---|
| 70 | $(LINK) @$^*.lrf
|
|---|
| 71 | @%erase $^*.lrf
|
|---|
| 72 |
|
|---|
| 73 | uniaud_static.lib: $(OBJ)
|
|---|
| 74 | @%create $^*.lbc
|
|---|
| 75 | @for %i in ($(OBJ)) do @%append $^*.lbc +%i
|
|---|
| 76 | wlib -n -b -q $^@ @$^*.lbc
|
|---|
| 77 | @%erase $^*.lbc
|
|---|
| 78 |
|
|---|
| 79 | uniaud.lib: uniaud.dll
|
|---|
| 80 | wlib -n -b -q -iro -p=16 uniaud.lib +uniaud.dll
|
|---|
| 81 |
|
|---|
| 82 | clean: .SYMBOLIC
|
|---|
| 83 | @rm *.obj *.lib *.exe *.dll *.map *.lst
|
|---|
| 84 |
|
|---|
| 85 | xfast_memcpy.obj: fast_memcpy.c
|
|---|
| 86 | $(CC) $(CFLAGS) -DFASTMEMCPY_TEST $*.c
|
|---|
| 87 |
|
|---|
| 88 | fast_memcpy.exe: fast_memcpy.obj fastmemcpy.obj cputest.obj
|
|---|
| 89 | @%create $^*.lrf
|
|---|
| 90 | @%append $^*.lrf system os2v2
|
|---|
| 91 | @%append $^*.lrf option quiet
|
|---|
| 92 | @%append $^*.lrf name $^.
|
|---|
| 93 | @%append $^*.lrf file fast_memcpy.obj
|
|---|
| 94 | @%append $^*.lrf file fastmemcpy.obj
|
|---|
| 95 | @%append $^*.lrf file cputest.obj
|
|---|
| 96 | $(LINK) @$^*.lrf
|
|---|
| 97 | @%erase $^*.lrf
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|