]> git.sur5r.net Git - cc65/blob - src/ld65/make/watcom.mak
Removed underlines from structure names.
[cc65] / src / ld65 / make / watcom.mak
1 #
2 # ld65 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 OBJ files
69
70 OBJS =  bin.obj         \
71         binfmt.obj      \
72         config.obj      \
73         dbgsyms.obj     \
74         error.obj       \
75         exports.obj     \
76         expr.obj        \
77         extsyms.obj     \
78         fileio.obj      \
79         fragment.obj    \
80         global.obj      \
81         library.obj     \
82         main.obj        \
83         mapfile.obj     \
84         o65.obj         \
85         objdata.obj     \
86         objfile.obj     \
87         scanner.obj     \
88         segments.obj    \
89         tgtcfg.obj
90
91 LIBS = ..\common\common.lib
92
93
94 # ------------------------------------------------------------------------------
95 # Main targets
96
97 all:            ld65
98
99 ld65:           ld65.exe
100
101
102 # ------------------------------------------------------------------------------
103 # Other targets
104
105
106 ld65.exe:       $(OBJS) $(LIBS)
107         $(LD) system $(SYSTEM) @&&|
108 DEBUG ALL
109 OPTION QUIET
110 NAME $<
111 FILE bin.obj
112 FILE binfmt.obj
113 FILE config.obj
114 FILE dbgsyms.obj
115 FILE error.obj
116 FILE exports.obj
117 FILE expr.obj
118 FILE extsyms.obj
119 FILE fileio.obj
120 FILE global.obj
121 FILE library.obj
122 FILE main.obj
123 FILE mapfile.obj
124 FILE o65.obj
125 FILE objdata.obj
126 FILE objfile.obj
127 FILE scanner.obj
128 FILE segments.obj
129 FILE tgtcfg.obj
130 LIBRARY ..\common\common.lib
131 |
132
133 clean:
134         @if exist *.obj del *.obj
135         @if exist *.obj del ld65.exe
136
137 strip:
138         @-wstrip ld65.exe
139