# Makefile for Alan interpreter to be built with Geek Gadgets GNU gcc on Amiga

COMPILER =  -DCOMPILER="\"[GG GCC 2.7.2.1]\""

# Define this to make interpreter log each crc calculation step
#CRCLOG = -DCRCLOG

CFLAGS = -g -Wall -funsigned-char $(COMPILER) $(VERBOSE) $(CRCLOG) -DHAVE_ANSI 

LDFLAGS = -g -lamiga -noixemul

OBJECTS = arun.o \
	main.o \
	debug.o \
	args.o \
	exe.o \
	inter.o \
	parse.o \
	rules.o \
	stack.o \
	decode.o \
	term.o \
	params.o \
	sysdep.o \
	alan.version.o


arun : $(OBJECTS)
	gcc -o arun $(OBJECTS) $(LDFLAGS) $(LIB)
	copy arun ..

dumpacd: dumpacd.o reverse.o spa.o
	$(CC) -o dumpacd $(CFLAGS) dumpacd.o reverse.o spa.o

spa.o: spa.c spa.h
	gcc $(CFLAGS) -DSTDIONONCONST -c spa.c -o spa.o 


strip:
	strip arun
	coff2exe arun



#---<< GENERATED DEPENDENCIES FOLLOWS >>---
args.o: args.c args.h main.h types.h sysdep.h acode.h
arun.o: arun.c main.h types.h sysdep.h acode.h term.h alan.version.h args.h
chartest.o: chartest.c
debug.o: debug.c types.h sysdep.h acode.h alan.version.h readline.h inter.h \
 main.h parse.h exe.h debug.h
decode.o: decode.c main.h types.h sysdep.h acode.h decode.h
dumpacd.o: dumpacd.c types.h sysdep.h acode.h spa.h
exe.o: exe.c types.h sysdep.h acode.h readline.h main.h parse.h \
 inter.h stack.h decode.h exe.h
genalan.o: genalan.c spa.h
inter.o: inter.c types.h sysdep.h acode.h main.h parse.h exe.h stack.h \
 inter.h
main.o: main.c sysdep.h types.h acode.h main.h readline.h alan.version.h \
 args.h parse.h inter.h rules.h debug.h stack.h exe.h term.h
params.o: params.c types.h sysdep.h acode.h params.h
parse.o: parse.c types.h sysdep.h acode.h readline.h main.h inter.h \
 exe.h term.h debug.h params.h parse.h
readline.o: readline.c readline.h types.h sysdep.h acode.h main.h
reverse.o: reverse.c types.h sysdep.h acode.h main.h reverse.h
rules.o: rules.c types.h sysdep.h acode.h main.h inter.h debug.h exe.h \
 stack.h rules.h
spa.o: spa.c spa.h
stack.o: stack.c types.h sysdep.h acode.h main.h stack.h
sysdep.o: sysdep.c sysdep.h
term.o: term.c main.h types.h sysdep.h acode.h term.h

