2005-02-14 09:21:54 +00:00
|
|
|
# -*- makefile -*-
|
2000-05-28 13:40:48 +00:00
|
|
|
#
|
2005-02-14 09:21:54 +00:00
|
|
|
# makefile for CC65's console library
|
2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
.SUFFIXES: .o .s .c
|
|
|
|
|
2004-10-26 19:28:26 +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:28:26 +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) $<
|
|
|
|
|
2005-02-14 09:21:54 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Rules to help us see what code the compiler and assembler make.
|
|
|
|
|
|
|
|
#%.s : %.c
|
|
|
|
# @$(CC) $(CFLAGS) -S $<
|
|
|
|
|
|
|
|
%.lst : %.s
|
|
|
|
@$(AS) $(AFLAGS) -l -o /dev/null $<
|
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Object files
|
|
|
|
|
2000-11-23 19:05:32 +00:00
|
|
|
OBJS = _cursor.o \
|
2003-02-01 21:49:55 +00:00
|
|
|
cprintf.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
cputhex.o \
|
|
|
|
cputs.o \
|
2005-02-14 09:21:54 +00:00
|
|
|
cscanf.o \
|
2000-11-23 19:05:32 +00:00
|
|
|
cursor.o \
|
2003-02-01 21:49:55 +00:00
|
|
|
scrsize.o \
|
2005-02-14 09:21:54 +00:00
|
|
|
vcprintf.o \
|
|
|
|
vcscanf.o
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-02-06 15:35:30 +00:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# Targets
|
|
|
|
|
|
|
|
.PHONY: all clean zap
|
|
|
|
|
2000-11-23 19:05:32 +00:00
|
|
|
all: $(OBJS)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
2005-02-14 09:21:54 +00:00
|
|
|
@$(RM) *~ *.lst $(OBJS)
|
2003-02-06 15:35:30 +00:00
|
|
|
|
|
|
|
zap: clean
|
|
|
|
|