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