]> git.sur5r.net Git - cc65/blob - src/ca65/make/watcom.mak
Implement character set translation and different target systems
[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         filetab.obj     \
76         fragment.obj    \
77         global.obj      \
78         incpath.obj     \
79         instr.obj       \
80         istack.obj      \
81         listing.obj     \
82         macpack.obj     \
83         macro.obj       \
84         main.obj        \
85         nexttok.obj     \
86         objcode.obj     \
87         objfile.obj     \
88         options.obj     \
89         pseudo.obj      \
90         repeat.obj      \
91         scanner.obj     \
92         symtab.obj      \
93         target.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 filetab.obj
123 FILE fragment.obj
124 FILE global.obj
125 FILE incpath.obj
126 FILE instr.obj
127 FILE istack.obj
128 FILE listing.obj
129 FILE macpack.obj
130 FILE macro.obj
131 FILE main.obj
132 FILE nexttok.obj
133 FILE objcode.obj
134 FILE objfile.obj
135 FILE options.obj
136 FILE pseudo.obj
137 FILE repeat.obj
138 FILE scanner.obj
139 FILE symtab.obj
140 FILE target.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