]> git.sur5r.net Git - cc65/blob - src/dbginfo/make/watcom.mak
One more place where OutputNameUsed must be flagged.
[cc65] / src / dbginfo / make / watcom.mak
1 #
2 # Makefile for the debug info test executable
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 WSTRIP  = $(WINE) wstrip -q
21
22 LNKCFG  = ld.tmp
23
24 # Program arguments
25 CFLAGS  = -d1 -obeilr -zp4 -5 -zq -w2
26
27 # Target files
28 EXE     = dbgtest.exe
29
30 # Create NT programs by default
31 ifndef TARGET
32 TARGET = NT
33 endif
34
35 # --------------------- OS2 ---------------------
36 ifeq ($(TARGET),OS2)
37 SYSTEM  = os2v2
38 CFLAGS  += -bt=$(TARGET)
39 endif
40
41 # -------------------- DOS4G --------------------
42 ifeq ($(TARGET),DOS32)
43 SYSTEM  = dos4g
44 CFLAGS  += -bt=$(TARGET)
45 endif
46
47 # --------------------- NT ----------------------
48 ifeq ($(TARGET),NT)
49 SYSTEM  = nt
50 CFLAGS  += -bt=$(TARGET)
51 endif
52
53 # ------------------------------------------------------------------------------
54 # Implicit rules
55
56 %.obj:  %.c
57         $(CC) $(CFLAGS) -fo=$@ $^
58
59
60 # ------------------------------------------------------------------------------
61 # Object files to link
62
63 OBJS =  dbginfo.obj     \
64         dbgtest.obj  
65
66 # ------------------------------------------------------------------------------
67 # Main targets
68
69 all:            $(EXE)
70
71
72 # ------------------------------------------------------------------------------
73 # Other targets
74
75
76 $(EXE):         $(OBJS)
77         @echo "DEBUG ALL" > $(LNKCFG)
78         @echo "OPTION QUIET" >> $(LNKCFG)
79         @echo "OPTION MAP" >> $(LNKCFG)
80         @echo "OPTION STACK=65536" >> $(LNKCFG)
81         @echo "NAME $@" >> $(LNKCFG)
82         @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
83         @$(LD) system $(SYSTEM) @$(LNKCFG)
84         @rm $(LNKCFG)
85
86 clean:
87         @rm -f *~ core
88
89 zap:    clean
90         @rm -f $(OBJS) $(EXE) $(EXE:.exe=.map)
91
92 strip:
93         @-$(WSTRIP) $(EXE)
94