]> git.sur5r.net Git - cc65/blob - src/da65/make/watcom.mak
Renamed the config file to info file and changed the handling when the
[cc65] / src / da65 / make / watcom.mak
1 #
2 # da65 Makefile for the Watcom compiler (using GNU make)
3 #
4
5 # ------------------------------------------------------------------------------
6 # Generic stuff
7
8 AR      = WLIB
9 LD      = WLINK
10 LNKCFG  = ld.tmp
11
12 # --------------------- OS2 ---------------------
13 ifeq ($(TARGET),OS2)
14 SYSTEM  = os2v2
15 CC      = WCC386
16 CFLAGS  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
17 endif
18
19 # -------------------- DOS4G --------------------
20 ifeq ($(TARGET),DOS32)
21 SYSTEM  = dos4g
22 CC      = WCC386
23 CFLAGS  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
24 endif
25
26 # --------------------- NT ----------------------
27 ifeq ($(TARGET),NT)
28 SYSTEM  = nt
29 CC      = WCC386
30 CFLAGS  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
31 endif
32
33 # Add the include dir
34 CFLAGS  += -i=..\common
35
36 # ------------------------------------------------------------------------------
37 # Implicit rules
38
39 %.obj:  %.c
40         $(CC) $(CFLAGS) $^
41
42
43 # ------------------------------------------------------------------------------
44 # All OBJ files
45
46 OBJS =  attrtab.obj     \
47         code.obj        \
48         cpu.obj         \
49         data.obj        \
50         error.obj       \
51         global.obj      \
52         handler.obj     \
53         infofile.obj    \
54         main.obj        \
55         opc6502.obj     \
56         opc65816.obj    \
57         opc65c02.obj    \
58         opc65sc02.obj   \
59         opctable.obj    \
60         output.obj      \
61         scanner.obj
62
63
64 LIBS = ..\common\common.lib
65
66
67 # ------------------------------------------------------------------------------
68 # Main targets
69
70 all:            da65
71
72 da65:           da65.exe
73
74
75 # ------------------------------------------------------------------------------
76 # Other targets
77
78
79 da65.exe:       $(OBJS) $(LIBS)
80         @echo DEBUG ALL > $(LNKCFG)
81         @echo OPTION QUIET >> $(LNKCFG)
82         @echo NAME $@ >> $(LNKCFG)
83         @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
84         @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
85         $(LD) system $(SYSTEM) @$(LNKCFG)
86         @rm $(LNKCFG)
87
88 clean:
89         @if exist *.obj del *.obj
90         @if exist *.obj del da65.exe
91
92 strip:
93         @-wstrip da65.exe
94