2000-05-28 13:40:48 +00:00
|
|
|
#
|
2012-01-30 21:19:09 +00:00
|
|
|
# makefile for CC65 runtime library
|
2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
|
2012-01-30 21:19:09 +00:00
|
|
|
.SUFFIXES: .o .s .c
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2012-01-30 21:19:09 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2012-01-30 21:19:09 +00:00
|
|
|
SYS = geos-cbm
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2012-01-30 21:19:09 +00:00
|
|
|
AS = ../../src/ca65/ca65
|
|
|
|
CC = ../../src/cc65/cc65
|
|
|
|
LD = ../../src/ld65/ld65
|
|
|
|
|
2012-01-31 21:22:06 +00:00
|
|
|
AFLAGS = -t $(SYS) --forget-inc-paths -I. -I../../asminc
|
2012-01-30 21:19:09 +00:00
|
|
|
CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(CC) -o $(notdir $(*).s) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
|
|
|
%.emd: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
|
|
|
|
|
|
|
%.joy: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
|
|
|
|
|
|
|
%.mou: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
|
|
|
|
|
|
|
%.ser: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
|
|
|
|
|
|
|
%.tgi: %.o ../runtime/zeropage.o
|
|
|
|
@$(LD) -o $@ -t module $^
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Directories
|
|
|
|
|
2012-02-07 13:53:14 +00:00
|
|
|
DIRS = devel \
|
2012-01-30 21:19:09 +00:00
|
|
|
disk \
|
|
|
|
file \
|
|
|
|
memory \
|
|
|
|
system
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS = geos-vdc.emd
|
|
|
|
|
|
|
|
JOYS = geos-stdjoy.joy
|
|
|
|
|
|
|
|
MOUS = #geos-stdmou.mou
|
|
|
|
|
|
|
|
SERS =
|
|
|
|
|
|
|
|
TGIS = geos-tgi.tgi
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Directives
|
|
|
|
|
|
|
|
include $(addsuffix /Makefile, $(DIRS))
|
|
|
|
vpath %.c $(DIRS)
|
|
|
|
vpath %.s $(DIRS)
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
|
|
|
all: $(C_OBJS) $(S_OBJS) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|
|
|
|
|
|
|
|
../runtime/zeropage.o:
|
|
|
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2012-01-30 21:19:09 +00:00
|
|
|
@$(RM) $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS) $(EMDS:.emd=.o) $(JOYS:.joy=.o) $(MOUS:.mou=.o) $(SERS:.ser=.o) $(TGIS:.tgi=.o)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
zap: clean
|
2012-01-30 21:19:09 +00:00
|
|
|
@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
|