######################################################################
# Project:	Parallaxis-III
# Filename:	Makefile
# Author:	Hartmut Keller
# Last Change:	Thu Sep 11 21:53:37 1997
#
# Description:
# ------------
# This is the Makefile for compiling the programming language
# Parallaxis-III. Remember you need to have installed the
# reuse-library of the compiler toolkit Cocktail to be successful.
# Cocktail itself is not needed as long as the files listed in
# $(CREATED) exist. But Cocktail can be used to generate the compiler
# from scratch. To do this type "make realclean" before giving any
# other make command.
#
# The Makefile is subdivided in three parts. Part 1 usually has to be
# modified to fit your local machine environment. Part 2 contains
# targets for several machine types to make compilation on these known
# platforms as easy as possible. Part 3 consists of the dependencies
# and rules for compiling Parallaxis-III and should remain unchanged.
# There's also a small shell script named "compile" which is used when
# make'ing the machine targets.
#
# When running make there are built the following targets:
# 
#   - p3:          The Parallaxis user interface (UI)
#   - p3c:         The C-version of the Parallaxis compiler
#   - p3c_MPL:     The MPL-version of the Parallaxis compiler
#   - p3c_PVM:     The PVM-version of the Parallaxis compiler
#   - p3.1:        A man page containing the current settings of the
#                  Makefile (e.g. library paths)
#   - libp3.a:     The system library needed for p3c
#   - libp3_MPL.a: The system library needed for p3c_MPL
#   - libp3_PVM.a: The system library needed for p3c_PVM
#
# Compiling Parallaxis-III
# ------------------------
# Step 1: Edit Part 1 of this Makefile to represent your machine
#         environment. Don't forget to set CREATE appropriately.
#         In some unusual cases you also have to check file p3config.h
#         and modify some entries there. Usually you can achieve the
#         same effect by setting some -D switches here in the
#         Makefile. 
# Step 2: Chose your machine type target in the list below and give
#         the corresponding make command. If your machine is not in
#         the list below, you can try the target "GENERIC".
#
# Step 3: Copy the generated files to the target directories. 
#         Remark: this step will someday be made automatic.
#
# List of machine targets:
# ========================
# machine type  operating system		make command
# --------------------------------------------------------------------
# SUN		SunOS 4.1.x			make SUNOS
# SUN		Solaris 2.x (=SunOS 5.x)	make SOLARIS
# SGI		Irix				make SGI
# PC		Linux				make LINUX
# IBM		Aix				make AIX
#
# Troubleshooting
# ===============
# If the automatic compilation of Parallaxis-III fails, you can try
# the simple targets C, MPL, and PVM respectively, which compile a
# single version independent from CREATE. Don't forget to call "make
# versionclean" once before each of these targets to remove irritating
# files. 
#
# If this also fails, you can use the development targets which are
# the generated files themselves:
#
#   p3c		compiler C-version
#   p3c_MPL	compiler MPL-version
#   p3c_PVM	compiler PVM-version
#   p3		user interface (all versions)
#   libp3.a	library C-version
#   libp3_MPL.a	library MPL-version
#   libp3_PVM.a	library PVM-version
#   p3.1	man page (all versions)
#
# In addition there are some targets for cleaning the directory:
#
#   clean		for deleting all intermediate files
#			(e.g. after successful installation)
#   distclean   or
#   Clean		to delete the generated targets
# 			(compiler, UI, man page, library), too.
#   realclean   or
#   CLEAN		for deleting all created files
# 			(including the files that can be built
# 			by the toolkit cocktail)
#
#   versionclean	for removing all files that must not
#                       exist when compiling a new version after
#                       having already compiled another version
#
# If everything fails, give us a note with a detailed description of
# machine type, error messages and what you assume can be the error.
# Send it to
#	braunl@informatik.uni-stuttgart.de
#   or  keller@informatik.uni-stuttgart.de
#
#
# Things to do:
# -------------
# - make new target install (copy the libraries to the P3LIB-path,
#   copy the SYSTEM*.h-files to the P3INC-path)
# - compile the graphics etc. libraries and copy them to the P3LIB-path
# - give a summary of all -D switches you can set when compiling. At 
#   least those which have to deal with names defined here in the Makefile
#   (e.g. executable names, etc)
######################################################################


#======================================================================

############## PART 1 #################################################
# This is the beginning of part 1 of the Makefile. You may have to
# adapt some of the entries to reflect your own installation
# environment. There are definitions used for the compilation of the
# compiler p3c itself (parts 1a and 1b) and definitions that are
# compiled into the user interface p3 as default settings for
# runtime (part 1c). 

#----------------------------------------------------------------------
#--- 1a: Definitions for compile time that usually have to be changed

# Set CREATE to the versions you like to install. Possible versions
# are C, MPL, and PVM. Each version will result in an own compiler and
# the user interface p3 will be adapted appropriately. Separate
# different versions by single blanks. E.g. CREATE = C PVM

CREATE = C


#----------------------------------------------------------------------
# Set INC to the path where you want the Parallaxis includes and
# definition modules to be installed.
# Set LIB to the path where you want the Parallaxis libraries to be
# installed.
# Set BIN to the path where you want the Parallaxis executables to be
# installed.

INC = /usr/local/include
LIB = /usr/local/lib
BIN = /usr/local/bin


#----------------------------------------------------------------------
# Set REUSEINC to the directory where your reuse-library includes are.
# Set REUSELIB to the directory where your reuse-library itself is.

REUSEINC = $(INC)/reuse
REUSELIB = $(LIB)


#----------------------------------------------------------------------
# Set CC to the C-compiler you wish to use or remove the line to use
# the default compiler. This must be an ANSI compliant compiler.

CC      = gcc


#----------------------------------------------------------------------
# Set OPTIONS to the desired options, e.g. -g for debugging
# information, -O or -O2 for optimization, -Wall for warnings, ...
# Set LINKOPTIONS to the desired Options used during linking, e.g.
# some additional libraries, ...
# Set STATIC to the required option (e.g. -static) if you want static
# linking. This means the linker will not use shared libraries.

OPTIONS     = -ansi -O
LINKOPTIONS =
STATIC      = 


#----------------------------------------------------------------------
# Now some special stuff only needed for the PVM version (will not be
# used when PVM version is not built)
# Set PVMINC to the directory where your PVM includes are.
# Set PVMLIB to the directory where your PVM library itself is.

PVMINC = $(PVM_ROOT)/include
PVMLIB = $(PVM_ROOT)/lib/$(PVM_ARCH)
PVMADDITIONAL = -lpvm3


#----------------------------------------------------------------------
# This PVM-version currently includes X stuff:
# Set XINC to the path where your X include files reside.
# Set XLIB to the path where your X libraries are.

XINC = /usr/local/X11R5/include
XLIB = /usr/local/X11R5/lib


#----------------------------------------------------------------------
#--- 1b: Definitions for compile time that usually need not be
#changed, but nevertheless may be changed.

# Set STDINC to the directories where your standard includes reside
# in. Prepend each path with "-I" and separate different paths with
# blanks. Example: "STDINC = -I/usr/include -I/usr/local/include". If
# all standard includes are automatically included without giving an
# explicit path, leave STDINC empty.

STDINC = 


#----------------------------------------------------------------------
# Set AR to the library archiver command.
# Set ARFLAGS to the options needed to create the library.
# Set RANLIB to the ranlib program. Older systems used to have a ranlib
# program to build the library symbol table. In this case you have to
# remove `s' from the ARFLAGS.
# These entries are usually set automatically when using machine
# specific targets, but you can set them here when no target for your
# machine exists.

AR      = ar
ARFLAGS = crs
RANLIB  = :


#----------------------------------------------------------------------
# Set RM to the command to remove/delete a file.
# Set MV to the command to move/rename a file.

RM      = rm -f
MV      = mv -f


#----------------------------------------------------------------------
#--- 1c: Definitions for run time defaults of p3

# Default settings for C-version of the compiler (not used when
# C-version not built)
# Set P3CC to the name of the C-compiler to be used automatically.
# Set P3INC to the path where the headerfiles reside.
# Set P3LIB to the path where the Parallaxis libraries reside.
# Set STANDARDLIB to the libraries that every C-Parallaxis program
# should automatically be linked with.

P3CC        = gcc
P3INC       = $(INC)
P3LIB       = $(LIB)
STANDARDLIB = -lp3 -lm


# Default settings for MPL-version of the compiler (not used when
# MPL-version not built)
# Set P3CC_MPL to the name of the MPL-compiler to be used automatically.
# Set P3INC_MPL to the path where the headerfiles reside.
# Set P3LIB_MPL to the path where the Parallaxis libraries reside.
# Set STANDARDLIB_MPL to the libraries that every MPL-Parallaxis
# program should automatically be linked with.

P3CCMPL        = mpl_cc
P3INCMPL       = $(INC)
P3LIBMPL       = $(LIB)
STANDARDLIBMPL = -lp3_MPL -lm


# Default settings for PVM-version of the compiler (not used when
# PVM-version not built)
# Set P3CC_PVM to the name of the C-compiler to be used automatically.
# Set P3INC_PVM to the path where the headerfiles reside.
# Set P3LIB_PVM to the path where the Parallaxis libraries reside.
# Set STANDARDLIB_PVM to the libraries that every PVM-Parallaxis
# program should automatically be linked with.

P3CCPVM        = gcc
P3INCPVM       = $(INC),$$PVM_ROOT/include
P3LIBPVM       = $(LIB),$$PVM_ROOT/lib/$$PVM_ARCH
STANDARDLIBPVM = -lp3_PVM -lm $(PVMADDITIONAL)


# This is the end of part 1 of the Makefile. After this point you
# usually don't have to change anything for making Parallaxis-III
# compile.






#======================================================================


############## PART 2 #################################################
# This is part 2 of the Makefile. Do not change!
#

# Default version if not called correctly through a machine type
# target. This is only for development. It is recommended to use the
# machine specific targets below.

P3_VERS =  -DC_VERSION -DMPL_VERSION -DPVM_VERSION
VERS = C

default:: C

C c::    
	$(MAKE) VERS=C 'P3_VERS=$(P3_VERS)' p3c p3 libp3.a p3.1


MPL mpl:: 
	$(MAKE) VERS=MPL 'P3_VERS=$(P3_VERS)' p3c_MPL p3 libp3_MPL.a p3.1


PVM pvm:: 
	$(MAKE) VERS=PVM 'P3_VERS=$(P3_VERS)' p3c_PVM p3 libp3_PVM.a p3start p3.1


# The main targets for machine types. Please use these.

GENERIC generic::
	./compile $(CREATE)

SUNOS sunos::
	./compile $(CREATE) ARFLAGS=cr RANLIB=ranlib

SOLARIS solaris::
	./compile $(CREATE)

SGI sgi::
	./compile $(CREATE)

LINUX linux::
	./compile $(CREATE)

AIX aix::
	./compile $(CREATE)

ULTRIX ultrix::
	./compile $(CREATE) ARFLAGS=cr RANLIB=ranlib

ALPHA alpha::
	./compile $(CREATE) LINKOPTIONS=-taso

HPUX hpux::
	./compile $(CREATE)

COCKTAIL cocktail: $$(CREATED)
	@echo "Cocktail part of compiling process finished"

#======================================================================


# Part 3 of the Makefile. Rules and dependencies. Do not change!


# Don't apply any unwanted implicit suffix rules; clear the suffix list 
# and define a new one only containing those suffixes we really have.

.SUFFIXES:
.SUFFIXES: .c .h .o 


# These are the object files, the compiler consists of.


OBJS    = Code.o Eval.o Tree.o \
	  p3c.o \
          AssocTab.o \
          BigSet.o \
          Errors.o \
          FileIO.o \
          GenIdents.o GeneralIO.o GetDefMods.o \
          LoopStack.o \
          Options.o \
          Parameter.o Parser.o \
          Pointer.o \
          Positions.o \
          Scanner.o Source.o Statist.o Symbols.o \
          StdProcs.o \
          Types.o \
          UniqueIds.o \
          Values.o \
          querysym.o \
          language.o \
          With.o

# These files are created by the compiler toolkit Cocktail:
#   parallaxis.rex 	-->	Scanner.c, Scanner.h
#   parallaxis.ell	-->	Parser.c, Parser.h
#   parallaxis.cg	-->	Eval.c, Eval.h, Tree.c, Tree.h, Tree.TS
#   symbols.cg		-->	Symbols.c, Symbols.h
#   code_C.puma		-->	Code.c, Code.h   	(C-version)
#   code_MPL.puma	-->	Code.c, Code.h   	(MPL-version)
#   code_PVM.puma	-->	Code.c, Code.h   	(PVM-version)

CREATED = Code.c Code.h \
          Eval.c Eval.h \
          Parser.c Parser.h \
          Scanner.c Scanner.h \
          Symbols.c Symbols.h \
          Tree.TS Tree.c Tree.h \
          yyCode.w yySymbols.w yyTree.w 




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

# Construct P3_CFLAGS and P3_LDFLAGS from the specifications above.

P3_CFLAGS = $(OPTIONS) $(P3_VERS) \
            -DP3CC='"$(P3CC)"' -DP3INC='"$(P3INC)"' \
            -DP3LIB='"$(P3LIB)"' -DSTANDARDLIB='"$(STANDARDLIB)"' \
            -DP3CC_MPL='"$(P3CCMPL)"' -DP3INC_MPL='"$(P3INCMPL)"' \
            -DP3LIB_MPL='"$(P3LIBMPL)"' -DSTANDARDLIB_MPL='"$(STANDARDLIBMPL)"' \
            -DP3CC_PVM='"$(P3CCPVM)"' -DP3INC_PVM='"$(P3INCPVM)"' \
            -DP3LIB_PVM='"$(P3LIBPVM)"' -DSTANDARDLIB_PVM='"$(STANDARDLIBPVM)"' \
            $(STDINC)
P3_LDFLAGS= $(OPTIONS) $(STATIC) $(LINKOPTIONS)


# Rules for the user interface:

p3.o:   p3.c language.h Makefile 
	$(CC) $(P3_CFLAGS) -c p3.c

p3:     p3.o
	$(CC) -o $@ p3.o language.o $(P3_LDFLAGS)


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

# Construct CFLAGS and LDFLAGS from the specifications above.

CFLAGS    = $(OPTIONS) -D$(VERS)_VERSION -I$(REUSEINC) $(STDINC)
LDFLAGS   = $(LINKOPTIONS) $(STATIC) -L$(REUSELIB) -lm -lreuse


# And another one for the Parallaxis system library.

LIB_CFLAGS= $(OPTIONS) -I$(PVMINC) $(STDINC)


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

# Generate the C-version:

# Parallaxis->C compiler:
p3c:    $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)

# Parallaxis library for C-version:
SYSTEM_C.o: SYSTEM_C.c SYSTEM_C.h
	$(CC) $(LIB_CFLAGS) -c SYSTEM_C.c

libp3.a: SYSTEM_C.o
	$(AR) $(ARFLAGS) $@ SYSTEM_C.o
	-$(RANLIB) $@

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

# Generate the MPL-version:

# Parallaxis -> MPL compiler:
p3c_MPL: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)

# Parallaxis library for MPL-version:
SYSTEM_MPL.o: SYSTEM_MPL.m SYSTEM_MPL.h
	$(P3CCMPL) $(LIB_CFLAGS) -c SYSTEM_MPL.m

libp3_MPL.a: SYSTEM_MPL.o
	$(AR) $(ARFLAGS) $@ SYSTEM_MPL.o
	-$(RANLIB) $@

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

# Generate the PVM-version:

# Parallaxis->PVM compiler:
p3c_PVM: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)


# Parallaxis library for PVM-version:
SYSLIBOBJS_PVM = SYSTEM_PVM.o Graphics_PVM.o Storage_PVM.o ImageIO_PVM.o

SYSTEM_PVM.o: SYSTEM_PVM.c SYSTEM_PVM.h
	$(CC) $(LIB_CFLAGS) -c SYSTEM_PVM.c

ImageIO_PVM.o: ImageIO_PVM.c SYSTEM_PVM.h shared_macros.h
	$(CC) $(LIB_CFLAGS) -c ImageIO_PVM.c

Storage_PVM.o: Storage_PVM.c SYSTEM_PVM.h shared_macros.h
	$(CC) $(LIB_CFLAGS) -c Storage_PVM.c

Graphics_PVM.o: Graphics_PVM.c Graphics.h SYSTEM_PVM.h shared_macros.h
	$(CC) $(LIB_CFLAGS) -c Graphics_PVM.c

libp3_PVM.a: $(SYSLIBOBJS_PVM)
	$(RM) $@
	$(AR) $(ARFLAGS) $@ $(SYSLIBOBJS_PVM)
	-$(RANLIB) $@


# PVM startup file:
STARTOBJS = start.o SYSTEM_C.o Graphics.o ImageIO.o

start.o: start.c SYSTEM_C.h Graphics.h shared_macros.h
	$(CC) $(CFLAGS) -I$(PVMINC) -c start.c

Graphics.o: Graphics.c Graphics.h ImageIO.h SYSTEM_C.h
	$(CC) $(CFLAGS) -I$(XINC) -c Graphics.c

ImageIO.o: ImageIO.c ImageIO.h SYSTEM_C.h

Storage.o: Storage.c SYSTEM_C.h

p3start: $(STARTOBJS)
	$(CC) -o $@ $(STARTOBJS) -L$(PVMLIB) \
              -L$(XLIB) $(LDFLAGS) $(PVMADDITIONAL) -lX11

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

# Rule for man-page:

p3.1:   p3.man Makefile		          #insert correct names and paths
	sed -e 's|+++P3LIB+++|$(P3LIB)|g' \
	    -e 's|+++P3INC+++|$(P3INC)|g' \
	    -e 's|+++P3CC+++|$(P3CC)|g' \
	    -e 's|+++P3LIBMPL+++|$(P3LIBMPL)|g' \
	    -e 's|+++P3INCMPL+++|$(P3INCMPL)|g' \
	    -e 's|+++P3CCMPL+++|$(P3CCMPL)|g' \
	    -e 's|+++P3LIBPVM+++|$(P3LIBPVM)|g' \
	    -e 's|+++P3INCPVM+++|$(P3INCPVM)|g' \
	    -e 's|+++P3CCPVM+++|$(P3CCPVM)|g' \
	    -e 's|+++SYSLIB+++|libp3.a|g' \
	    -e 's|+++SYSLIBMPL+++|libp3_MPL.a|g' \
	    -e 's|+++SYSLIBPVM+++|libp3_PVM.a|g' \
	    -e 's|+++LIB+++|$(LIB)|g' \
	    -e 's|+++INC+++|$(INC)|g' \
	    p3.man >$@

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

# Rules which use the compiler toolkit Cocktail:

Code.c Code.h: code_$(VERS).puma Tree.TS
	awk -f rules.awk rulenumber=1 code_$(VERS).puma >new_$(VERS).puma
	awk -f numbers.awk rulenumber=1 code_$(VERS).puma >numbers_$(VERS)
	puma -cdi new_$(VERS).puma
	# Now comment out a line that is created by puma but not needed. 
	# Else it causes trouble on some compilers
	sed -e 's|\(static FILE \* yyf = stdout;\)|/\*\1\*/|g' Code.c > Code.new
	$(MV) Code.new Code.c
	awk -f endrules.awk Code.c >Code.new
	$(MV) Code.new Code.c

Eval.c Eval.h: parallaxis.cg
	ag -cDI0 parallaxis.cg

Scanner.c Scanner.h: parallaxis.rex
	rex -cd parallaxis.rex

Parser.c Parser.h: parallaxis.ell Parser.sed
	ell -cid parallaxis.ell
	sed -f Parser.sed Parser.c > Parser.new
	$(MV) Parser.new Parser.c


Tree.c Tree.h: parallaxis.cg
	ast -cmdiywqkR parallaxis.cg
	sed -e  's|else if (yyyIsEqual ("quit"  )) { yyState = yyyQuit ; return; }|\
	else if (yyyIsEqual ("quit"  )) { yyState = yyyQuit ; return; }\
	else if (yyyIsEqual ("QuerySymbols"  )) {\
	int yySave= yyState;\
	start_QuerySymbols();\
	yyState = yySave;\
	}|' Tree.c >Tree.new
	$(MV) Tree.new Tree.c


Tree.TS: parallaxis.cg
	echo SELECT AbstractSyntax | cat - parallaxis.cg | cg -4

Symbols.c Symbols.h: symbols.cg
	ast -cmdiwq symbols.cg

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

# Default rule for compiling C sources

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

#----------------------------------------------------------------------
# Dependencies (rules for the different modules of the compiler)
# They all use the suffix rule .c.o to compile. 

p3c.o:             p3c.c parallaxis.h Eval.h Tree.h Symbols.h Positions.h \
                   Values.h UniqueIds.h Parser.h Scanner.h Errors.h language.h\
                   GetDefMods.h Options.h Source.h Statist.h Code.h BigSet.h
AssocTab.o:        AssocTab.c AssocTab.h parallaxis.h
BigSet.o:          BigSet.c BigSet.h parallaxis.h
Code.o:            Code.c Code.h Tree.h parallaxis.h Positions.h Symbols.h \
                   Values.h UniqueIds.h Options.h GeneralIO.h FileIO.h \
                   Types.h AssocTab.h GenIdents.h Errors.h With.h \
                   Pointer.h Parameter.h BigSet.h LoopStack.h #yyCode.w
LoopStack.o:       LoopStack.c LoopStack.h parallaxis.h
Errors.o:          Errors.c Errors.h parallaxis.h BigSet.h Positions.h language.h
Eval.o:            Eval.c Eval.h Tree.h parallaxis.h Options.h Positions.h \
                   Symbols.h Values.h BigSet.h UniqueIds.h GenIdents.h Types.h \
                   Errors.h Code.h
FileIO.o:          FileIO.c FileIO.h parallaxis.h
GenIdents.o:       GenIdents.c parallaxis.h GenIdents.h
GeneralIO.o:       GeneralIO.c FileIO.h parallaxis.h GeneralIO.h
GetDefMods.o:      GetDefMods.c AssocTab.h parallaxis.h GeneralIO.h Scanner.h \
                   Positions.h Errors.h Tree.h Options.h Symbols.h Values.h \
                   BigSet.h UniqueIds.h Parser.h GetDefMods.h
Options.o:         Options.c BigSet.h parallaxis.h FileIO.h GeneralIO.h Options.h
Parameter.o:       Parameter.c parallaxis.h GenIdents.h Symbols.h Errors.h \
                   Positions.h Options.h Values.h BigSet.h Parameter.h
Parser.o:          Parser.c Parser.h Scanner.h parallaxis.h Positions.h \
                   Errors.h Tree.h Options.h Symbols.h Values.h BigSet.h \
                   UniqueIds.h
Pointer.o:         Pointer.c parallaxis.h GenIdents.h Symbols.h Values.h \
                   Errors.h Positions.h Options.h Values.h BigSet.h Pointer.h
Positions.o:       Positions.c FileIO.h parallaxis.h Positions.h
Scanner.o:         Scanner.c Scanner.h parallaxis.h Positions.h Errors.h \
                   Tree.h Options.h Symbols.h Values.h BigSet.h UniqueIds.h \
                   Source.h
Source.o:          Source.c Source.h FileIO.h parallaxis.h Scanner.h \
                   Positions.h Errors.h Tree.h Options.h Symbols.h Values.h \
                   BigSet.h UniqueIds.h
#	$(CC) -c $(CFLAGS) -DDialog Source.c
Statist.o:         Statist.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
                   Errors.h Values.h BigSet.h UniqueIds.h Statist.h
StdProcs.o:        StdProcs.c StdProcs.h parallaxis.h BigSet.h Symbols.h \
                   Errors.h Positions.h Options.h Values.h 
Symbols.o:         Symbols.c Symbols.h parallaxis.h Errors.h Positions.h \
                   Options.h Values.h BigSet.h Tree.h UniqueIds.h  symbrowse.w browser.w\
                   symbrowse.w #yySymbols.w
Tree.o:            Tree.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
		   Errors.h Values.h BigSet.h UniqueIds.h parallaxis.w browser.w #yyTree.w
Types.o:           Types.c Types.h parallaxis.h BigSet.h Code.h Errors.h \
                   Options.h Positions.h Symbols.h Tree.h UniqueIds.h Values.h
UniqueIds.o:       UniqueIds.c UniqueIds.h parallaxis.h BigSet.h Errors.h \
                   Positions.h FileIO.h
Values.o:          Values.c Values.h parallaxis.h BigSet.h Tree.h Options.h \
                   Positions.h Symbols.h UniqueIds.h Types.h Errors.h
With.o:            With.c With.h parallaxis.h Symbols.h Errors.h Positions.h \
                   Options.h Values.h BigSet.h
querysym.o:        querysym.c
language.o:        language.c



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

# Special purpose targets for cleaning up directories after compiling.

# Remove object files
clean:
	$(RM) $(OBJS) p3.o p3start.o p3c.o \
	      SYSTEM_C.o SYSTEM_MPL.o SYSTEM_PVM.o

# Remove also the executables, the library and the man-page
distclean Clean:  clean
	$(RM) p3 p3c p3c_MPL p3c_PVM p3.1 p3start \
	      libp3.a libp3_MPL.a libp3_PVM.a

# Remove also the files generated by the compiler toolkit cocktail.
# This results in the minimal configuration to start the whole
# compilation process.
realclean CLEAN:  Clean
	$(RM) $(CREATED)

# Special target to clean files in a way that the next version can be
# compiled (e.g. make CLEAN; make C; make versionclean; make MPL).
versionclean: clean
	$(RM) Code.h Code.c

#======================================================================

# This is the end of Makefile.
