mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Added a makefile for cc65 for testing purposes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4379 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
388ccf4c4b
commit
f4acd3eb4f
104
src/common/make/cc65.mak
Normal file
104
src/common/make/cc65.mak
Normal file
@ -0,0 +1,104 @@
|
||||
#
|
||||
# cc65 Makefile for the cc65 common directory
|
||||
#
|
||||
|
||||
|
||||
RM = rm -f
|
||||
SYS = c64
|
||||
CFLAGS = -g -T -t $(SYS) -Oirs --standard c89
|
||||
AS = ../ca65/ca65
|
||||
AR = ../ar65/ar65
|
||||
CC = ../cc65/cc65
|
||||
LDFLAGS =
|
||||
LIB = common.lib
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Generic rules
|
||||
|
||||
.c.o:
|
||||
@echo $<
|
||||
@$(CC) $(CFLAGS) $<
|
||||
@$(AS) $(basename $<).s
|
||||
|
||||
.s.o:
|
||||
@echo $<
|
||||
@$(AS) $(MY_ASM) -t $(SYS) $<
|
||||
|
||||
.o:
|
||||
@$(LD) -t $(SYS) -m $(basename $@).map -o $@ $^ $(CLIB)
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Object files for the library
|
||||
|
||||
OBJS = abend.o \
|
||||
addrsize.o \
|
||||
assertion.o \
|
||||
bitops.o \
|
||||
chartype.o \
|
||||
check.o \
|
||||
cmdline.o \
|
||||
coll.o \
|
||||
cpu.o \
|
||||
debugflag.o \
|
||||
exprdefs.o \
|
||||
filepos.o \
|
||||
filetype.o \
|
||||
fname.o \
|
||||
fp.o \
|
||||
hashstr.o \
|
||||
hashtab.o \
|
||||
intstack.o \
|
||||
matchpat.o \
|
||||
mmodel.o \
|
||||
print.o \
|
||||
searchpath.o \
|
||||
segdefs.o \
|
||||
segnames.o \
|
||||
shift.o \
|
||||
strbuf.o \
|
||||
strpool.o \
|
||||
strstack.o \
|
||||
strutil.o \
|
||||
target.o \
|
||||
tgttrans.o \
|
||||
version.o \
|
||||
xmalloc.o \
|
||||
xsprintf.o
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Dummy targets
|
||||
|
||||
.PHONY: all
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
all: lib
|
||||
include .depend
|
||||
else
|
||||
all: depend
|
||||
@$(MAKE) -f make/gcc.mak all
|
||||
endif
|
||||
|
||||
.PHONY: lib
|
||||
lib: $(LIB)
|
||||
|
||||
$(LIB): $(OBJS)
|
||||
$(AR) a $(LIB) $?
|
||||
|
||||
clean:
|
||||
$(RM) *~ core *.map
|
||||
|
||||
zap: clean
|
||||
$(RM) *.o $(LIB) .depend
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Make the dependencies
|
||||
|
||||
.PHONY: depend dep
|
||||
depend dep: $(OBJS:.o=.c)
|
||||
@echo "Creating dependency information"
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user