#   makefile:  The makefile for "omni_interp"  
#   Written by Toby Orloff and Jim Larson
#   orloff@poincare.geom.umn.edu
#   September 18, 1990

#  Copyright (c) 1990, Geometry Supercomputer Project
#                      University of Minnesota
#                      1200 Washington Ave. S
#                      Minneapolis, MN  55415
# 
#  email address: software@geom.umn.edu
#
# This software is copyrighted as noted above.  It may be freely copied,
# modified, and redistributed, provided that the copyright notice is
# preserved on all copies.
#
# There is no warranty or other guarantee of fitness for this software,
# it is provided solely "as is".  Bug reports or fixes may be sent
# to the authors, who may or may not act on them as they desire.
#
# You may not include this software in a program or other software product
# without supplying the source, or without informing the end-user that the
# source is available for no extra charge.
#
# If you modify this software, you should include a notice giving the
# name of the person performing the modification, the date of modification,
# and the reason for such modification.

### Make your modifications in this section:

# Names of executables
PROGRAM = omni_interp
CONSTRUCTOR = omni_interp_make

# Compiler of choice
CC = cc

# Target Directories for binaries, header files, object files,
# and documentation.
BINDIR = /usr/local/bin
INC_DIR = /usr/local/lib/omni_interp
OBJ_DIR = /usr/local/lib/omni_interp
MAN_DIR = /usr/local/man/manl

### Do not modify from here on down.

DFLAG = -DINC_DIR=\"$(INC_DIR)\" -DOBJ_DIR=\"$(OBJ_DIR)\"
XFLAG =
CFLAGS = -g $(DFLAG) $(XFLAG)
UFLAG = -DUSER_FUN
LIBS =

OBJS = global_begin.o global_init.o global_end.o mn.o init.o util.o\
	standard_interp.o usage.o

all: $(PROGRAM) $(CONSTRUCTOR)

$(PROGRAM): $(OBJS)
	$(CC) $(CFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)

mn.o: types.h globals.c
interp.o: types.h globals.h
init.o: types.h globals.h
util.o: types.h
standard_interp.o: omni_interp.h

$(CONSTRUCTOR): $(CONSTRUCTOR).c
	$(CC) $(CFLAGS) -o $(CONSTRUCTOR) $(CONSTRUCTOR).c

install: all
	cp $(PROGRAM) $(BINDIR)
	cp $(CONSTRUCTOR) $(BINDIR)
	rm $(OBJS)
	make $(OBJS) XFLAG=$(UFLAG)
	cp omni_interp.h $(INC_DIR)
	cp $(OBJS) $(OBJ_DIR)
	cp omni_interp.1 omni_interp_make.1 $(MAN_DIR)

clean:
	@ echo "Removing cruft..."
	rm -f core $(OBJS) $(PROGRAM) $(CONSTRUCTOR) *~
