# Makefile for libg++.a

# Copyright (C) 1988, 1992, 1993 Free Software Foundation
#   originally written by Doug Lea (dl@rocky.oswego.edu)

# This file is part of libg++, the GNU C++ library.

# GNU CC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY.  No author or distributor
# accepts responsibility to anyone for the consequences of using it
# or for whether it serves any particular purpose or works at all,
# unless he says so in writing.  Refer to the GNU CC General Public
# License for full details.

# Everyone is granted permission to copy, modify and redistribute
# GNU CC, but only under the conditions described in the
# GNU CC General Public License.   A copy of this license is
# supposed to have been given to you along with GNU CC so you
# can know your rights and responsibilities.  It should be in a
# file named COPYING.  Among other things, the copyright notice
# and this notice must be preserved on all copies.

srcdir = .

# 
# declarations from here on should not normally need to be changed 
# in order to compile libg++.a
#

# library sources 

STREAM_OBJS = File.o  ostream.o istream.o streambuf.o filebuf.o Filebuf.o \
 PlotFile.o  SFile.o

REGEX_OBJ=
BIT_OBJS = bitand.o bitany.o bitblt.o bitclear.o bitcopy.o bitcount.o\
 bitinvert.o bitlcomp.o bitset1.o bitxor.o
OBJS =  AllocRing.o Obstack.o builtin.o \
 $(REGEX_OBJ) Regex.o String.o Intdouble.o Integer.o Rational.o \
 Random.o BitSet.o BitString.o LogNorm.o SmplHist.o SmplStat.o \
 Normal.o NegExp.o Weibull.o Erlang.o DiscUnif.o \
 Uniform.o Poisson.o HypGeom.o Geom.o Binomial.o \
 RNG.o ACG.o MLCG.o  RndInt.o  \
 Fix.o Fix16.o Fix24.o GetOpt.o \
 error.o gcd.o hash.o \
 lg.o fmtq.o ioob.o pow.o sqrt.o timer.o \
 compare.o $(BIT_OBJS) \
 SLList.o DLList.o

DEPEND_SOURCES = $(srcdir)/*.cc

#### host, target, and site dependent Makefile fragments come in here.
##

.PHONY: add-to-targetlib
# Invoked from other directories, overriding $(TARGETLIB).
add-to-targetlib:
	$(AR) $(AR_FLAGS) $(TARGETLIB) $(OBJS)

# This is invoked by the top-level libg++ Makefile, to:
# a) make sure $(OBJS) are up-to-date, and
# b) make a list of those files that should be added to libg++.a.
libgxx.list: stamp-picdir $(OBJS)
	@echo "$(OBJS)" >libgxx.list

install:
	if [ -z "$(MULTISUBDIR)" ]; then \
	  for FILE in `(cd ${srcdir}; echo *.h gen/*.ccP gen/*.hP)`; do \
	    rm -f $(gxx_includedir)/$$FILE ; \
	    $(INSTALL_DATA) ${srcdir}/$$FILE $(gxx_includedir)/$$FILE \
	      || exit 1; \
	    chmod a-x,a+r $(gxx_includedir)/$$FILE ; \
	  done ; \
	else true ; \
	fi
