head	1.24;
access;
symbols
	Jan97:1.21
	boston:1.9;
locks; strict;
comment	@# @;


1.24
date	97.09.11.19.54.57;	author keller;	state Exp;
branches;
next	1.23;

1.23
date	97.09.03.16.34.19;	author keller;	state Exp;
branches;
next	1.22;

1.22
date	97.09.03.12.30.36;	author weissms;	state Exp;
branches;
next	1.21;

1.21
date	97.05.14.18.16.51;	author keller;	state Exp;
branches;
next	1.20;

1.20
date	97.01.08.15.22.53;	author keller;	state Exp;
branches;
next	1.19;

1.19
date	96.07.26.17.42.56;	author keller;	state Exp;
branches;
next	1.18;

1.18
date	96.05.15.12.03.26;	author keller;	state Exp;
branches;
next	1.17;

1.17
date	96.05.02.19.40.12;	author schwencf;	state Exp;
branches;
next	1.16;

1.16
date	96.02.11.19.56.25;	author schwencf;	state Exp;
branches;
next	1.15;

1.15
date	96.01.24.17.24.58;	author schwencf;	state Exp;
branches;
next	1.14;

1.14
date	96.01.23.16.43.38;	author schwencf;	state Exp;
branches;
next	1.13;

1.13
date	96.01.23.16.38.58;	author schwencf;	state Exp;
branches;
next	1.12;

1.12
date	95.11.28.13.11.00;	author keller;	state Exp;
branches;
next	1.11;

1.11
date	95.06.09.14.11.15;	author keller;	state Exp;
branches;
next	1.10;

1.10
date	95.06.08.15.33.36;	author keller;	state Exp;
branches;
next	1.9;

1.9
date	95.03.21.15.46.15;	author keller;	state Exp;
branches;
next	1.8;

1.8
date	94.09.08.21.23.13;	author keller;	state Exp;
branches;
next	1.7;

1.7
date	94.09.07.22.29.37;	author keller;	state Exp;
branches;
next	1.6;

1.6
date	94.08.31.19.36.26;	author keller;	state Exp;
branches;
next	1.5;

1.5
date	94.08.25.16.38.29;	author keller;	state Exp;
branches;
next	1.4;

1.4
date	94.08.23.14.24.46;	author keller;	state Exp;
branches;
next	1.3;

1.3
date	94.08.02.15.21.09;	author keller;	state Exp;
branches;
next	1.2;

1.2
date	94.07.26.17.36.37;	author keller;	state Exp;
branches;
next	1.1;

1.1
date	94.07.06.20.05.29;	author keller;	state Exp;
branches;
next	;


desc
@@


1.24
log
@Added target HPUX for HP workstations.
@
text
@######################################################################
# 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.
@


1.23
log
@The modules most often changed (Code.o, Tree.o, Eval.o) are moved to
the beginning. In this way they are compiled first and the user need
not wait for other modules to compile first, before potential errors
are reported.
@
text
@d5 1
a5 1
# Last Change:	Wed Sep  3 18:30:23 1997
d341 3
@


1.22
log
@LoopStack.[ch] replaces the old Label.[ch].
Makefile changed according to this.
@
text
@d5 1
a5 1
# Last Change:	Mon Jan 20 16:08:26 1997
d361 1
a361 1
OBJS    = LoopStack.o Code.o \
d365 1
a365 1
          Errors.o Eval.o \
d368 1
d375 1
a375 1
          Tree.o Types.o \
@


1.21
log
@Changeover from SunOS to Solaris for the default system
@
text
@d361 1
a361 1
OBJS    = Code.o \
a367 1
          Label.o \
d601 3
a603 2
                   Types.h AssocTab.h GenIdents.h Errors.h With.h Label.h \
                   Pointer.h Parameter.h BigSet.h #yyCode.w
a613 1
Label.o:           Label.c Label.h parallaxis.h
@


1.20
log
@Option -taso for Alpha stations added. Otherwise the reuse library
caused problems due to dirty pointer to integer and integer to
pointer casts.
@
text
@d5 1
a5 1
# Last Change:	Mon Aug 26 16:08:18 1996
d214 3
a216 2
# Set RANLIB to the ranlib program. Newer systems don't need ranlib
# anymore. In this case set RANLIB to `:' and add `s' to ARFLAGS.
d222 2
a223 2
ARFLAGS = cr
RANLIB  = ranlib
d322 1
a322 1
	./compile $(CREATE) 
d325 1
a325 1
	./compile $(CREATE) ARFLAGS=crs RANLIB=:
d328 1
a328 1
	./compile $(CREATE) ARFLAGS=crs RANLIB=:
d331 1
a331 1
	./compile $(CREATE) ARFLAGS=crs RANLIB=:
d334 1
a334 1
	./compile $(CREATE) ARFLAGS=crs RANLIB=:
d337 1
a337 1
	./compile $(CREATE)
d340 1
a340 1
	./compile $(CREATE) ARFLAGS=crs RANLIB=: LINKOPTIONS=-taso
@


1.19
log
@Minor changes in the naming of some intermediate files.
@
text
@d5 1
a5 1
# Last Change:	Thu May 23 14:17:08 1996
d339 1
a339 1
	./compile $(CREATE) ARFLAGS=crs RANLIB=:
@


1.18
log
@Targets ALPHA and COCKTAIL added.
@
text
@d5 1
a5 1
# Last Change:	Thu May  2 15:52:28 1996
d543 1
a543 1
	awk -f rules.awk rulenumber=1 code_$(VERS).puma >new.puma
d545 1
a545 1
	puma -cdi new.puma
d549 3
a551 1
	awk -f endrules.awk Code.new >Code.c
@


1.17
log
@The parallaxis-compiler now can create code suitable for the C-Code-analysator
@
text
@d5 1
a5 1
# Last Change:	Mon Nov 27 11:49:48 1995
d337 6
@


1.16
log
@common.w and symbols.w are no longer used, the Makefile is adapted.
@
text
@d537 3
a539 1
	puma -cdi code_$(VERS).puma
d543 1
a543 1
	$(MV) Code.new Code.c
d627 1
a627 1
                   Options.h Values.h BigSet.h Tree.h UniqueIds.h browser.w\
d630 1
a630 1
		   Errors.h Values.h BigSet.h UniqueIds.h  parallaxis.w browser.w #yyTree.w
@


1.15
log
@Error-messages in english  and german are now possble, if the option
-d ( for german ) and (-e for english ) is passed to p3c
This must be done for p3 too
@
text
@d625 1
a625 1
                   Options.h Values.h BigSet.h Tree.h UniqueIds.h common.w symbols.w browser.w\
d628 1
a628 1
		   Errors.h Values.h BigSet.h UniqueIds.h common.w parallaxis.w browser.w #yyTree.w
@


1.14
log
@.
@
text
@d372 1
d412 1
a412 1
p3.o:   p3.c Makefile
d416 1
a416 1
	$(CC) -o $@@ p3.o $(P3_LDFLAGS)
d585 1
a585 1
                   Values.h UniqueIds.h Parser.h Scanner.h Errors.h \
d593 1
a593 1
Errors.o:          Errors.c Errors.h parallaxis.h BigSet.h Positions.h
d638 1
a638 2


@


1.13
log
@Makefile adapted for the abstract-syntax-tree-browser
@
text
@d371 1
@


1.12
log
@Support for Ultrix on DECstation added.
@
text
@d552 1
d555 9
d623 2
a624 1
                   Options.h Values.h BigSet.h Tree.h UniqueIds.h #yySymbols.w
d626 1
a626 1
		   Errors.h Values.h BigSet.h UniqueIds.h #yyTree.w
d635 1
a635 1

@


1.11
log
@Some minor improvements in Makefile-scheme (Makefile, compile,
export).
@
text
@d5 1
a5 1
# Last Change:	Fri Jun  9 16:09:03 1995
d334 3
@


1.10
log
@The Makefile-scheme has changed again. Now there's again only one
Makefile, but now assisted by a small shell script "compile". The
different Makefiles (Makefile.{C,MPL,PVM}) are now obsolete.
@
text
@d5 1
a5 1
# Last Change:	Thu Jun  8 12:31:06 1995
d304 1
a304 1
	$(MAKE) VERS=C 'P3_VERS=$(P3_VERS)' p3c p3 libp3.a
d308 1
a308 1
	$(MAKE) VERS=MPL 'P3_VERS=$(P3_VERS)' p3c_MPL p3 libp3_MPL.a
d312 1
a312 1
	$(MAKE) VERS=PVM 'P3_VERS=$(P3_VERS)' p3c_PVM p3 libp3_PVM.a p3start
d392 24
a525 22

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

# Rules for the user interface:

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) $(LINKOPTIONS)


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

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

@


1.9
log
@Added a line for AIX on RS/6000.
@
text
@d5 1
a5 1
# Last Change:	Tue Mar 21 14:47:49 1995
d9 283
a291 41
# This is the main Makefile of the compiler system Parallaxis-III. It
# just contains appropriate targets for different machine platforms.
# The real work is done by calling seperate Makefiles depending on the
# target to build.
#
# Configuration and installation:
# -------------------------------
# The settings for the local environment are done in the seperate 
# Makefiles, because every version may need different settings. First
# look in the table below which target you have to build and which
# Makefile is used to do this. Then read the appropriate Makefile and
# modify it according to the given instructions to represent your
# local machine environment. Then make the chosen target.
#
# Example: You want to build Parallaxis for a Linux machine. You check
#          the table and get "Makefile.C". Now you edit Makefile.C and
#          do the needed changes. Then you type "make LINUX" and
#          (hopefully) everything goes automatically from then.
#
#
#    	Target	| Machine/Comment 	     	| Makefile to edit
#      ---------+-------------------------------+--------------------
#    	SUNOS	| Sun (up to SunOS 4.1.3)	| Makefile.C
#    	SOLARIS	| Sun Sparc Solaris (SunOS 5.x)	| Makefile.C
#	SGI	| Silicon Graphics (IRIX)	| Makefile.C
#	LINUX	| Linux (PC)			| Makefile.C
#	PVM	| Intel Paragon			| Makefile.PVM
#	MPL	| MasPar			| Makefile.MPL
#
#
# Makefile.C builds a Parallaxis-III compiler that generates C-code
# that simulates the SIMD behaviour of Parallaxis on a single SISD
# machine, e.g. a workstation. 
#
# Makefile.PVM builds a	special version using a MIMD machine (e.g.
# Intel Paragon) or several SISD machines to simulate Parallaxis. It
# uses PVM for PE-connection. 
#
# Makefile.MPL builds a special MasPar version generating MPL-Code in
# combination with the C-code (MPL = Maspar Programming Language).
# This version runs on a real SIMD machine.
d293 50
a342 1
######################################################################
d345 110
d456 2
a457 1
default: SUNOS
d459 4
a462 1
C c: SUNOS			# due to historical reasons
a463 2
SUNOS sunos:	
	$(MAKE) -f Makefile.C
d465 2
a466 2
SOLARIS solaris:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=:
d468 2
a469 2
SGI sgi:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=:
d471 2
a472 2
LINUX linux:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=:
d474 1
a474 2
AIX aix:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=:
d476 1
a476 2
MPL mpl:
	$(MAKE) -f Makefile.MPL
d478 3
a480 2
PVM pvm:
	$(MAKE) -f Makefile.PVM
d482 144
d631 2
a632 1
	$(MAKE) -f Makefile.C clean
d635 3
a637 3
distclean: Clean
Clean:  
	$(MAKE) -f Makefile.C Clean
d642 2
a643 28
realclean: CLEAN
CLEAN: 
	$(MAKE) -f Makefile.C CLEAN



######################################################################
# Now a special target that compiles three versions of the Parallaxis
# compiler: 
#
#   C-Version:    p3c_C
#   MPL-Version:  p3c_MPL
#   PVM-Version:  p3c_PVM
#
# One of these versions is also aliased to p3c (see DEFAULTTARGET).
# Then a library containing all three system files is generated. And
# as a last step, a special Version of p3 is generated that knows
# everything about the 3 versions. The user interface p3 is able to
# select between different compilers if you set VERS=ALL.
#
# REMARK:
# This special COMBINED target is not supported in any way. It is
# meant for SUNOS but it even may not work there (not tested yet). On
# platforms without ranlib you need to add `s' to ARFLAGS. 
#
# Use this as an example of how a combined version can be done and how
# p3 supports this.
######################################################################
d645 4
d650 1
a650 27
AR = ar				# Library archiver
ARFLAGS = cr			# Options for $(AR); without ranlib add `s'
RANLIB = ranlib			# Tool that updates __.SYMDEF
RM = rm -f			# Delete-file-command
MV = mv -f			# Move-file-command
LN = ln -s			# Symbolic link command (or copy)
DEFAULTTARGET = C		# Which p3-compiler is default


COMBINED combined:
	$(MAKE) -f Makefile.MPL p3c
	$(MV) p3c p3c_MPL
	$(MAKE) CLEAN
	$(MAKE) -f Makefile.PVM p3c
	$(MV) p3c p3c_PVM
	$(MAKE) CLEAN
	$(MAKE) -f Makefile.C p3c
	$(MV) p3c p3c_C
	$(MAKE) CLEAN
	$(LN) p3c_$(DEFAULTVERSION) p3c
	$(MAKE) -f Makefile.C SYSTEM_C.o
	$(MAKE) -f Makefile.MPL SYSTEM_MPL.o
	$(MAKE) -f Makefile.PVM SYSTEM_PVM.o
	$(AR) $(ARFLAGS) $(SYSLIB) SYSTEM_C.o SYSTEM_PVM.o SYSTEM_MPL.o
	-$(RANLIB) $(SYSLIB)
	$(MAKE) -f Makefile.MPL VERS=ALL p3.1 p3
	$(RM) *.o
d652 1
a652 1
# This is the end of Makefile
@


1.8
log
@Another version of the Makefiles. The part of the three makefiles
containing the targets and dependencies was identical in all versions
so it is moved to an extra file "Common" to avoid inconsistencies when
changing one file and not the other.
Also introduced .SUFFIXES: to avoid execution of unwanted suffix rules
(e.g. GNU-make wanted to g++-compile Makefile.C). Improved ranlib
stuff.
@
text
@d5 1
a5 1
# Last Change:	Thu Sep  8 22:37:28 1994
d69 3
@


1.7
log
@This is a new Makefile. The old method of using one Makefile for all
three versions of Parallaxis is changed to using three Makefiles:
Makefile.C, Makefile.MPL and Makefile.PVM. This Makefile now only
defines the machine dependent targets and calls the other makefiles
with the appropriate options.
@
text
@d5 1
a5 1
# Last Change:	Wed Sep  7 22:05:30 1994
d53 1
a58 1

d63 1
a63 1
	$(MAKE) -f Makefile.C ARFLAGS=crs
d66 1
a66 1
	$(MAKE) -f Makefile.C ARFLAGS=crs
d69 1
a69 1
	$(MAKE) -f Makefile.C ARFLAGS=crs
d78 18
d123 1
a123 2
ARFLAGS = cr			# Options for $(AR); without ranlib
				# add `s'
d134 1
a134 1
	$(MAKE) -f Makefile.MPL CLEAN
d137 1
a137 1
	$(MAKE) -f Makefile.MPL CLEAN
d140 1
a140 1
	$(MAKE) -f Makefile.C CLEAN
@


1.6
log
@The LINKOPTIONS were never included in the compiler call. This was
definitely wrong and is now corrected.
@
text
@d4 2
a5 2
# Author:	Eduard Kappel, Harald Lampke, Hartmut Keller
# Last Change:	Thu Aug 25 17:22:30 1994
d9 42
a50 53
# This is the Makefile for compiling the programming language
# Parallaxis-III. Remember you need to have installed the compiler
# toolkit Cocktail including the reuse-library to be successful.
#
# The Makefile is subdivided in two parts. Part 1 usually has to be
# modified to fit your local machine environment. Part 2 consists of
# the dependencies and rules for compiling Parallaxis-III and should
# remain unchanged. When running make there are usually built two
# seperate programs: the Parallaxis compiler itself (usually named
# p3c) and the user interface (UI, usually named p3). Depending on 
# the architecture of your machines you can choose between some pre-
# defined targets:
#
# Type	make			for creating the default version of
#				Parallaxis-III (one of make C, make MPL
#                               and make PVM, depending on the macro
#                               DEFAULTTARGET)
# Type	make C			for the C-version of Parallaxis-III
# Type	make MPL		for the MPL-version of Parallaxis-III
# Type	make PVM		for the PVM-version of Parallaxis-III
# Type  make all		for creating all three versions of the
#				compiler and a special version of the
#				user interface in one step.
#
# Type	make clean		for deleting all intermediate files
#				(e.g. after successful installation)
#                               leaves the files created by cocktail
# Type	make Clean		to delete the files created by cocktail,
#				too.
# Type	make CLEAN		for deleting all created files
# 				(including the compiler, the user
#				interface and the man-page itself)
#
# make C, make MPL and make PVM generate a single compiler p3c and a
# user interface p3 which are both only capable of compiling code for
# the given architecture. make all generates three compilers p3c_C,
# p3c_MPL and p3c_PVM and a special version of the user interface p3,
# which is capable of calling the appropriate compiler depending on
# given options. There's also a program p3c then, which is just a link
# to the appropriate default compiler (one of p3c_C, p3c_MPL or p3c_PVM
# respectively).
#
# To do:
# ------
# - compile the SYSTEM*.c-files and create appropriate libraries; give
#   name of this library as -DSTANDARDLIB to the UI p3
# - 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)
# (done) - remove the EXTRA_*-Stuff, it's not needed
d54 1
a54 1
#======================================================================
d56 1
a56 3
# 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. 
a57 3
#----------------------------------------------------------------------
# Set DEFAULTTARGET to the version you want to build by just typing 
# make. Possible values are C, MPL, and PVM.
d59 2
a60 1
DEFAULTTARGET = C
d62 2
d65 2
d68 2
a69 3
#----------------------------------------------------------------------
# Set STDINC to the directory where your standard includes reside in.
# If they are automatically included, leave STDINC empty.
d71 2
a72 1
STDINC = /usr/5include
d74 2
a77 3
#----------------------------------------------------------------------
# Set REUSEINC to the directory where your reuse-library includes are.
# Set REUSELIB to the directory where your reuse-library itself is.
a78 2
REUSEINC = /usr/local/bv/include/reuse
REUSELIB = /usr/local/bv/lib
d80 3
a82 49


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

CC      = gcc



#----------------------------------------------------------------------
# Set RM to the command to remove/delete a file.
# Set MV to the command to move/rename a file.
# Set LN to the command to set a symbolic link. On systems without this 
# feature you probably may want set it to a copy command.

RM      = rm -f
MV      = mv -f
LN      = ln -s



#----------------------------------------------------------------------
# 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, -static for static linking, ...

OPTIONS = -ansi -g -DDEVELOP -Wall
LINKOPTIONS = 



#----------------------------------------------------------------------
# Set OBJ to the file name extension your C-compiler uses for it's
# object files (usually .o). 
# Set EXE to the file name extension your system uses for executable
# programs. (usually empty on Un*x systems, .exe on MS-DOS platforms)

OBJ     = .o
EXE     =




#----------------------------------------------------------------------
# Now here are three macros which describe the default values when running
# the Parallaxis user interface p3 when no environment variables or 
# command line options are given.
d84 14
a97 14
# Set P3CC to the name of the C-compiler the user interface should use
# automatically. Add the path and any flags or options if required.
# Set P3INC to the path where you want the SYSTEM_*.h-files located.
# Set P3LIB to the path where you want the Parallaxis libraries located.

P3CC    = gcc
P3INC   = /usr/local/bv/include
P3LIB   = /usr/local/bv/lib



#----------------------------------------------------------------------
# The following Macro has a similar function than P3CC. But this is only
# relevant if you have a MasPar computer running MPL.
d99 3
a101 243
# Set P3MPLCC to the MPL-compiler in the same way as you have set P3CC.
# If you don't use MPL at all, set it to:  P3MPLCC = $(P3CC) 

P3MPLCC = ampl



# 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 of the Makefile. Do not change!


# Construct CFLAGS and LDFLAGS from the specifications above.

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

# And the same thing for the user interface.

P3CFLAGS= $(OPTIONS) -D$(VERS)_VERSION -DP3MPLCC=\"$(P3MPLCC)\" \
          -DP3CC=\"$(P3CC)\" -DP3INC=\"$(P3INC)\" -DP3LIB=\"$(P3LIB)\" \
          -DP3C=\"p3c$(EXE)\" -DP3C_C=\"p3c_C$(EXE)\" \
          -DP3C_MPL=\"p3c_MPL$(EXE)\" -DP3C_PVM=\"p3c_PVM$(EXE)\" \
          -I$(STDINC)
P3LDFLAGS= $(LINKOPTIONS)

# 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 

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

OBJS    = p3c$(OBJ) \
          AssocTab$(OBJ) \
          BigSet$(OBJ) \
          Code$(OBJ) \
          Errors$(OBJ) Eval$(OBJ) \
          FileIO$(OBJ) \
          GenIdents$(OBJ) GeneralIO$(OBJ) GetDefMods$(OBJ) \
          Label$(OBJ) \
          Options$(OBJ) \
          Parameter$(OBJ) Parser$(OBJ) \
          Pointer$(OBJ) \
          Positions$(OBJ) \
          Scanner$(OBJ) Source$(OBJ) Statist$(OBJ) Symbols$(OBJ) \
          StdProcs$(OBJ) \
          Tree$(OBJ) Types$(OBJ) \
          UniqueIds$(OBJ) \
          Values$(OBJ) \
          With$(OBJ)


#----------------------------------------------------------------------
# Now the main target: convert and compile the whole compiler system

# Default values for  make p3c  and  make p3
        VERS = $(DEFAULTTARGET)
#        EXTRA = Extra_$(DEFAULTTARGET)

# This is a dummy target. It is built if you only type make.
default: $(DEFAULTTARGET)

C:  
#	$(MAKE) VERS=C EXTRA=Extra_C p3c$(EXE) p3$(exe) p3.1
	$(MAKE) VERS=C p3c$(EXE) p3$(exe) p3.1

MPL: 
#	$(MAKE) VERS=MPL EXTRA=Extra_MPL p3c$(EXE) p3$(EXE) p3.1
	$(MAKE) VERS=MPL p3c$(EXE) p3$(EXE) p3.1

PVM: 
#	$(MAKE) VERS=PVM EXTRA=Extra_PVM p3c$(EXE) p3$(EXE) p3.1
	$(MAKE) VERS=PVM p3c$(EXE) p3$(EXE) p3.1


all:
	$(MAKE) CLEAN				# clear executables
	$(MAKE) VERS=ALL p3$(EXE)	        # make driver program for default
	$(MAKE) C				# make C-version, driver stays
	$(MV)   p3c$(EXE) p3c_C$(EXE)
	$(MAKE) clean
	$(MAKE) MPL				# make MPL-version, driver stays
	$(MV)   p3c$(EXE) p3c_MPL$(EXE)
	$(MAKE) clean
	$(MAKE) PVM				# make PVM-version, driver stays
	$(MV)   p3c$(EXE) p3c_PVM$(EXE)
	$(MAKE) clean				# clean up
	$(MAKE) p3.1				# make man-page
	$(LN)   p3c_$(DEFAULTTARGET)$(EXE) p3$(EXE)  # set default compiler

# Rule for man-page:

p3.1: p3.man					#insert correct names and paths
	sed -e "s|+++P3LIB+++|$(P3LIB)|g" \
	    -e "s|+++P3INC+++|$(P3INC)|g" \
	    -e "s|+++P3CC+++|$(P3CC)|g" \
	    -e "s|+++P3MPLCC+++|$(P3MPLCC)|g" \
	    p3.man >$@@

# Rule for the driver target:

p3$(EXE): p3.c
	$(CC) $(P3CFLAGS) -DP3NAME=\"$@@\" -o $@@ p3.c $(P3LDFLAGS)


# Rules which use the compiler toolkit Cocktail:

Code.c Code.h: code_$(VERS).puma Tree.TS
	puma -cdi code_$(VERS).puma

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

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

Parser.c Parser.h: parallaxis.ell Parser.sed
	ell -cidg 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

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

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


# Compiler target, link process.

#p3c$(EXE): $(OBJS) $(EXTRA)$(OBJ)
#	$(CC) $(CFLAGS) -o $@@ $(OBJS) $(EXTRA)$(OBJ) $(LDFLAGS)
p3c$(EXE): $(OBJS)
	$(CC) $(CFLAGS) -o $@@ $(OBJS) $(LDFLAGS)


# Default rule for compiling C sources

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


#----------------------------------------------------------------------
# Dependencies

p3c$(OBJ)        : p3c.c parallaxis.h Eval.h Tree.h Symbols.h Positions.h \
                   Values.h UniqueIds.h Parser.h Scanner.h Errors.h \
                   GetDefMods.h Options.h Source.h Statist.h Code.h BigSet.h
AssocTab$(OBJ)   : AssocTab.c AssocTab.h parallaxis.h
BigSet$(OBJ)     : BigSet.c BigSet.h parallaxis.h
Code$(OBJ)       : 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 Label.h \
                   Pointer.h Parameter.h BigSet.h #$(EXTRA).h #yyCode.w
Errors$(OBJ)     : Errors.c Errors.h parallaxis.h BigSet.h Positions.h
Eval$(OBJ)       : 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$(OBJ)     : FileIO.c FileIO.h parallaxis.h
GenIdents$(OBJ)  : GenIdents.c parallaxis.h GenIdents.h
GeneralIO$(OBJ)  : GeneralIO.c FileIO.h parallaxis.h GeneralIO.h
GetDefMods$(OBJ) : 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
Label$(OBJ)      : Label.c Label.h parallaxis.h
Options$(OBJ)    : Options.c BigSet.h parallaxis.h FileIO.h GeneralIO.h Options.h
Parameter$(OBJ)  : Parameter.c parallaxis.h GenIdents.h Symbols.h Errors.h \
                   Positions.h Options.h Values.h BigSet.h Parameter.h
Parser$(OBJ)     : 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$(OBJ)    : Pointer.c parallaxis.h GenIdents.h Symbols.h Values.h \
                   Errors.h Positions.h Options.h Values.h BigSet.h Pointer.h
Positions$(OBJ)  : Positions.c FileIO.h parallaxis.h Positions.h
Scanner$(OBJ)    : 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$(OBJ)     : 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 -o Source$(OBJ) Source.c
Statist$(OBJ)    : Statist.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
                   Errors.h Values.h BigSet.h UniqueIds.h Statist.h
StdProcs$(OBJ)   : StdProcs.c StdProcs.h parallaxis.h BigSet.h Symbols.h \
                   Errors.h Positions.h Options.h Values.h 
Symbols$(OBJ)    : Symbols.c Symbols.h parallaxis.h Errors.h Positions.h \
                   Options.h Values.h BigSet.h Tree.h UniqueIds.h #yySymbols.w
Tree$(OBJ)       : Tree.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
		   Errors.h Values.h BigSet.h UniqueIds.h #yyTree.w
Types$(OBJ)      : 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$(OBJ)  : UniqueIds.c UniqueIds.h parallaxis.h BigSet.h Errors.h \
                   Positions.h FileIO.h
Values$(OBJ)     : Values.c Values.h parallaxis.h BigSet.h Tree.h Options.h \
                   Positions.h Symbols.h UniqueIds.h Types.h Errors.h
With$(OBJ)       : With.c With.h parallaxis.h Symbols.h Errors.h Positions.h \
                   Options.h Values.h BigSet.h


# Additional Targets different for C-, MPL- or PVM-version:

# C-version:
#Extra_C$(OBJ)    : Extra_C.c Extra_C.h

# MPL-version:
#Extra_MPL$(OBJ)  : Extra_MPL.c Extra_MPL.h

# PVM-version:
#Extra_PVM$(OBJ)  : Extra_PVM.c Extra_PVM.h



# Special purpose targets for cleaning up directories after compiling.

clean:
	$(RM) *$(OBJ)

Clean:  clean
	$(RM) $(CREATED)

CLEAN:  Clean
	$(RM) p3$(EXE) p3c$(EXE) p3c_C$(EXE) p3c_MPL$(EXE) p3c_PVM$(EXE) p3.1
d104 28
d133 1
a133 1
# This is the end of part 2 and the Makefile.
@


1.5
log
@The Extra-Stuff is commented out as it is not needed anymore.
Two new dependencies are inserted.
@
text
@d181 1
a181 1
LDFLAGS = -L$(REUSELIB) -lm -lreuse
d190 1
a190 1
P3LDFLAGS= 
@


1.4
log
@Now also creates a man-page p3.1 from p3.man by inserting paths and
names from the current Makefile-setting.
@
text
@d5 1
a5 1
# Last Change:	Tue Aug 16 16:39:39 1994
d61 1
a61 1
# - remove the EXTRA_*-Stuff, it's not needed
d234 1
a234 1
        EXTRA = Extra_$(DEFAULTTARGET)
d240 2
a241 1
	$(MAKE) VERS=C EXTRA=Extra_C p3c$(EXE) p3$(exe) p3.1
d244 2
a245 1
	$(MAKE) VERS=MPL EXTRA=Extra_MPL p3c$(EXE) p3$(EXE) p3.1
d248 2
a249 1
	$(MAKE) VERS=PVM EXTRA=Extra_PVM p3c$(EXE) p3$(EXE) p3.1
d310 4
a313 2
p3c$(EXE): $(OBJS) $(EXTRA)$(OBJ)
	$(CC) $(CFLAGS) -o $@@ $(OBJS) $(EXTRA)$(OBJ) $(LDFLAGS)
d327 1
a327 1
                   GetDefMods.h Options.h Statist.h Code.h BigSet.h
d333 1
a333 1
                   Pointer.h Parameter.h BigSet.h $(EXTRA).h #yyCode.w
d372 1
a372 1
                   Positions.h                    
d382 1
a382 1
Extra_C$(OBJ)    : Extra_C.c Extra_C.h
d385 1
a385 1
Extra_MPL$(OBJ)  : Extra_MPL.c Extra_MPL.h
d388 1
a388 1
Extra_PVM$(OBJ)  : Extra_PVM.c Extra_PVM.h
@


1.3
log
@Added a dummy target as first target or else make always does make C
instead of make $(DEFAULTTARGET).
@
text
@d5 1
a5 1
# Last Change:	26. July 1994
d35 3
d39 2
a40 2
# 				(including the compiler and the user
#				interface itself)
d55 2
a56 2
# - copy the libraries to the P3LIB-path
# - copy the SYSTEM*.h-files to the P3INC-path
d61 1
d240 1
a240 1
	$(MAKE) VERS=C EXTRA=Extra_C p3c$(EXE) p3$(exe)
d243 1
a243 1
	$(MAKE) VERS=MPL EXTRA=Extra_MPL p3c$(EXE) p3$(EXE)
d246 1
a246 1
	$(MAKE) VERS=PVM EXTRA=Extra_PVM p3c$(EXE) p3$(EXE)
d261 1
d264 1
d266 8
a273 1
# Rules for the driver target:
a328 1
#Collection$(OBJ) : Collection.c Collection.h parallaxis.h BigSet.h
d390 4
a393 1
	$(RM) $(CREATED) *$(OBJ)
d395 2
a396 2
CLEAN: clean
	$(RM) p3$(EXE) p3c$(EXE) p3c_C$(EXE) p3c_MPL$(EXE) p3c_PVM$(EXE)
@


1.2
log
@Introduced Parallaxis User Interface. This is called p3 in the future,
so the compiler p3.c is renamed to p3c.c and the new user interface
will be called p3.c. It will be added in the next commit.
The other files were changed according to the user interface.
@
text
@d232 2
@


1.1
log
@Makefile for compiling all versions of Parallaxis-III. Read the Makefile
itself for a description.
@
text
@d5 1
a5 1
# Last Change:	6. July 1994
d16 5
a20 1
# remain unchanged.
d23 3
a25 1
#				Parallaxis-III (C-version)
d29 3
a31 2
# Type  make all		for creating all three versions of 
#				Parallaxis-III in one step
d36 2
a37 1
# 				(including the compiler itself)
d39 19
d103 2
d108 1
d118 1
a118 1
OPTIONS = -ansi -g -DDEVELOP
d134 28
d179 8
d205 1
a205 1
OBJS    = p3$(OBJ) \
d224 1
d228 1
a228 1
# Default values for  make p3
d234 1
a234 1
	$(MAKE) VERS=C EXTRA=Extra_C p3$(EXE)
d237 1
a237 1
	$(MAKE) VERS=MPL EXTRA=Extra_MPL p3$(EXE)
d240 1
a240 1
	$(MAKE) VERS=PVM EXTRA=Extra_PVM p3$(EXE)
d244 4
a247 3
	$(MAKE) CLEAN
	$(MAKE) C
	$(MV)   p3$(EXE) p3_C$(EXE)
d249 2
a250 5
	$(MAKE) MPL
	$(MV)   p3$(EXE) p3_MPL$(EXE)
	$(MAKE) clean
	$(MAKE) PVM
	$(MV)   p3$(EXE) p3_PVM$(EXE)
d252 7
d260 2
d292 1
a292 1
p3$(EXE): $(OBJS) $(EXTRA)$(OBJ)
d305 1
a305 1
p3$(OBJ)         : p3.c parallaxis.h Eval.h Tree.h Symbols.h Positions.h \
d376 1
a376 1
	$(RM) $(CREATED) *$(OBJ) 
d379 1
a379 1
	$(RM) p3$(EXE) p3_C$(EXE) p3_MPL$(EXE) p3_PVM$(EXE)
@
