head	1.2;
access;
symbols
	boston:1.2;
locks; strict;
comment	@# @;


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

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


desc
@Modified version of Makefile, only for use during development.
@


1.2
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
@######################################################################
# Project:	Parallaxis-III
# Filename:	LocalMakefile
# Author:	Hartmut Keller
# Last Change:	Thu Sep  8 22:39:53 1994
#
# Description:
# ------------
# This is a modified version of the main main Makefile of the compiler
# system Parallaxis-III. It contains several local settings for the
# work during development.
#
# 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.
#
######################################################################

LOCAL_OPTIONS = -ansi -g -Wall -DDEVELOP
LOCAL_LINKOPTIONS =
LOCAL_P3INC   = /usr/local/bv/include
LOCAL_P3LIB   = /usr/local/bv/lib

LOCAL = "OPTIONS=$(LOCAL_OPTIONS)" LINKOPTIONS=$(LOCAL_LINKOPTIONS) \
        P3INC=$(LOCAL_P3INC) P3LIB=$(LOCAL_P3LIB)


.SUFFIXES:

default: SUNOS

C c: SUNOS			# due to historical reasons

SUNOS sunos:	
	$(MAKE) -f Makefile.C $(LOCAL) 

SOLARIS solaris:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=: $(LOCAL) 

SGI sgi:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=: $(LOCAL) 

LINUX linux:
	$(MAKE) -f Makefile.C ARFLAGS=crs RANLIB=: $(LOCAL) 

MPL mpl:
	$(MAKE) -f Makefile.MPL $(LOCAL) 

PVM pvm:
	$(MAKE) -f Makefile.PVM $(LOCAL) 



# Special purpose targets for cleaning up directories after compiling.

# Remove object files
clean:
	$(MAKE) -f Makefile.C clean

# Remove also the executables, the library and the man-page
distclean: Clean
Clean:  
	$(MAKE) -f Makefile.C Clean

# 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: 
	$(MAKE) -f Makefile.C CLEAN



#######
#  The following is not adapted to the local environment!
#######



######################################################################
# 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.
######################################################################


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

# This is the end of Makefile
@


1.1
log
@This is a modified version of Makefile to reflect our local machine
environment. It is used during development instead of Makefile.
@
text
@d5 1
a5 1
# Last Change:	Wed Sep  7 23:16:01 1994
d9 4
d66 2
d70 1
a70 1
C c: SUNOS
d76 1
a76 1
	$(MAKE) -f Makefile.C ARFLAGS=crs $(LOCAL) 
d79 1
a79 1
	$(MAKE) -f Makefile.C ARFLAGS=crs $(LOCAL) 
d82 1
a82 1
	$(MAKE) -f Makefile.C ARFLAGS=crs $(LOCAL) 
d92 20
d143 1
a143 2
ARFLAGS = cr			# Options for $(AR); without ranlib
				# add `s'
d154 1
a154 1
	$(MAKE) -f Makefile.MPL CLEAN
d157 1
a157 1
	$(MAKE) -f Makefile.MPL CLEAN
d160 1
a160 1
	$(MAKE) -f Makefile.C CLEAN
d170 1
a170 1
# This is the end of LocalMakefile
@
