2016-01-25 02:11:39 +00:00
|
|
|
# to make for another target CPU, redefine PROC to the name of the target
|
|
|
|
# processor, e.g., 68000
|
|
|
|
PROC =6502
|
2014-05-04 05:20:34 +00:00
|
|
|
|
2016-01-25 02:11:39 +00:00
|
|
|
SLINKY_OBJECTS = builtins.o debugPrint.o errorStuff.o expr.o \
|
|
|
|
globals.o initialize.o instantiate.o link.o main.o \
|
|
|
|
map.o poke.o read.o relocate.o slinkyTables.o \
|
|
|
|
write.o
|
2014-05-04 05:20:34 +00:00
|
|
|
|
2016-01-25 02:11:39 +00:00
|
|
|
CFLAGS=-m32 -g -ansi -DYYDEBUG -DTARGET_CPU=CPU_$(PROC)
|
|
|
|
LDFLAGS=-m32
|
2014-05-04 05:20:34 +00:00
|
|
|
|
2016-01-25 02:11:39 +00:00
|
|
|
# If yacc is notionally present on a system, it's usually actually
|
|
|
|
# bison in a compatibility mode. bison is available by name more often
|
|
|
|
# than yacc itself is.
|
|
|
|
YACC=bison -y
|
|
|
|
#YACC=yacc
|
2014-05-04 05:47:33 +00:00
|
|
|
|
2016-02-09 02:10:23 +00:00
|
|
|
# Pick a compiler if you have one in particular you want.
|
|
|
|
CC=cc
|
|
|
|
#CC=gcc
|
2016-01-25 02:11:39 +00:00
|
|
|
#CC=clang
|
2014-05-04 05:20:34 +00:00
|
|
|
|
2016-01-25 02:11:39 +00:00
|
|
|
slinky: $(SLINKY_OBJECTS)
|
|
|
|
$(CC) $(LDFLAGS) -o slinky $(SLINKY_OBJECTS)
|
2014-05-04 05:20:34 +00:00
|
|
|
|
2016-01-24 06:53:59 +00:00
|
|
|
clean:
|
2014-05-04 05:20:34 +00:00
|
|
|
/bin/rm -f *.o slinky
|
|
|
|
|
|
|
|
love:
|
|
|
|
@echo "Not war?"
|
|
|
|
|
2016-01-25 02:11:39 +00:00
|
|
|
# Slinky needs to use the parser headers created by Macross. If they
|
|
|
|
# aren't available, we dip down and make them ourselves.
|
|
|
|
../y.tab.h: ../macross_$(PROC).y
|
|
|
|
cd .. && $(YACC) -d macross_$(PROC).y && cd slinky
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
|
2016-02-09 02:04:00 +00:00
|
|
|
Makefile.depend:
|
|
|
|
makedepend -Y -f - *.c > Makefile.depend
|
|
|
|
|
|
|
|
depend: Makefile.depend
|
|
|
|
|
|
|
|
include Makefile.depend
|