2000-05-28 13:40:48 +00:00
|
|
|
#
|
|
|
|
# Makefile for the cl65 compile&link utility
|
|
|
|
#
|
|
|
|
|
|
|
|
CC=gcc
|
|
|
|
CFLAGS = -O2 -g -Wall
|
|
|
|
LDFLAGS=
|
|
|
|
|
|
|
|
OBJS = error.o \
|
|
|
|
global.o \
|
|
|
|
main.o \
|
|
|
|
spawn.o
|
|
|
|
|
2000-06-14 10:01:36 +00:00
|
|
|
LIBS = ../common/common.a
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
EXECS = cl65
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
ifeq (.depend,$(wildcard .depend))
|
|
|
|
all : $(EXECS)
|
|
|
|
include .depend
|
|
|
|
else
|
|
|
|
all: depend
|
|
|
|
@$(MAKE) -f make/gcc.mak all
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2000-06-14 10:01:36 +00:00
|
|
|
cl65: $(OBJS) $(LIBS)
|
|
|
|
$(CC) $(LDFLAGS) -o cl65 $(CFLAGS) $(OBJS) $(LIBS)
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ core
|
|
|
|
|
|
|
|
zap: clean
|
|
|
|
rm -f *.o $(EXECS) .depend
|
|
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Make the dependencies
|
|
|
|
|
|
|
|
.PHONY: depend dep
|
|
|
|
depend dep: $(OBJS:.o=.c)
|
|
|
|
@echo "Creating dependency information"
|
|
|
|
$(CC) -MM $^ > .depend
|
|
|
|
|
|
|
|
|
|
|
|
|