]> git.sur5r.net Git - cc65/blob - src/ca65/make/watcom.mak
Separated the emulation features in a module.
[cc65] / src / ca65 / make / watcom.mak
1 #
2 # CA65 Makefile for the Watcom compiler
3 #
4
5 # ------------------------------------------------------------------------------
6 # Generic stuff
7
8 .AUTODEPEND
9 .SUFFIXES       .ASM .C .CC .CPP
10 .SWAP
11
12 AR      = WLIB
13 LD      = WLINK
14
15 !if !$d(TARGET)
16 !if $d(__OS2__)
17 TARGET = OS2
18 !else
19 TARGET = NT
20 !endif
21 !endif
22
23 # target specific macros.
24 !if $(TARGET)==OS2
25
26 # --------------------- OS2 ---------------------
27 SYSTEM = os2v2
28 CC = WCC386
29 CCCFG  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
30
31 !elif $(TARGET)==DOS32
32
33 # -------------------- DOS4G --------------------
34 SYSTEM = dos4g
35 CC = WCC386
36 CCCFG  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
37
38 !elif $(TARGET)==DOS
39
40 # --------------------- DOS ---------------------
41 SYSTEM = dos
42 CC = WCC
43 CCCFG  = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
44
45 !elif $(TARGET)==NT
46
47 # --------------------- NT ----------------------
48 SYSTEM = nt
49 CC = WCC386
50 CCCFG  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
51
52 !else
53 !error
54 !endif
55
56 # Add the include dir
57 CCCFG   = $(CCCFG) -i=..\common
58
59
60 # ------------------------------------------------------------------------------
61 # Implicit rules
62
63 .c.obj:
64   $(CC) $(CCCFG) $<
65
66
67 # ------------------------------------------------------------------------------
68 # All library OBJ files
69
70 OBJS =  condasm.obj     \
71         dbginfo.obj     \
72         ea.obj          \
73         error.obj       \
74         expr.obj        \
75         feature.obj     \
76         filetab.obj     \
77         fragment.obj    \
78         global.obj      \
79         incpath.obj     \
80         instr.obj       \
81         istack.obj      \
82         listing.obj     \
83         macpack.obj     \
84         macro.obj       \
85         main.obj        \
86         nexttok.obj     \
87         objcode.obj     \
88         objfile.obj     \
89         options.obj     \
90         pseudo.obj      \
91         repeat.obj      \
92         scanner.obj     \
93         symtab.obj      \
94         toklist.obj     \
95         ulabel.obj
96
97 LIBS = ..\common\common.lib
98
99
100 # ------------------------------------------------------------------------------
101 # Main targets
102
103 all:            ca65
104
105 ca65:           ca65.exe
106
107
108 # ------------------------------------------------------------------------------
109 # Other targets
110
111
112 ca65.exe:       $(OBJS) $(LIBS)
113         $(LD) system $(SYSTEM) @&&|
114 DEBUG ALL
115 OPTION QUIET
116 NAME $<
117 FILE condasm.obj
118 FILE dbginfo.obj
119 FILE ea.obj
120 FILE error.obj
121 FILE expr.obj
122 FILE feature.obj
123 FILE filetab.obj
124 FILE fragment.obj
125 FILE global.obj
126 FILE incpath.obj
127 FILE instr.obj
128 FILE istack.obj
129 FILE listing.obj
130 FILE macpack.obj
131 FILE macro.obj
132 FILE main.obj
133 FILE nexttok.obj
134 FILE objcode.obj
135 FILE objfile.obj
136 FILE options.obj
137 FILE pseudo.obj
138 FILE repeat.obj
139 FILE scanner.obj
140 FILE symtab.obj
141 FILE toklist.obj
142 FILE ulabel.obj
143 LIBRARY ..\common\common.lib
144 |
145
146 clean:
147         @if exist *.obj del *.obj
148         @if exist ca65.exe del ca65.exe
149
150 strip:
151         @-wstrip ca65.exe
152