2 # ar65 Makefile for the Watcom compiler (using GNU make)
5 # ------------------------------------------------------------------------------
8 # Environment variables for the watcom compiler
9 export WATCOM = c:\\watcom
10 export INCLUDE = $(WATCOM)\\h
12 # We will use the windows compiler under linux (define as empty for windows)
13 export WINEDEBUG=fixme-all
20 WSTRIP = $(WINE) wstrip -q
25 CFLAGS = -d1 -obeilr -zp4 -5 -zq -w2 -i=..\\common
30 # Create NT programs by default
35 # --------------------- OS2 ---------------------
38 CFLAGS += -bt=$(TARGET)
41 # -------------------- DOS4G --------------------
42 ifeq ($(TARGET),DOS32)
44 CFLAGS += -bt=$(TARGET)
47 # --------------------- NT ----------------------
50 CFLAGS += -bt=$(TARGET)
53 # ------------------------------------------------------------------------------
57 $(CC) $(CFLAGS) -fo=$@ $^
60 # ------------------------------------------------------------------------------
61 # All library OBJ files
76 LIBS = ../common/common.lib
79 # ------------------------------------------------------------------------------
84 # ------------------------------------------------------------------------------
88 $(EXE): $(OBJS) $(LIBS)
89 @echo "DEBUG ALL" > $(LNKCFG)
90 @echo "OPTION QUIET" >> $(LNKCFG)
91 @echo "OPTION MAP" >> $(LNKCFG)
92 @echo "OPTION STACK=65536" >> $(LNKCFG)
93 @echo "NAME $@" >> $(LNKCFG)
94 @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
95 @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
96 @$(LD) system $(SYSTEM) @$(LNKCFG)
103 @rm -f $(OBJS)$(EXE) $(EXE:.exe=.map)