# Unix makefile for template
# Copyright 1992 Carnegie Mellon University
# Last modified date: 

CMTDIR = ../../lib
CMTLIB = $(CMTDIR)/libcmt.a
MIDIDIR =/afs/cs.cmu.edu/project/itc-i386-D-timer/midi/rtmach
MACH3DIR=/usr/itcrtmach
LINKMIDILIB = -L$(MIDIDIR) -lmtmidi -lmidi -L$(MACH3DIR)/lib -lnetname -lmach_rt -lm -lc -lg

# Definition of Compiler, Linker, and Flags
CC = cc
CFLAGS = -c -g -I$(CMTDIR) -DITC_MACH -I$(MIDIDIR) -I$(MACH3DIR)/include -I$(MACH3DIR)/include/mach
LN = ld
LINITFLAGS = $(MACH3DIR)/lib/crt0.o
LFLAGS = -L../../lib -lcmt $(LINKMIDILIB)

# EVERYTHING is everything this makefile knows how to make
EVERYTHING = template

# CURRENT is the file we want to make now.
CURRENT = $(EVERYTHING) ummakefile

TEMPLATEOBJ  = template.o

MOXCOBJ =  $(CMTDIR)/moxc.o $(CMTDIR)/moxcmain.o 

#-------------------------------------------------------------------------

current : $(CURRENT)
	echo "made $(CURRENT)"

everything : $(EVERYTHING)
	echo "made $(EVERYTHING)"

ummakefile : makefile
	cp makefile ummakefile

template : $(TEMPLATEOBJ) $(MOXCOBJ) $(CMTLIB)
	$(LN) $(LINITFLAGS) $(TEMPLATEOBJ) $(MOXCOBJ) $(LFLAGS) 

clean :
	rm -f $(TEMPLATEOBJ)
	rm -f *.BAK *.CKP

recompile : clean
	rm -f $(EVERYTHING)

