| 1 |
|
|---|
| 2 | CREATEPATH=$(SBLIVE_TOOLS)\CreatePath.cmd
|
|---|
| 3 | WAT2MAP=$(SBLIVE_TOOLS)\wat2map.cmd
|
|---|
| 4 |
|
|---|
| 5 | #########################################
|
|---|
| 6 | # Options for Watcom 16-bit C compiler
|
|---|
| 7 | #########################################
|
|---|
| 8 | # -bt=os2 = Build target OS is OS/2
|
|---|
| 9 | # -ms = Memory model small
|
|---|
| 10 | # -3 = Enable use of 80386 instructions
|
|---|
| 11 | # -4 = Optimize for 486 (assumes -3)
|
|---|
| 12 | # -5 = Optimize for Pentium (assumes -3)
|
|---|
| 13 | # -j = char default is unsigned
|
|---|
| 14 | # -d1 = Include line number info in object
|
|---|
| 15 | # (necessary to produce assembler listing)
|
|---|
| 16 | # -d2 = Include debugging info for ICAT
|
|---|
| 17 | # (necessary to produce assembler listing)
|
|---|
| 18 | # -o = Optimization - i = enable inline intrinsic functions
|
|---|
| 19 | # r = optimize for 80486 and pentium pipes
|
|---|
| 20 | # s = space is preferred to time
|
|---|
| 21 | # l = enable loop optimizations
|
|---|
| 22 | # a = relax aliasing constraints
|
|---|
| 23 | # n = allow numerically unstable optimizations
|
|---|
| 24 | # -s = Omit stack size checking from start of each function
|
|---|
| 25 | # -zl = Place no library references into objects
|
|---|
| 26 | # -wx = Warning level set to maximum (vs 1..4)
|
|---|
| 27 | # -zfp = Prevent use of FS selector
|
|---|
| 28 | # -zgp = Prevent use of GS selector
|
|---|
| 29 | # -zq = Operate quietly
|
|---|
| 30 | # -zm = Put each function in its own segment
|
|---|
| 31 | # -zu = Do not assume that SS contains segment of DGROUP
|
|---|
| 32 | #
|
|---|
| 33 | CC =wcc
|
|---|
| 34 | CPP=wpp
|
|---|
| 35 |
|
|---|
| 36 | CINCLUDES=-i$(%WATCOM)\H;$(%WATCOM)\H\SYS;$(INCLUDE)
|
|---|
| 37 |
|
|---|
| 38 | !if "$(DEBUG)" == "1"
|
|---|
| 39 | CFLAGS =-ms -5 -bt=os2 -hc -d2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DDEBUG -DTARGET_OS216 $(CINCLUDES)
|
|---|
| 40 | CPPFLAGS=-ms -5 -bt=os2 -hc -d2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DDEBUG -DTARGET_OS216 $(CINCLUDES)
|
|---|
| 41 | LFLAGS = d codeview
|
|---|
| 42 | !else
|
|---|
| 43 | CFLAGS =-ms -5 -bt=os2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DTARGET_OS216 $(CINCLUDES)
|
|---|
| 44 | CPPFLAGS=-ms -5 -bt=os2 -olinars -s -j -wx -zl -zfp -zgp -zq -zu -zp1 -DTARGET_OS216 $(CINCLUDES)
|
|---|
| 45 | LFLAGS =
|
|---|
| 46 | !endif
|
|---|
| 47 |
|
|---|
| 48 | #########################################
|
|---|
| 49 | # Options for Watcom assembler
|
|---|
| 50 | #########################################
|
|---|
| 51 | # -bt=os2 = Build target OS is OS/2
|
|---|
| 52 | # -d1 = Include line number info in object
|
|---|
| 53 | # (necessary to produce assembler listing)
|
|---|
| 54 | # -i = Include list
|
|---|
| 55 | # -zq = Operate quietly
|
|---|
| 56 | # -3p = 80386 protected-mode instructions
|
|---|
| 57 | #
|
|---|
| 58 | ASM=wasm
|
|---|
| 59 | AFLAGS=-d1 -zq -3p -i
|
|---|
| 60 | LINK=wlink $(LFLAGS)
|
|---|
| 61 |
|
|---|
| 62 | #########################################
|
|---|
| 63 | # Inference rules
|
|---|
| 64 | #########################################
|
|---|
| 65 |
|
|---|
| 66 | .obj: $(OBJDIR)
|
|---|
| 67 |
|
|---|
| 68 | .c.obj: .AUTODEPEND
|
|---|
| 69 | $(CC) $(CPPFLAGS) -fo$(OBJDIR)\$^&.obj $^&.c
|
|---|
| 70 |
|
|---|
| 71 | .cpp.obj: .AUTODEPEND
|
|---|
| 72 | $(CPP) $(CPPFLAGS) -fo$(OBJDIR)\$^&.obj $^&.cpp
|
|---|
| 73 |
|
|---|
| 74 | .asm.obj: .AUTODEPEND
|
|---|
| 75 | $(ASM) $(AFLAGS) -fo=$(OBJDIR)\$^&.obj $^&.asm
|
|---|
| 76 |
|
|---|
| 77 | .BEFORE
|
|---|
| 78 | @if not exist .\$(OBJDIR) $(CREATEPATH) .\$(OBJDIR)
|
|---|