]> git.sur5r.net Git - cc65/blob - src/ca65/make/watcom.mak
Small fixes for Watcom-C
[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         lineinfo.obj    \
83         listing.obj     \
84         macpack.obj     \
85         macro.obj       \
86         main.obj        \
87         nexttok.obj     \
88         objcode.obj     \
89         objfile.obj     \
90         options.obj     \
91         pseudo.obj      \
92         repeat.obj      \
93         scanner.obj     \
94         symtab.obj      \
95         toklist.obj     \
96         ulabel.obj
97
98 LIBS = ..\common\common.lib
99
100
101 # ------------------------------------------------------------------------------
102 # Main targets
103
104 all:            ca65
105
106 ca65:           ca65.exe
107
108
109 # ------------------------------------------------------------------------------
110 # Other targets
111
112
113 ca65.exe:       $(OBJS) $(LIBS)
114         $(LD) system $(SYSTEM) @&&|
115 DEBUG ALL
116 OPTION QUIET
117 NAME $<
118 FILE condasm.obj
119 FILE dbginfo.obj
120 FILE ea.obj
121 FILE error.obj
122 FILE expr.obj
123 FILE feature.obj
124 FILE filetab.obj
125 FILE fragment.obj
126 FILE global.obj
127 FILE incpath.obj
128 FILE instr.obj
129 FILE istack.obj
130 FILE lineinfo.obj
131 FILE listing.obj
132 FILE macpack.obj
133 FILE macro.obj
134 FILE main.obj
135 FILE nexttok.obj
136 FILE objcode.obj
137 FILE objfile.obj
138 FILE options.obj
139 FILE pseudo.obj
140 FILE repeat.obj
141 FILE scanner.obj
142 FILE symtab.obj
143 FILE toklist.obj
144 FILE ulabel.obj
145 LIBRARY ..\common\common.lib
146 |
147
148 clean:
149         @if exist *.obj del *.obj
150         @if exist ca65.exe del ca65.exe
151
152 strip:
153         @-wstrip ca65.exe
154