# makefile for the interpreter
# @(#)make.template	2.22	11/25/92

# Root of source tree
ROOT=../..
# Path (absolute or relative) to the object directory root
OBJDIR=..
# True source directory
VPATH=../../src/interp
INCL=-I$(KERNDIR)

# get configuration info
CONFIG=$(ROOT)/config-$(ARCH).mk
include $(CONFIG)

# Include information on all stars and targets.

include $(ROOT)/stars.mk

# libraries
LIBS= $(STAR_LIBS) -lptolemy $(SYSLIBS)

LIBFILES=$(STAR_LIBFILES) $(LIBDIR)/libptolemy.a

# first star determines default domain as a rule
ALLSTARS = $(SDFSTARS) $(CGCSTARS) $(CG96STARS) $(CG56STARS) $(CGSTARS) \
	$(DDFSTARS) $(CGDDFSTARS) $(THORSTARS) $(DESTARS)
ALLTARGETS =	$(SDFTARGETS) $(CGTARGETS) $(CGCTARGETS) \
	$(CG56TARGETS) $(CG96TARGETS)

# Sources
SRCS= interpmain.cc Interpreter.cc
HDRS= Interpreter.h
OBJS= $(SRCS:.cc=.o)

# Extra stuff to remove
REALCLEAN_STUFF= interpreter interp.debug

all:	makefile interpreter

interpreter:	$(OBJS) $(LIBFILES) $(ALLSTARS) $(ALLTARGETS)
		rm -f interpreter
		$(LINKER) $(LINKFLAGS) $(OBJS) $(ALLSTARS) $(ALLTARGETS) \
			$(LIBS) -o interpreter

# debug-version of interpreter
interp.debug:	$(OBJS) $(LIBFILES) $(ALLSTARS) $(ALLTARGETS)
		rm -f interp.debug
		$(LINKER) $(LINKFLAGS_D) $(OBJS) $(ALLSTARS) $(ALLTARGETS) \
			$(LIBS) -o interp.debug

install:	$(BINDIR)/interpreter

$(BINDIR)/interpreter:	interpreter
		rm -f $(BINDIR)/interpreter
		ln interpreter $(BINDIR)

LIB=dummy	# must be defined even though no library
include $(ROOT)/common.mk

# Don't add anything after the next line; makedepend will zap it.
# DO NOT DELETE THIS LINE -- make depend depends on it.

