| 1 | #
|
|---|
| 2 | # Target directories.
|
|---|
| 3 | # Both bin and lib directories are compiler dependent.
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | !ifndef ROOT
|
|---|
| 7 | !error ROOT is not defined. Please check your SETENV.CMD.
|
|---|
| 8 | !endif
|
|---|
| 9 |
|
|---|
| 10 | !ifndef %DDK
|
|---|
| 11 | !error DDK is not defined in the environment. Please check your SETENV.CMD.
|
|---|
| 12 | !endif
|
|---|
| 13 | DDK=$(%DDK)
|
|---|
| 14 |
|
|---|
| 15 | !ifndef %WATCOM
|
|---|
| 16 | !error WATCOM is not defined in the environment. Please check your SETENV.CMD.
|
|---|
| 17 | !endif
|
|---|
| 18 | WATCOM=$(%WATCOM)
|
|---|
| 19 |
|
|---|
| 20 | #Always build KEE version
|
|---|
| 21 | KEE = 1
|
|---|
| 22 |
|
|---|
| 23 | !if "$(DEBUG)" == "1"
|
|---|
| 24 | ALSA_BIN = $(ROOT)\bin\Debug
|
|---|
| 25 | ALSA_LIB = $(ROOT)\lib\Debug
|
|---|
| 26 | OBJDIR = obj\Debug
|
|---|
| 27 | !else
|
|---|
| 28 | ALSA_BIN = $(ROOT)\bin\Release
|
|---|
| 29 | ALSA_LIB = $(ROOT)\lib\Release
|
|---|
| 30 | OBJDIR = obj\Release
|
|---|
| 31 | !endif
|
|---|
| 32 |
|
|---|
| 33 | TOOLS=$(ROOT)\tools
|
|---|
| 34 | CREATEPATH=$(TOOLS)\CreatePath.cmd
|
|---|
| 35 | WAT2MAP=$(TOOLS)\wat2map.cmd
|
|---|
| 36 |
|
|---|
| 37 | #===================================================================
|
|---|
| 38 | #
|
|---|
| 39 | # Auto-dependency information
|
|---|
| 40 | #
|
|---|
| 41 | #===================================================================
|
|---|
| 42 | .ERASE
|
|---|
| 43 | .SUFFIXES:
|
|---|
| 44 | .SUFFIXES: .lst .obj .lib .cpp .cpp16 .c .c16 .asm .def
|
|---|
| 45 |
|
|---|
| 46 | !if "$(DEBUG)" == "1"
|
|---|
| 47 | CFLAGS = -dDEBUG -bt=os2v2 -e60 -hc -5r -omlinear -s -w4 -ze -zdp -zl -zq -nt=CODE32 -zff -zgf
|
|---|
| 48 | CPPFLAGS= -xd
|
|---|
| 49 | ASFLAGS = -D:DEBUG -Mb -Li -Sv:M510
|
|---|
| 50 | !else
|
|---|
| 51 | CFLAGS = -bt=os2v2 -e60 -5r -omlinear -s -w4 -ze -zdp -zl -zq -nt=CODE32 -zff -zgf
|
|---|
| 52 | CPPFLAGS= -xd
|
|---|
| 53 | ASFLAGS = -Mb -Li -Sv:M510
|
|---|
| 54 | !endif
|
|---|
| 55 |
|
|---|
| 56 | !ifdef PACK_1
|
|---|
| 57 | CFLAGS += -zp1
|
|---|
| 58 | !else
|
|---|
| 59 | CFLAGS += -zp4
|
|---|
| 60 | !endif
|
|---|
| 61 |
|
|---|
| 62 | !if $(KEE) == 1
|
|---|
| 63 | CFLAGS16 = $(CFLAGS) -mc -zu -zc
|
|---|
| 64 | CFLAGS += -mf -DKEE -DFLATSTACK
|
|---|
| 65 | ASFLAGS += -D:KEE -D:FLATSTACK
|
|---|
| 66 | !else
|
|---|
| 67 | CFLAGS16 = $(CFLAGS) -mc -zu -zc
|
|---|
| 68 | CFLAGS += -mf -DFLATSTACK
|
|---|
| 69 | ASFLAGS += -D:FLATSTACK
|
|---|
| 70 | !endif
|
|---|
| 71 |
|
|---|
| 72 | CDEFINES = -D__KERNEL__ -DMODULE -dTARGET_OS2 -dALSA_BUILD -D__ISAPNP__ -DCONFIG_ISAPNP -D__i386_
|
|---|
| 73 | AINCLUDES = $(DDK)\base\H
|
|---|
| 74 | %INCLUDE = .;$(ROOT)\include;$(ROOT)\alsa-kernel\include;$(WATCOM)\H;$(WATCOM)\h\os2;
|
|---|
| 75 |
|
|---|
| 76 | CC = WCC386 $(CFLAGS) -zev -za99 $(CDEFINES)
|
|---|
| 77 | CPP = WPP386 $(CFLAGS) $(CPPFLAGS) $(CDEFINES)
|
|---|
| 78 | CPP16 = WPP386 $(CFLAGS16) $(CPPFLAGS) $(CDEFINES)
|
|---|
| 79 | ASM = alp $(ASFLAGS) $(AINCLUDES)
|
|---|
| 80 |
|
|---|
| 81 | DFLAGS = -l -s
|
|---|
| 82 | DIS = WDISASM $(DFLAGS)
|
|---|
| 83 |
|
|---|
| 84 | !ifdef USE_WLINK
|
|---|
| 85 | !if "$(DEBUG)" == "1"
|
|---|
| 86 | LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global d codeview
|
|---|
| 87 | !else
|
|---|
| 88 | LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global
|
|---|
| 89 | !endif
|
|---|
| 90 | QFLAGS = system os2 option quiet, map, align=512
|
|---|
| 91 | LINK = wlink $(LFLAGS)
|
|---|
| 92 | !else
|
|---|
| 93 | LD2TARGETFLAGS =/PDD /OLDcpp /map /linenumbers
|
|---|
| 94 | !if "$(DEBUG)" == "1"
|
|---|
| 95 | LD2FLAGS = /nologo /noe /map /packcode /packdata /nod /debug $(LD2TARGETFLAGS)
|
|---|
| 96 | !else
|
|---|
| 97 | LD2FLAGS = /nologo /noe /map /packcode /packdata /exepack:2 /nod $(LD2TARGETFLAGS)
|
|---|
| 98 | !endif
|
|---|
| 99 | LINK = ilink $(LD2FLAGS)
|
|---|
| 100 | !endif
|
|---|
| 101 |
|
|---|
| 102 | !if "$(DEBUG)" == "1"
|
|---|
| 103 | BFLAGS = -c -b -q -n
|
|---|
| 104 | !else
|
|---|
| 105 | BFLAGS = -s -t -c -b -q -n
|
|---|
| 106 | !endif
|
|---|
| 107 | LIB = WLIB $(BFLAGS)
|
|---|
| 108 |
|
|---|
| 109 | IFLAGS = /nologo
|
|---|
| 110 | IMPLIB = IMPLIB $(IFLAGS)
|
|---|
| 111 |
|
|---|
| 112 | .obj: $(OBJDIR)
|
|---|
| 113 | .lib: $(OBJDIR)
|
|---|
| 114 |
|
|---|
| 115 | .obj.lst:
|
|---|
| 116 | $(DIS) $*
|
|---|
| 117 |
|
|---|
| 118 | .c.obj: .AUTODEPEND
|
|---|
| 119 | $(CC) -fo$(OBJDIR)\$^&.obj $^&.c
|
|---|
| 120 |
|
|---|
| 121 | .cpp.obj: .AUTODEPEND
|
|---|
| 122 | $(CPP) -fo$(OBJDIR)\$^&.obj $^&.cpp
|
|---|
| 123 |
|
|---|
| 124 | .cpp16.obj: .AUTODEPEND
|
|---|
| 125 | $(CPP16) $(CFLAGS16) -fo$(OBJDIR)\$^&.obj $^&.cpp16
|
|---|
| 126 |
|
|---|
| 127 | .asm.obj: .AUTODEPEND
|
|---|
| 128 | $(ASM) $^&.asm -Fo:$(OBJDIR)\$^&.obj -Fl:$(OBJDIR)\$^&.lst
|
|---|
| 129 |
|
|---|
| 130 | .def.lib:
|
|---|
| 131 | $(IMPLIB) $(OBJDIR)\$^&.lib $^&.def
|
|---|
| 132 |
|
|---|
| 133 | !ifndef NOOBJ
|
|---|
| 134 | .before
|
|---|
| 135 | @if not exist $(OBJDIR) @$(CREATEPATH) $(OBJDIR)
|
|---|
| 136 | !endif
|
|---|
| 137 |
|
|---|