# # Makefile for cross-compiler version of CC65. # (Modified for use on *nix machines -Intruder 1993) # CC=gcc CFLAGS = -O6 #-ggdb #-m486 LDFLAGS=-s #BINDIR=/root/bin BIN=/usr/local/bin C_SRCS = code-gen.c error.c expr1.c expr2.c expr3.c function.c glb.c \ globlvar.c io.c lexer.c main.c optab1.c optab2.c optimize.c \ preproc.c rwords.c stmt1.c stmt2.c symtab.c path.c copyleft.c H_SRCS = cc65.h cclex.h OBJS = code-gen.o error.o expr1.o expr2.o expr3.o function.o glb.o globlvar.o \ io.o lexer.o main.o optab1.o optab2.o optimize.o preproc.o rwords.o \ stmt1.o stmt2.o symtab.o path.o copyleft.o XOBJS = cruft.o EXECS = cc65 xopt predent postdent all : $(EXECS) cc65 : $(OBJS) $(XOBJS) $(CC) $(LDFLAGS) -o cc65 $(CFLAGS) $(OBJS) $(XOBJS) $(OBJS) : $(H_SRCS) $(XOBJS) : $(H_SRCS) xopt : xopt.c $(CC) -s -o xopt xopt.c predent : predent.c $(CC) -s -o predent predent.c postdent : postdent.c $(CC) -s -o postdent postdent.c indents : predent postdent $(C_SRCS) indents install : $(EXECS) cp -f $(EXECS) $(BINDIR) clean : rm -f *.o *~ core $(EXECS)