# Makefile for Lattice version for Amiga

CC =		lc
DEFS =		-dAMIGA -dLATTICE
# There is a local copy of all the include files because there
# doesn't appear to be any way to make the next line work:
INCLUDES =	-i /
CFLAGS =	$(DEFS) $(INCLUDES)
LIBNAME =	libdbug.a

all :		$(LIBNAME) factorial analyze

$(LIBNAME) :	/dbug.c
		$(CC) -o$@ $(CFLAGS) /dbug.c

factorial :	main.o factorial.o $(LIBNAME)
		blink with factorial.lnk

main.o :	/main.c dbug.h
		$(CC) -o$@ $(CFLAGS) /main.c

factorial.o :	/factorial.c dbug.h
		$(CC) -o$@ $(CFLAGS) /factorial.c


#
#	Make the analyze program for runtime profiling support.
#

analyze :	analyze.o getopt.o $(LIBNAME)
		blink with analyze.lnk

analyze.o :	/analyze.c useful.h dbug.h
		$(CC) -o$@ $(CFLAGS) /analyze.c

getopt.o :	/getopt.c
		$(CC) -o$@ $(CFLAGS) /getopt.c
