source: sbliveos2/trunk/runtime/makefile.os2@ 148

Last change on this file since 148 was 148, checked in by sandervl, 25 years ago

beta 0.25 update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1#
2# Set the environmental variables for compiling
3#
4.ERASE
5
6.SUFFIXES:
7.SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .h .lib
8
9NAME = runtime
10
11.BEFORE
12 set INCLUDE=
13!ifndef %WATCOM
14 set WATCOM=..\..\..\..\WATCOM
15!endif
16 set PATH=$(%DDK)\BASE\TOOLS;$(%WATCOM)\BINP;$(%WATCOM)\BINW
17
18H=$(%DDK)\base\h
19INC=$(%DDK)\base\src\inc
20
21# Options for Watcom 16-bit C compiler
22# -bt=os2 = Build target OS is OS/2
23# -ms = Memory model small
24# -3 = Enable use of 80386 instructions
25# -4 = Optimize for 486 (assumes -3)
26# -5 = Optimize for Pentium (assumes -3)
27# -d1 = Include line number info in object
28# (necessary to produce assembler listing)
29# -o = Optimization - i = enable inline intrinsic functions
30# r = optimize for 80486 and pentium pipes
31# s = space is preferred to time
32# l = enable loop optimizations
33# a = relax aliasing constraints
34# n = allow numerically unstable optimizations
35# -s = Omit stack size checking from start of each function
36# -zl = Place no library references into objects
37# -wx = Warning level set to maximum (vs 1..4)
38# -zfp = Prevent use of FS selector
39# -zgp = Prevent use of GS selector
40# -zq = Operate quietly
41# -zm = Put each function in its own segment
42# -zu = Do not assume that SS contains segment of DGROUP
43#
44CC=wcc
45CPP=wpp
46!if "$(DEBUG)" == "0"
47CFLAGS=-ms -4 -bt=os2 -olinars -s -wx -zl -zfp -zgp -zq -zu -zm
48!else
49CFLAGS=-ms -4 -bt=os2 -d1 -olinars -s -wx -zl -zfp -zgp -zq -zu -zm -DDEBUG
50!endif
51CINC=-i$(%WATCOM)\H;$(%WATCOM)\H\SYS;$(H)
52
53# Options for Watcom assembler
54# -bt=os2 = Build target OS is OS/2
55# -d1 = Include line number info in object
56# (necessary to produce assembler listing)
57# -i = Include list
58# -zq = Operate quietly
59#
60ASM=wasm
61AFLAGS=-bt=os2 -d1 -zq
62AINC=-i$(INC)
63
64# Inference rules
65.c.obj: .AUTODEPEND
66 $(CC) $(CFLAGS) $(CINC) $*.c
67 wdisasm -l -s $*
68
69.cpp.obj: .AUTODEPEND
70 $(CPP) $(CFLAGS) $(CINC) $*.cpp
71 wdisasm -l -s $*
72
73.asm.obj: .AUTODEPEND
74 $(ASM) $(AFLAGS) $(AINC) $*.asm
75 wdisasm -l -s $*
76
77# Object file list
78OBJ1=math.obj ctype.obj string.obj cpp.obj printf.obj
79OBJ2=iodelay.obj devhelp.obj
80OBJS=$(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6)
81
82all: $(NAME).lib
83
84##################################
85# Target descriptions
86##################################
87
88$(NAME).lrf: makefile.os2
89 @%write $^@ $(NAME).lib
90 @for %f in ($(OBJS)) do @%append $^@ -+ %f
91
92$(NAME).lib: $(OBJS) makefile.os2 $(NAME).lrf
93 wlib @$(NAME).lrf
94
95clean:
96 del *.obj *.err *.lnk *.sys *.sym *.lst *.map *.wmap *.lrf *.lib
Note: See TracBrowser for help on using the repository browser.