1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-07 00:25:45 +00:00
Files
cc65/src/cl65/make/watcom.mak
cuz 25dd95438f No output when using wstrip
git-svn-id: svn://svn.cc65.org/cc65/trunk@3418 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-03-25 22:27:39 +00:00

98 lines
1.9 KiB
Makefile

#
# CL65 Makefile for the Watcom compiler (using GNU make)
#
# ------------------------------------------------------------------------------
# Generic stuff
# Environment variables for the watcom compiler
export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
export WINEDEBUG=fixme-all
WINE = wine
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP -q
LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = cl65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CFLAGS += -bt=$(TARGET)
endif
# ------------------------------------------------------------------------------
# Implicit rules
%.obj: %.c
$(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------
# All OBJ files
OBJS = error.obj \
global.obj \
main.obj
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-$(WSTRIP) $(EXE)