]> git.sur5r.net Git - cc65/blob - src/common/make/watcom.mak
Move the Debug flag into a new module "debugflag" in the common directory.
[cc65] / src / common / make / watcom.mak
1 #
2 # CC65 Makefile for the Watcom compiler (using GNU make)
3 #
4
5 # ------------------------------------------------------------------------------
6 # Generic stuff
7
8 AR      = WLIB
9 LD      = WLINK
10 LIB     = common.lib
11
12
13 # --------------------- OS2 ---------------------
14 ifeq ($(TARGET),OS2)
15 SYSTEM  = os2v2
16 CC      = WCC386
17 CFLAGS  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
18 endif
19
20 # -------------------- DOS4G --------------------
21 ifeq ($(TARGET),DOS32)
22 SYSTEM  = dos4g
23 CC      = WCC386
24 CFLAGS  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
25 endif
26
27 # --------------------- NT ----------------------
28 ifeq ($(TARGET),NT)
29 SYSTEM  = nt
30 CC      = WCC386
31 CFLAGS  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
32 endif
33
34 # ------------------------------------------------------------------------------
35 # Implicit rules
36
37 %.obj:  %.c
38         $(CC) $(CFLAGS) $^
39
40
41 # ------------------------------------------------------------------------------
42 # All library OBJ files
43
44 OBJS =  abend.obj       \
45         bitops.obj      \
46         chartype.obj    \
47         check.obj       \
48         cmdline.obj     \
49         coll.obj        \
50         debugflag.obj   \
51         exprdefs.obj    \
52         filepos.obj     \
53         fname.obj       \
54         hashstr.obj     \
55         matchpat.obj    \
56         print.obj       \
57         segdefs.obj     \
58         strbuf.obj      \
59         strutil.obj     \
60         target.obj      \
61         tgttrans.obj    \
62         wildargv.obj    \
63         xmalloc.obj     \
64         xsprintf.obj
65
66
67 # ------------------------------------------------------------------------------
68 # Main targets
69
70 all:    lib
71
72 lib:    $(LIB)
73
74 $(LIB): $(OBJS)
75         @echo Creating library...
76         $(AR) -q -b -P=32 $(LIB) $(foreach OBJ, $(OBJS), +-$(OBJ))
77         @echo Done!
78
79 clean:
80         @if exist *.obj del *.obj
81         @if exist $(LIB) del $(LIB)
82
83
84
85
86