source: GPL/branches/uniaud32-2.1.x/tools/header.mif@ 588

Last change on this file since 588 was 588, checked in by David Azarewicz, 8 years ago

Build system cleanup

File size: 3.2 KB
Line 
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
13DDK=$(%DDK)
14
15!ifndef %WATCOM
16!error WATCOM is not defined in the environment. Please check your SETENV.CMD.
17!endif
18WATCOM=$(%WATCOM)
19
20#Always build KEE version
21KEE = 1
22
23!if "$(DEBUG)" == "1"
24ALSA_BIN = $(ROOT)\bin\Debug
25ALSA_LIB = $(ROOT)\lib\Debug
26OBJDIR = obj\Debug
27!else
28ALSA_BIN = $(ROOT)\bin\Release
29ALSA_LIB = $(ROOT)\lib\Release
30OBJDIR = obj\Release
31!endif
32
33TOOLS=$(ROOT)\tools
34CREATEPATH=$(TOOLS)\CreatePath.cmd
35WAT2MAP=$(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"
47CFLAGS = -dDEBUG -bt=os2v2 -e60 -hc -5r -omlinear -s -w4 -ze -zdp -zl -zq -nt=CODE32 -zff -zgf
48CPPFLAGS= -xd
49ASFLAGS = -D:DEBUG -Mb -Li -Sv:M510
50!else
51CFLAGS = -bt=os2v2 -e60 -5r -omlinear -s -w4 -ze -zdp -zl -zq -nt=CODE32 -zff -zgf
52CPPFLAGS= -xd
53ASFLAGS = -Mb -Li -Sv:M510
54!endif
55
56!ifdef PACK_1
57CFLAGS += -zp1
58!else
59CFLAGS += -zp4
60!endif
61
62!if $(KEE) == 1
63CFLAGS16 = $(CFLAGS) -mc -zu -zc
64CFLAGS += -mf -DKEE -DFLATSTACK
65ASFLAGS += -D:KEE -D:FLATSTACK
66!else
67CFLAGS16 = $(CFLAGS) -mc -zu -zc
68CFLAGS += -mf -DFLATSTACK
69ASFLAGS += -D:FLATSTACK
70!endif
71
72CDEFINES = -D__KERNEL__ -DMODULE -dTARGET_OS2 -dALSA_BUILD -D__ISAPNP__ -DCONFIG_ISAPNP -D__i386_
73AINCLUDES = $(DDK)\base\H
74%INCLUDE = .;$(ROOT)\include;$(ROOT)\alsa-kernel\include;$(WATCOM)\H;$(WATCOM)\h\os2;
75
76CC = WCC386 $(CFLAGS) -zev -za99 $(CDEFINES)
77CPP = WPP386 $(CFLAGS) $(CPPFLAGS) $(CDEFINES)
78CPP16 = WPP386 $(CFLAGS16) $(CPPFLAGS) $(CDEFINES)
79ASM = alp $(ASFLAGS) $(AINCLUDES)
80
81DFLAGS = -l -s
82DIS = WDISASM $(DFLAGS)
83
84!ifdef USE_WLINK
85!if "$(DEBUG)" == "1"
86LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global d codeview
87!else
88LFLAGS = system os2v2 physdevice option int, dosseg, map, eliminate, mang, tog sort global
89!endif
90QFLAGS = system os2 option quiet, map, align=512
91LINK = wlink $(LFLAGS)
92!else
93LD2TARGETFLAGS =/PDD /OLDcpp /map /linenumbers
94!if "$(DEBUG)" == "1"
95LD2FLAGS = /nologo /noe /map /packcode /packdata /nod /debug $(LD2TARGETFLAGS)
96!else
97LD2FLAGS = /nologo /noe /map /packcode /packdata /exepack:2 /nod $(LD2TARGETFLAGS)
98!endif
99LINK = ilink $(LD2FLAGS)
100!endif
101
102!if "$(DEBUG)" == "1"
103BFLAGS = -c -b -q -n
104!else
105BFLAGS = -s -t -c -b -q -n
106!endif
107LIB = WLIB $(BFLAGS)
108
109IFLAGS = /nologo
110IMPLIB = 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
Note: See TracBrowser for help on using the repository browser.