Files
cc65/src/ld65/make/watcom.mak
cuz 2767f66146 Place shared modules into the common dir
git-svn-id: svn://svn.cc65.org/cc65/trunk@71 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-14 09:57:42 +00:00

135 lines
2.1 KiB
Makefile

#
# ld65 Makefile for the Watcom compiler
#
# ------------------------------------------------------------------------------
# Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB
LD = WLINK
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 ---------------------
SYSTEM = os2v2
CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
!elif $(TARGET)==DOS32
# -------------------- DOS4G --------------------
SYSTEM = dos4g
CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ----------------------
SYSTEM = nt
CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
!else
!error
!endif
# ------------------------------------------------------------------------------
# Implicit rules
.c.obj:
$(CC) $(CCCFG) $<
# ------------------------------------------------------------------------------
# All OBJ files
OBJS = bin.obj \
binfmt.obj \
config.obj \
dbgsyms.obj \
error.obj \
exports.obj \
expr.obj \
extsyms.obj \
fileio.obj \
global.obj \
library.obj \
main.obj \
mapfile.obj \
o65.obj \
objdata.obj \
objfile.obj \
scanner.obj \
segments.obj \
target.obj
LIBS = ..\common\common.lib
# ------------------------------------------------------------------------------
# Main targets
all: ld65
ld65: ld65.exe
# ------------------------------------------------------------------------------
# Other targets
ld65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&|
DEBUG ALL
OPTION QUIET
NAME $<
FILE bin.obj
FILE binfmt.obj
FILE config.obj
FILE dbgsyms.obj
FILE error.obj
FILE exports.obj
FILE expr.obj
FILE extsyms.obj
FILE fileio.obj
FILE global.obj
FILE library.obj
FILE main.obj
FILE mapfile.obj
FILE o65.obj
FILE objdata.obj
FILE objfile.obj
FILE scanner.obj
FILE segments.obj
FILE target.obj
LIBRARY ..\common\common.lib
|
clean:
@if exist *.obj del *.obj
@if exist *.obj del ld65.exe
strip:
@-wstrip ld65.exe