Files
cc65/src/sp65/make/watcom.mak
uz fbbf7e50d2 Added two more conversion targets: geos-bitmap, which will create a GEOS
compacted bitmap, and raw, which is probably mostly useful for debugging. It
converts an indexed image to a row of bytes which correspond to the color
indices of the pixels.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5615 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-03-13 21:12:27 +00:00

117 lines
2.4 KiB
Makefile

#
# sp65 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 -obeilr -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = sp65.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) -fo=$@ $^
# ------------------------------------------------------------------------------
# All OBJ files
OBJS = asm.obj \
attr.obj \
bin.obj \
bitmap.obj \
c.obj \
color.obj \
convert.obj \
error.obj \
fileio.obj \
geosbitmap.obj \
geosicon.obj \
input.obj \
koala.obj \
lynxsprite.obj \
main.obj \
output.obj \
palette.obj \
pcx.obj \
raw.obj \
vic2sprite.obj
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "OPTION MAP" >> $(LNKCFG)
@echo "OPTION STACK=65536" >> $(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 $(OBJS) $(EXE) $(EXE:.exe=.map)
strip:
@-$(WSTRIP) $(EXE)