mirror of
https://github.com/cc65/cc65.git
synced 2025-01-21 00:31:53 +00:00
d0bb32e6c6
git-svn-id: svn://svn.cc65.org/cc65/trunk@2181 b7a2c559-68d2-44c3-8de9-860c34a00d81
91 lines
1.6 KiB
Makefile
91 lines
1.6 KiB
Makefile
#
|
|
# CC65 Makefile for the Watcom compiler (using GNU make)
|
|
#
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Generic stuff
|
|
|
|
AR = WLIB
|
|
LD = WLINK
|
|
LIB = common.lib
|
|
|
|
|
|
# --------------------- OS2 ---------------------
|
|
ifeq ($(TARGET),OS2)
|
|
SYSTEM = os2v2
|
|
CC = WCC386
|
|
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
|
|
endif
|
|
|
|
# -------------------- DOS4G --------------------
|
|
ifeq ($(TARGET),DOS32)
|
|
SYSTEM = dos4g
|
|
CC = WCC386
|
|
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
|
|
endif
|
|
|
|
# --------------------- NT ----------------------
|
|
ifeq ($(TARGET),NT)
|
|
SYSTEM = nt
|
|
CC = WCC386
|
|
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
|
|
endif
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Implicit rules
|
|
|
|
%.obj: %.c
|
|
$(CC) $(CFLAGS) $^
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# All library OBJ files
|
|
|
|
OBJS = abend.obj \
|
|
bitops.obj \
|
|
chartype.obj \
|
|
check.obj \
|
|
cmdline.obj \
|
|
coll.obj \
|
|
cpu.obj \
|
|
debugflag.obj \
|
|
exprdefs.obj \
|
|
filepos.obj \
|
|
filetype.obj \
|
|
fname.obj \
|
|
hashstr.obj \
|
|
matchpat.obj \
|
|
print.obj \
|
|
searchpath.obj \
|
|
segdefs.obj \
|
|
segnames.obj \
|
|
strbuf.obj \
|
|
strutil.obj \
|
|
target.obj \
|
|
tgttrans.obj \
|
|
wildargv.obj \
|
|
xmalloc.obj \
|
|
xsprintf.obj
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Main targets
|
|
|
|
all: lib
|
|
|
|
lib: $(LIB)
|
|
|
|
$(LIB): $(OBJS)
|
|
@echo Creating library...
|
|
$(AR) -q -b -P=32 $(LIB) $(foreach OBJ, $(OBJS), +-$(OBJ))
|
|
@echo Done!
|
|
|
|
clean:
|
|
@if exist *.obj del *.obj
|
|
@if exist $(LIB) del $(LIB)
|
|
|
|
|
|
|
|
|
|
|