]> git.sur5r.net Git - cc65/blob - src/common/make/watcom.mak
Suppress wine debug output
[cc65] / src / common / make / watcom.mak
1 #
2 # CC65 Makefile for the Watcom compiler (using GNU make) and wine
3 #
4
5 # ------------------------------------------------------------------------------
6 # Generic stuff
7
8 # Environment variables for the watcom compiler
9 export WATCOM  = c:\\watcom
10 export INCLUDE = $(WATCOM)\\h
11
12 # We will use the windows compiler under linux (define as empty for windows)
13 export WINEDEBUG=fixme-all
14 WINE    = wine
15
16 # Programs
17 AR      = $(WINE) WLIB
18 CC      = $(WINE) WCC386
19 LD      = $(WINE) WLINK
20 LIB     = common.lib
21
22 # Program arguments
23 CFLAGS  = -d1 -onatx -zp4 -5 -zq -w2
24
25 # Create NT programs by default
26 ifndef TARGET
27 TARGET = NT
28 endif
29
30 # --------------------- OS2 ---------------------
31 ifeq ($(TARGET),OS2)
32 SYSTEM  = os2v2
33 CFLAGS  += -bt=$(TARGET)
34 endif
35
36 # -------------------- DOS4G --------------------
37 ifeq ($(TARGET),DOS32)
38 SYSTEM  = dos4g
39 CFLAGS  += -bt=$(TARGET)
40 endif
41
42 # --------------------- NT ----------------------
43 ifeq ($(TARGET),NT)
44 SYSTEM  = nt
45 CFLAGS  += -bt=$(TARGET)
46 endif
47
48 # ------------------------------------------------------------------------------
49 # Implicit rules
50
51 %.obj:  %.c
52         $(CC) $(CFLAGS) $^
53
54
55 # ------------------------------------------------------------------------------
56 # All library OBJ files
57
58 OBJS =  abend.obj       \
59         addrsize.obj    \
60         bitops.obj      \
61         chartype.obj    \
62         check.obj       \
63         cmdline.obj     \
64         coll.obj        \
65         cpu.obj         \
66         debugflag.obj   \
67         exprdefs.obj    \
68         filepos.obj     \
69         filetype.obj    \
70         fname.obj       \
71         hashstr.obj     \
72         hashtab.obj     \
73         intstack.obj    \
74         matchpat.obj    \
75         mmodel.obj      \
76         print.obj       \
77         searchpath.obj  \
78         segdefs.obj     \
79         segnames.obj    \
80         shift.obj       \
81         strbuf.obj      \
82         strpool.obj     \
83         strstack.obj    \
84         strutil.obj     \
85         target.obj      \
86         tgttrans.obj    \
87         xmalloc.obj     \
88         xsprintf.obj
89
90
91 # ------------------------------------------------------------------------------
92 # Main targets
93
94 all:    lib
95
96 lib:    $(LIB)
97
98 $(LIB): $(OBJS)
99         @echo Creating library...
100         $(AR) -q -b -P=32 $(LIB) $(foreach OBJ, $(OBJS), +-$(OBJ))
101         @echo Done!
102
103 clean:
104         @rm -f *~ core
105
106 zap:    clean
107         @rm -f *.obj $(LIB)
108
109 strip:
110         @true
111
112
113
114