2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:35:40 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Programs and flags
|
|
|
|
|
|
|
|
SYS = none
|
|
|
|
|
|
|
|
AS = ../../src/ca65/ca65
|
|
|
|
CC = ../../src/cc65/cc65
|
|
|
|
LD = ../../src/ld65/ld65
|
|
|
|
|
2009-12-18 11:58:50 +00:00
|
|
|
AFLAGS = -t $(SYS) --forget-inc-paths -I../../asminc
|
2004-10-26 19:35:40 +00:00
|
|
|
CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2009-05-07 18:31:57 +00:00
|
|
|
C_OBJS = cbm_dir.o \
|
|
|
|
cbm_load.o \
|
2012-05-30 19:37:57 +00:00
|
|
|
cbm_save.o \
|
2012-06-02 22:56:14 +00:00
|
|
|
opendir.o \
|
2012-06-03 15:11:32 +00:00
|
|
|
readdir.o \
|
|
|
|
seekdir.o
|
2002-06-22 10:58:24 +00:00
|
|
|
|
|
|
|
S_OBJS = c_acptr.o \
|
|
|
|
c_basin.o \
|
|
|
|
c_bsout.o \
|
|
|
|
c_chkin.o \
|
|
|
|
c_ciout.o \
|
|
|
|
c_ckout.o \
|
|
|
|
c_clall.o \
|
|
|
|
c_close.o \
|
|
|
|
c_clrch.o \
|
2012-07-01 11:30:41 +00:00
|
|
|
c_getin.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
c_iobase.o \
|
|
|
|
c_listen.o \
|
2012-05-30 19:37:57 +00:00
|
|
|
c_load.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
c_open.o \
|
|
|
|
c_readst.o \
|
2012-05-30 19:37:57 +00:00
|
|
|
c_save.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
c_setlfs.o \
|
|
|
|
c_setnam.o \
|
2012-05-30 19:37:57 +00:00
|
|
|
c_talk.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
c_unlsn.o \
|
|
|
|
c_untlk.o \
|
|
|
|
cbm_close.o \
|
2012-06-24 13:52:06 +00:00
|
|
|
cbm_filetype.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
cbm_open.o \
|
|
|
|
cbm_read.o \
|
2002-11-15 18:21:32 +00:00
|
|
|
cbm_write.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
cclear.o \
|
|
|
|
chline.o \
|
2012-05-30 19:37:57 +00:00
|
|
|
clock.o \
|
2002-11-16 23:45:15 +00:00
|
|
|
close.o \
|
2012-05-30 19:37:57 +00:00
|
|
|
closedir.o \
|
|
|
|
ctype.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
cvline.o \
|
2012-06-01 19:23:34 +00:00
|
|
|
dir.o \
|
2002-11-17 22:45:55 +00:00
|
|
|
diskcmd.o \
|
2010-11-14 11:50:38 +00:00
|
|
|
exehdr.o \
|
2002-11-16 23:45:15 +00:00
|
|
|
filedes.o \
|
|
|
|
filename.o \
|
|
|
|
filevars.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
gotox.o \
|
|
|
|
gotoxy.o \
|
|
|
|
gotoy.o \
|
2005-07-24 13:20:49 +00:00
|
|
|
initcwd.o \
|
2010-11-13 16:56:42 +00:00
|
|
|
loadaddr.o \
|
2002-11-16 23:45:15 +00:00
|
|
|
open.o \
|
2002-07-18 13:29:04 +00:00
|
|
|
oserrlist.o \
|
2002-06-22 10:58:24 +00:00
|
|
|
oserror.o \
|
2002-11-16 23:45:15 +00:00
|
|
|
read.o \
|
2012-06-03 15:11:32 +00:00
|
|
|
rewinddir.o \
|
2002-11-17 22:45:55 +00:00
|
|
|
rwcommon.o \
|
2002-11-16 23:45:15 +00:00
|
|
|
scratch.o \
|
|
|
|
sysremove.o \
|
2009-02-22 14:06:12 +00:00
|
|
|
sysrename.o \
|
2012-06-03 14:03:22 +00:00
|
|
|
telldir.o \
|
2009-11-02 16:23:32 +00:00
|
|
|
toascii.o \
|
2003-01-01 21:33:49 +00:00
|
|
|
wherex.o \
|
|
|
|
wherey.o \
|
2002-11-16 23:45:15 +00:00
|
|
|
write.o
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
all: $(C_OBJS) $(S_OBJS)
|
|
|
|
|
|
|
|
clean:
|
2003-08-20 11:59:27 +00:00
|
|
|
@$(RM) *~ *.bck $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
|
|
|
|