head     3.2;
branch   ;
access   ;
symbols  ;
locks    grunwald:3.2; strict;
comment  @# @;


3.2
date     89.02.20.15.36.07;  author grunwald;  state Exp;
branches ;
next     1.2;

1.2
date     88.09.21.20.53.33;  author grunwald;  state Exp;
branches ;
next     1.1;

1.1
date     88.09.18.16.42.38;  author grunwald;  state Exp;
branches ;
next     ;


desc
@@


3.2
log
@Start using Gnu library heaps for schedulers
@
text
@#
#	Configurations for different hosts
#
#PARALLEL=1

.SUFFIXES:
vpath

.SUFFIXES: .o .dep .s .cc
#
#	needed, but over-written by Makefile.host
#
LIB	=bogus

vpath   Config.h ./
vpath	%.h  ../Src 
#vpath	%.h  ../Src/RCS
vpath	%.cc ../Src
#vpath	%.cc ../Src/RCS
vpath	%.s  ../Src
#vpath	%.s  ../Src/RCS

include Makefile.host
include ../Src/Makefile.compilers
include ../Src/Makefile.files
include Makefile.host

OBJ	=$(subst .cc,.o,$(COMPILE-SRC))

ifeq ($(HOSTTYPE),sun3)
  ASMOBJ=HardwareContext-sun3.o SpinLock-fake.o\
	SharedMemory-fake.o SharedMalloc-fake.o
  C++FLAGS := $(C++FLAGS)
endif

ifeq ($(HOSTTYPE),umax)
  ASMOBJ = HardwareContext-umax.o SpinLock-umax.o \
	SharedMemory-umax.o SharedMalloc-real.o
  C++FLAGS := $(C++FLAGS)
endif

ifeq ($(HOSTTYPE),onemax)
  ASMOBJ = HardwareContext-umax.o SpinLock-fake.o \
	SharedMemory-fake.o SharedMalloc-fake.o
  C++FLAGS := $(C++FLAGS)
endif

OTHER	= Makefile Makefile.sun Makefile.encore
ALLSRC	= $(ASM) $(SRC) $(HDR) $(OTHER)
ALLOBJ	= $(OBJ) $(ASMOBJ)

default: $(LIB)

$(LIB):	$(ALLOBJ)
	-rm -f $(LIB)
	ar r $(LIB) $(ALLOBJ)
#	$(RANLIB) $(LIB)

mklib:

	$(MAKE)

#
#	Dependencies to build instances of prototypes
#

../Src/ThreadeventPairingHeap.h ../Src/ThreadEventPairingHeap.cc:
	(cd ../Src; genclass ThreadEvent val PairingHeap)

install: installLib installHdr installConfig

installLib: $(LIB)
	rm -f $(INSTALL_LIB)/libawe2-$(C++).a
	-install -c -m 666 ../Obj-$(C++)-$(HOSTTYPE)/$(LIB) $(INSTALL_LIB)/$(LIB)
	-$(RANLIB) $(INSTALL_LIB)/$(LIB)
	-chmod 444 $(INSTALL_LIB)/$(LIB)

installHdr: $(HDR)
	cd ../Src; \
	echo "FILES = (" > Distfile.tmp ; \
	ls $(HDR) >> Distfile.tmp ; \
	echo " )" >> Distfile.tmp ;\
	echo "HOSTS = (" `hostname` ")" >> Distfile.tmp ;\
	echo '$${FILES} -> $${HOSTS}' >> Distfile.tmp ;\
	echo '	install -y ' $(INSTALL_HDR) ';' >> Distfile.tmp ;\
	rdist -f Distfile.tmp

installConfig: Config.h
	-rm -f $(INSTALL_HDR)/Config.h
	ln -s $(INSTALL_HDR)/Config-$(HOSTTYPE).h $(INSTALL_HDR)/Config.h

clean:
	-rm -f *.o core *.a

cleanAll:
	$(MAKE) -c ../Obj-GCC clean
	$(MAKE) -c ../Obj-g++ clean

cleansrc:
	-ci -q $(ALLSRC)
 
dist: $(FILES)
	echo "FILES = (" > Distfile.tmp
	ls $(ALLSRC) >> Distfile.tmp
	echo "	)" >> Distfile.tmp
	echo "HOSTS = ($(HOST))" >> Distfile.tmp
	echo '$${FILES} -> $${HOSTS}' >> Distfile.tmp
	echo '	install -y Awesime/Src;' >> Distfile.tmp
	rdist -f Distfile.tmp

#
#	Build the list of files, including the OBJ files. All OBJ
#	files which contain 'Generic' are not included;
#
files:
	echo 'SRC	= \' > Makefile.files
	ls *.cc | sed -e 's/^/	/' -e 's/$$/\\/' -e '$$s/\\$$//' >>Makefile.files
	echo ' ' >> Makefile.files
	echo 'COMPILE-SRC	= \' > Makefile.files
	ls *.cc | sed 	-e '/-/d'\
			-e '/Generic/d'\
			-e 's/^/	/'\
			-e 's/$$/\\/'\
			-e '$$s/\\$$//' >>Makefile.files
	echo ' ' >> Makefile.files
	echo 'HDR	= \' >> Makefile.files
	ls *.h | sed -e 's/^/	/' -e 's/$$/\\/' -e '$$s/\\$$//' >>Makefile.files
	echo ' ' >> Makefile.files
	echo 'ASM	= \' >> Makefile.files
	ls *.s | sed -e 's/^/	/' -e 's/$$/\\/' -e '$$s/\\$$//' >>Makefile.files
	echo ' ' >> Makefile.files

depend:
	rm -f Makefile.depend
	$(MAKE) -k makefile.depend
#
#	the sed script takes care of an error in the -M flag
#	
makefile.depend: $(subst .cc,.dep, $(COMPILE-SRC))  $(subst .s,.dep, $(ASM))
	cat *.dep | sed -e 's/^\///' >  Makefile.depend 
	
.cc.dep:; $(C++) -M $(C++FLAGS) $^ > $*.dep 
.s.dep:; echo "$*.o : $*.s" > $*.dep
	
include Makefile.depend
@


1.2
log
@*** empty log message ***
@
text
@d4 1
a4 1
PARALLEL=5
d6 12
a17 1
vpath	%.h ../Src
d19 3
a21 1
vpath	%.s ../Src
a22 2
CCDEBUG = -g -O

d26 1
d28 6
a33 2
ifeq ($(HOSTTYPE),sun)
  ASMOBJ=subs-sun.o HardSpinLock-sun.o
d36 4
a39 2
ifeq ($(HOSTTYPE),encore)
  ASMOBJ = HardwareContext-encore.o HardSpinLock-encore.o
d42 6
d57 1
a57 1
	$(RANLIB) $(LIB)
d59 1
a59 1
install: installLib installHdr
d61 11
d73 4
a76 6
	-install -c -m 666 ../Obj-gcc/libawe2-gcc.a $(INSTALL_LIB)/libawe2-gcc.a
	-$(RANLIB) $(INSTALL_LIB)/libawe2-gcc.a
	-install -c -m 666 ../Obj-g++/libawe2-g++.a $(INSTALL_LIB)/libawe2-g++.a
	-$(RANLIB) $(INSTALL_LIB)/libawe2-g++.a
	-chmod 444 $(INSTALL_LIB)/libawe2-g++.a \
		  $(INSTALL_LIB)/libawe2-gcc.a
d88 4
d96 1
a96 1
	$(MAKE) -c ../Obj-gcc clean
d119 7
a131 8
	echo 'OBJ	= \' >> Makefile.files
	ls *.cc | sed 			\
		-e '/Generic/d'		\
		-e 's/\.cc/\.o/'	\
		-e 's/^/	/' 	\
		-e 's/$$/\\/'		\
		-e '$$s/\\$$//' 	>>Makefile.files
	echo ' ' >> Makefile.files
d133 1
a133 1
depend: $(CSRC)
d135 10
a144 5
	$(MAKE) Makefile.depend

Makefile.depend: $(SRC)
	$(CXX) $(CXXFLAGS) -M $^ > Makefile.depend

@


1.1
log
@Initial revision
@
text
@d10 1
a10 1
CCDEBUG = -g
@
