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-02-07 20:11:36 +00:00
|
|
|
AFLAGS = -t $(SYS) --forget-inc-paths -I. -I../geos-common -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 17:02:34 +00:00
|
|
|
DIRS = disk \
|
|
|
|
drivers \
|
2012-01-30 21:19:09 +00:00
|
|
|
file \
|
|
|
|
memory \
|
|
|
|
system
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
EMDS = geos-vdc.emd
|
|
|
|
|
|
|
|
JOYS = geos-stdjoy.joy
|
|
|
|
|
2012-02-08 14:30:07 +00:00
|
|
|
MOUS =
|
2012-01-30 21:19:09 +00:00
|
|
|
|
|
|
|
SERS =
|
|
|
|
|
|
|
|
TGIS = geos-tgi.tgi
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Directives
|
|
|
|
|
|
|
|
include $(addsuffix /Makefile, $(DIRS))
|
2012-02-17 20:23:35 +00:00
|
|
|
vpath %.c $(DIRS)
|
|
|
|
vpath %.s $(DIRS)
|
2012-01-30 21:19:09 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# 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)
|