2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# makefile for CC65 runtime library
|
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
%.o: %.c
|
|
|
|
@$(CC) $(CFLAGS) $<
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $(*).s
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
@$(AS) -g -o $@ $(AFLAGS) $<
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2001-03-10 14:19:21 +00:00
|
|
|
C_OBJS = _afailed.o \
|
|
|
|
_hextab.o \
|
2003-04-24 20:55:55 +00:00
|
|
|
_poserror.o \
|
2001-04-19 06:46:30 +00:00
|
|
|
_scanf.o \
|
2001-03-10 14:19:21 +00:00
|
|
|
abort.o \
|
2002-11-12 22:06:02 +00:00
|
|
|
asctime.o \
|
2001-03-10 14:19:21 +00:00
|
|
|
bsearch.o \
|
|
|
|
errormsg.o \
|
|
|
|
fdopen.o \
|
|
|
|
fgetc.o \
|
|
|
|
fgetpos.o \
|
|
|
|
fgets.o \
|
|
|
|
fputc.o \
|
|
|
|
fputs.o \
|
|
|
|
freopen.o \
|
|
|
|
fseek.o \
|
|
|
|
fsetpos.o \
|
|
|
|
ftell.o \
|
|
|
|
getchar.o \
|
|
|
|
gets.o \
|
2002-11-12 22:06:02 +00:00
|
|
|
gmtime.o \
|
2001-03-10 14:19:21 +00:00
|
|
|
locale.o \
|
2002-11-12 22:06:02 +00:00
|
|
|
localtime.o \
|
|
|
|
mktime.o \
|
2001-03-10 14:19:21 +00:00
|
|
|
perror.o \
|
|
|
|
putchar.o \
|
|
|
|
puts.o \
|
|
|
|
qsort.o \
|
|
|
|
realloc.o \
|
|
|
|
rewind.o \
|
2003-06-12 08:28:54 +00:00
|
|
|
sleep.o \
|
2001-03-10 14:19:21 +00:00
|
|
|
sscanf.o \
|
2002-11-13 13:08:46 +00:00
|
|
|
strftime.o \
|
2001-03-10 14:19:21 +00:00
|
|
|
strxfrm.o \
|
|
|
|
strtok.o \
|
2003-05-27 18:23:38 +00:00
|
|
|
system.o \
|
2002-11-12 22:06:02 +00:00
|
|
|
timezone.o \
|
2002-09-18 20:47:22 +00:00
|
|
|
vsscanf.o
|
2001-03-10 14:19:21 +00:00
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-08-12 13:51:11 +00:00
|
|
|
S_OBJS = _cwd.o \
|
|
|
|
_fdesc.o \
|
2002-09-18 20:47:22 +00:00
|
|
|
_file.o \
|
2002-11-23 17:52:38 +00:00
|
|
|
_fopen.o \
|
2002-09-18 20:47:22 +00:00
|
|
|
_heap.o \
|
2003-02-01 10:20:35 +00:00
|
|
|
_heapadd.o \
|
2003-02-01 12:22:09 +00:00
|
|
|
_heapmaxavail.o \
|
|
|
|
_heapmemavail.o \
|
2000-11-30 23:04:24 +00:00
|
|
|
_oserror.o \
|
2003-02-01 21:49:55 +00:00
|
|
|
_printf.o \
|
|
|
|
_swap.o \
|
|
|
|
_sys.o \
|
|
|
|
abs.o \
|
|
|
|
atexit.o \
|
|
|
|
atoi.o \
|
|
|
|
calloc.o \
|
2003-08-12 13:24:25 +00:00
|
|
|
chdir.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
copydata.o \
|
2003-06-12 09:10:50 +00:00
|
|
|
creat.o \
|
2002-11-12 22:06:02 +00:00
|
|
|
ctime.o \
|
2002-11-02 10:52:36 +00:00
|
|
|
divt.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
errno.o \
|
2002-11-24 19:13:38 +00:00
|
|
|
fclose.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
fmisc.o \
|
2002-11-23 18:46:40 +00:00
|
|
|
fopen.o \
|
2000-12-01 17:25:07 +00:00
|
|
|
fprintf.o \
|
2002-11-23 23:05:00 +00:00
|
|
|
fread.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
free.o \
|
2002-11-23 22:51:25 +00:00
|
|
|
fwrite.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
getcpu.o \
|
2003-08-12 13:51:11 +00:00
|
|
|
getcwd.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
isalnum.o \
|
|
|
|
isalpha.o \
|
|
|
|
isblank.o \
|
|
|
|
iscntrl.o \
|
|
|
|
isdigit.o \
|
|
|
|
isgraph.o \
|
|
|
|
islower.o \
|
2000-08-11 21:44:39 +00:00
|
|
|
isprint.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
ispunct.o \
|
|
|
|
isspace.o \
|
|
|
|
isupper.o \
|
|
|
|
isxdigit.o \
|
|
|
|
itoa.o \
|
|
|
|
labs.o \
|
|
|
|
longjmp.o \
|
2000-07-21 16:57:58 +00:00
|
|
|
ltoa.o \
|
|
|
|
malloc.o \
|
|
|
|
maperrno.o \
|
|
|
|
memchr.o \
|
|
|
|
memcmp.o \
|
2000-12-01 17:32:59 +00:00
|
|
|
memcpy.o \
|
2003-08-20 10:17:53 +00:00
|
|
|
memmove.o \
|
2000-12-01 17:32:59 +00:00
|
|
|
memset.o \
|
2002-04-21 14:29:30 +00:00
|
|
|
modfree.o \
|
|
|
|
modload.o \
|
2003-08-12 13:06:43 +00:00
|
|
|
oserrcheck.o \
|
2000-12-01 17:32:59 +00:00
|
|
|
printf.o \
|
|
|
|
rand.o \
|
2003-03-14 11:12:38 +00:00
|
|
|
raise.o \
|
2003-08-13 07:31:01 +00:00
|
|
|
remove.o \
|
2003-08-12 13:06:43 +00:00
|
|
|
rename.o \
|
2000-12-01 17:32:59 +00:00
|
|
|
setjmp.o \
|
2003-03-14 11:12:38 +00:00
|
|
|
signal.o \
|
|
|
|
sigtable.o \
|
2000-12-01 17:32:59 +00:00
|
|
|
sprintf.o \
|
2000-07-21 16:57:58 +00:00
|
|
|
strcat.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
strchr.o \
|
|
|
|
strcmp.o \
|
|
|
|
strcoll.o \
|
|
|
|
strcpy.o \
|
|
|
|
strcspn.o \
|
2000-07-22 11:10:34 +00:00
|
|
|
strdup.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
strerror.o \
|
|
|
|
stricmp.o \
|
|
|
|
strlen.o \
|
|
|
|
strlower.o \
|
|
|
|
strncat.o \
|
|
|
|
strncmp.o \
|
|
|
|
strncpy.o \
|
2002-07-18 13:29:04 +00:00
|
|
|
stroserr.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
strpbrk.o \
|
|
|
|
strrchr.o \
|
|
|
|
strspn.o \
|
|
|
|
strstr.o \
|
|
|
|
strupper.o \
|
2002-11-12 19:54:30 +00:00
|
|
|
time.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
tolower.o \
|
|
|
|
toupper.o \
|
2003-08-12 14:24:34 +00:00
|
|
|
uname.o \
|
2003-06-12 08:43:57 +00:00
|
|
|
unlink.o \
|
2003-08-12 17:24:02 +00:00
|
|
|
utscopy.o \
|
2000-12-01 15:05:46 +00:00
|
|
|
vfprintf.o \
|
2003-06-02 16:08:26 +00:00
|
|
|
vprintf.o \
|
2000-12-01 22:57:32 +00:00
|
|
|
vsprintf.o \
|
2000-07-16 22:09:58 +00:00
|
|
|
zerobss.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:
|
|
|
|
@rm -f *~
|
|
|
|
@rm -f $(C_OBJS:.o=.s)
|
|
|
|
@rm -f $(C_OBJS)
|
|
|
|
@rm -f $(S_OBJS)
|
2000-11-20 21:59:43 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
zap: clean
|
|
|
|
|