#
# FILE: Makefile (for xlisp 2.0)
# DESC: Ported to Trumpet by Christopher Lee Fraley (cf0v) 6-APR-89.
#
# 1.0 ( 6-APR-89) - ported to NeXT from Organ version 2.5. (cf0v)
# 1.1 (27-APR-89) - added mmalloc.o. (cf0v)
# 1.2 ( 5-MAY-89) - moved to my account. (cf0v)
# 1.3 ( 8-MAY-89) - moved all fugue code to fugue directory. (cf0v)
#

# Compiler to use: (and flags)
CC		=	cc
CFLAGS		= 	-g

# User's directory:
USRPATH		=	/usr0/rbd
LISPPATH	=	/usr0/gp16/fugue
FUGUEPATH	=	/usr0/gp16/fugue

# Object files for xlisp:
OBJECTS		=   xlbfun.o xlcont.o xldbug.o xldmem.o \
		xleval.o xlfio.o xlftab.o xlglob.o \
		xlimage.o xlinit.o xlio.o xlisp.o \
		xljump.o xllist.o xlmath.o xlobj.o \
		xlpp.o xlprin.o xlread.o xlstr.o \
		xlsubr.o xlsym.o xlsys.o unixstuff.o \
		extern.o local.o debug.o \
		sound.o soundint.o fugue.o fugueint.o \
		    table.o tableint.o \
		    mmalloc.o

xlisp:	$(OBJECTS)
	$(CC) $(OBJECTS) -lm -o $(USRPATH)/fugue/xl

# mmalloc.c: $(FUGUEPATH)/mmalloc.c
#	cp $(FUGUEPATH)/mmalloc.c mmalloc.c

# sound.h: $(FUGUEPATH)/sound.h
#	cp $(FUGUEPATH)/sound.h sound.h

# sound.c: $(FUGUEPATH)/sound.c sound.h
#	cp $(FUGUEPATH)/sound.c sound.c

soundintptrs.h soundintdefs.h soundint.c: sound.h
	intgen soundint sound.h

# fugue.h: $(FUGUEPATH)/fugue.h
#	cp $(FUGUEPATH)/fugue.h fugue.h

# fugue.c: $(FUGUEPATH)/fugue.c fugue.h
#	cp $(FUGUEPATH)/fugue.c fugue.c

fugueintptrs.h fugueintdefs.h fugueint.c: fugue.h
	intgen fugueint fugue.h

# Begining of example:
# Extending Fugue/XLisp system with function found in "table.c"
# table.h: $(FUGUEPATH)/table.h
#	cp $(FUGUEPATH)/table.h table.h
# table.c: $(FUGUEPATH)/table.c
#	cp $(FUGUEPATH)/table.c table.c
tableintptrs.h tableintdefs.h tableint.c: table.h
	intgen tableint table.h
xlftab.o: tableintptrs.h tableintdefs.h
# Note that table.o must be added to OBJECTS list at begining of file.
# End of example.

xlftab.o: soundintptrs.h soundintdefs.h fugueintptrs.h fugueintdefs.h
