head	1.6;
access;
symbols
	boston:1.5;
locks; strict;
comment	@# @;


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

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

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

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

1.2
date	94.09.09.14.33.05;	author wakundju;	state Exp;
branches;
next	1.1;

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


desc
@Common part of Makefile.C, Makefile.MPL and Makefile.PVM.
@


1.6
log
@Target p3c splitted in target p3c, p3c_PVM and p3c_MPL; therefore
moved from Common to Makefile.{C,PVM,MPL}.
Remark: the makefiles will be subject to modifications soon.
@
text
@######################################################################
# Project:	Parallaxis-III
# Filename:	Common
# Author:	Hartmut Keller
# Last Change:	Fri Apr 14 22:11:18 1995
#
# Description:
# ------------
# This is the common part of the three makefiles Makefile.C,
# Makefile.MPL and Makefile.PVM. It's purpose is to avoid inconsistent
# versions and to make modifications easier. It is imported via
# "include".
#
# This file contains the overall dependencies of the Parallaxis-III
# compiler and the global targets. The most of the macros are defined
# in the above makefiles. See one of them for more details.
######################################################################


# 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 

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

# Now the rules for building the compiler system.


# Default rule for compiling C sources

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

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

# Rule for man-page:

p3.1:   p3.man Makefile.$(VERS) 		#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+++|$(SYSLIB)|g" \
	    -e "s|+++SYSLIBMPL+++|$(SYSLIBMPL)|g" \
	    -e "s|+++SYSLIBPVM+++|$(SYSLIBPVM)|g" \
	    -e "s|+++LIB+++|$(LIB)|g" \
	    -e "s|+++INC+++|$(INC)|g" \
	    p3.man >$@@

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

# Rules for the user interface:

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

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


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

# Rules which use the compiler toolkit Cocktail:

Code.c Code.h: code_$(VERS).puma Tree.TS
	puma -cdi code_$(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

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

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

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

#----------------------------------------------------------------------
# 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 \
                   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 Label.h \
                   Pointer.h Parameter.h BigSet.h #yyCode.w
Errors.o:          Errors.c Errors.h parallaxis.h BigSet.h Positions.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
Label.o:           Label.c Label.h parallaxis.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 #yySymbols.w
Tree.o:            Tree.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
		   Errors.h Values.h BigSet.h UniqueIds.h #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




@


1.5
log
@rex and ell should not generate #line directives as it is really
annoying if you step through grammar files when debugging the
compiler. Now they only generate line comments where appropriate.
@
text
@d5 1
a5 1
# Last Change:	Mon Sep 12 20:01:24 1994
d52 6
a57 1
	    -e "s|+++P3MPLCC+++|$(P3MPLCC)|g" \
d59 4
a74 7

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

# Rule for the compiler link process:

p3c:    $(OBJS)
	$(CC) $(CFLAGS) -o $@@ $(OBJS) $(LDFLAGS)
@


1.4
log
@The library cannot be created in the Common file as it is different
for every version. Some minor changes in Makefile.C, Makefile.MPL,
Makefile.PVM, Common, and local.
@
text
@d89 1
a89 1
	rex -cgd parallaxis.rex
d92 1
a92 1
	ell -cidg parallaxis.ell
@


1.3
log
@Another version of the makefiles. The PVM version needed some
modification. Now there's a script "local" to modify the makefiles
to the local environment during development.
Some minor changes on all versions of the makefiles.
@
text
@a68 15
# Rules for the system library:


SYSTEM_$(VERS).o: SYSTEM_$(VERS).c SYSTEM_$(VERS).h
	$(CC) $(LIB_CFLAGS) -c SYSTEM_$(VERS).c

$(SYSLIB): SYSTEM_$(VERS).o
	$(AR) $(ARFLAGS) $(SYSLIB) SYSTEM_$(VERS).o
	-$(RANLIB) $(SYSLIB)

lib: $(SYSLIB)			# define the alias "lib"


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

@


1.2
log
@.MPL --> .$(VERS)
@
text
@d5 1
a5 1
# Last Change:	Thu Sep  8 22:28:25 1994
d39 7
d48 1
a48 1
p3.1: p3.man Makefile.MPL		#insert correct names and paths
d60 2
a61 2
p3$(OBJ): p3.c Makefile.$(VERS)
	$(CC) $(P3CFLAGS) -c p3.c
d63 2
a64 2
p3$(EXE): p3$(OBJ)
	$(CC) $(P3CFLAGS) -o $@@ p3$(OBJ) $(LDFLAGS)
d69 5
a73 1
# Rule for the system library:
d75 2
a76 2
$(SYSLIB): SYSTEM_$(VERS)$(OBJ)
	$(AR) $(ARFLAGS) $(SYSLIB) SYSTEM_$(VERS)$(OBJ)
d86 1
a86 1
p3c$(EXE): $(OBJS)
d122 1
a122 1
# They all use
d124 1
a124 1
p3c$(OBJ)        : p3c.c parallaxis.h Eval.h Tree.h Symbols.h Positions.h \
d127 3
a129 3
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 \
d133 2
a134 2
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 \
d137 4
a140 4
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 \
d143 3
a145 3
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 \
d147 1
a147 1
Parser$(OBJ)     : Parser.c Parser.h Scanner.h parallaxis.h Positions.h \
d150 1
a150 1
Pointer$(OBJ)    : Pointer.c parallaxis.h GenIdents.h Symbols.h Values.h \
d152 2
a153 2
Positions$(OBJ)  : Positions.c FileIO.h parallaxis.h Positions.h
Scanner$(OBJ)    : Scanner.c Scanner.h parallaxis.h Positions.h Errors.h \
d156 1
a156 1
Source$(OBJ)     : Source.c Source.h FileIO.h parallaxis.h Scanner.h \
d159 2
a160 2
#	$(CC) -c $(CFLAGS) -DDialog -o Source$(OBJ) Source.c
Statist$(OBJ)    : Statist.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
d162 1
a162 1
StdProcs$(OBJ)   : StdProcs.c StdProcs.h parallaxis.h BigSet.h Symbols.h \
d164 1
a164 1
Symbols$(OBJ)    : Symbols.c Symbols.h parallaxis.h Errors.h Positions.h \
d166 1
a166 1
Tree$(OBJ)       : Tree.c Tree.h parallaxis.h Options.h Positions.h Symbols.h \
d168 1
a168 1
Types$(OBJ)      : Types.c Types.h parallaxis.h BigSet.h Code.h Errors.h \
d170 1
a170 1
UniqueIds$(OBJ)  : UniqueIds.c UniqueIds.h parallaxis.h BigSet.h Errors.h \
d172 1
a172 1
Values$(OBJ)     : Values.c Values.h parallaxis.h BigSet.h Tree.h Options.h \
d174 1
a174 1
With$(OBJ)       : With.c With.h parallaxis.h Symbols.h Errors.h Positions.h \
@


1.1
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
@d53 1
a53 1
p3$(OBJ): p3.c Makefile.MPL
@
