summaryrefslogtreecommitdiffstats
path: root/private/mvdm/wow16/timer/makefile
blob: fb815d1f950fb1ca9cb613bbbf0951c8aab1a24e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#
#       constructs timer.drv
#
#   Defines:
#       DEBUG   - Enable debug code
#       STRICT  - Build a version with STRICT enabled
#

NAME    =timer
EXT     =drv
OBJFIRST=$Zlibinit.obj
OBJ1    =$Ztimer.obj $Zlocal.obj $Zstartend.obj $Zapi.obj $Zmath.obj

OBJ     =$(OBJ1)
LIBS    =..\lib\libw ..\lib\mdllcew ..\lib\mmsystem
INCS    = -I. -I..\inc -I..\..\inc

OPT     = -Oxws

########## Path definition so we find 16 bit tools ##########
# Also works around stupid bug in RC 3.1 that doesn't allow rcpp.err to be
# in a directory that is greater than 128 chars down the path, even if
# rc 3.1 is running as an OS/2 app.

PATH    = $(_NTBINDIR)\private\mvdm\tools16;$(PATH)

#
#   build a retail build
#
!if "$(NTDEBUG)" == "" || "$(NTDEBUG)" == "retail" && "$(NTDEBUG)" != "ntsdnodbg"

CLOPT   =-I..\inc -I.\rinc -I..\..\inc
MASMOPT =-I..\inc -I..\..\inc
LINKOPT =
RC      =rc16 -i..\inc
OBJD    =
Z       = .\retail^\
MMDEBUG =

#
#   build a full debug build
#
!else
CDEBUG  =-Zd -Odi
ADEBUG  =-Zd
LDEBUG  =/LI

CLOPT   =$(CDEBUG) -DDEBUG -I..\inc -I.\rinc -I..\..\inc
MASMOPT =$(ADEBUG) -DDEBUG -I..\inc -I..\..\inc
LINKOPT =$(LDEBUG)
RC      =rc16 -DDEBUG -i..\inc -i..\mmsystem\rinc
OBJD    =
Z       = .\debug^\
MMDEBUG = DEBUG=1

!endif


!if "$(STRICT)" == "YES"
TYPES   =-DSTRICT
!else
TYPES   =
!endif

#
# NOTE
#
# this code is compiled *without* windows prolog/epilog (no -Gw)
# thus all exported routines, must have _loadds
#

CC      = cl16 -c -Alnw -G2s -Zp -W3 $(CLOPT) $(OPT) $(TYPES)
ASM     = masm -Mx -t -D?QUIET $(MASMOPT)
LINK    = link16 /NOD/NOE/MAP/ALIGN:16 $(LINKOPT)

.c{$Z}.obj:
   $(CC) -Fo$*.obj $(@B).c

.asm{$Z}.obj:
   $(ASM) -DSEGNAME=_TEXT $(@B).asm, $*.obj;


###################################

all:   $(NAME).$(EXT) $(NAME).sym

$(NAME).$(EXT): $(OBJFIRST) $(OBJ) $(NAME).def $(NAME).res
        $(LINK) @<<
$(OBJFIRST) +
$(OBJ1),
$(NAME).$(EXT),
$(NAME),
$(LIBS),
$(NAME).def
<<
        $(RC) -t $(NAME).res $(NAME).$(EXT)
        @mapsym /n $*.map
        -binplace timer.drv timer.map timer.sym

RES_DIR =.\messages\usa

$(NAME).rc: $(RES_DIR)\$(NAME).rc
        @copy $(RES_DIR)\$(NAME).rc

$(NAME).rcv:  $(RES_DIR)\$(NAME).rcv
        @copy $(RES_DIR)\$(NAME).rcv

$(NAME).res: $(NAME).rc $(NAME).rcv ..\inc\common.ver
        $(RC) -r $(NAME).rc



############## clean ##############
clean: cleanup all

cleanup:
        -@del $(NAME).$(EXT)
        -@del $(NAME).res
        -@del *.sym
        -@del *.map
        -@del *.lib
        -@del $Z*.cod
        -@del $Z*.obj
        -@del *.rcv
        -@del *.rc

# START Dependencies
api.obj: api.asm timer.inc

libinit.obj: libinit.asm timer.inc

local.obj: local.asm timer.inc

startend.obj: startend.asm timer.inc

timer.obj: timer.asm timer.inc

# END Dependencies