head	1.1;
branch	1.1.1;
access;
symbols
	perseant-exfatfs-base-20250801:1.1.1.2
	perseant-exfatfs-base-20240630:1.1.1.2
	cjep_sun2x:1.1.1.2.0.44
	cjep_sun2x-base:1.1.1.2
	cjep_staticlib_x-base1:1.1.1.2
	cjep_staticlib_x:1.1.1.2.0.42
	cjep_staticlib_x-base:1.1.1.2
	phil-wifi-20200421:1.1.1.2
	phil-wifi-20200411:1.1.1.2
	phil-wifi-20200406:1.1.1.2
	pgoyette-compat-merge-20190127:1.1.1.2
	pgoyette-compat-20190127:1.1.1.2
	pgoyette-compat-20190118:1.1.1.2
	pgoyette-compat-1226:1.1.1.2
	pgoyette-compat-1126:1.1.1.2
	pgoyette-compat-1020:1.1.1.2
	pgoyette-compat-0930:1.1.1.2
	pgoyette-compat-0906:1.1.1.2
	pgoyette-compat-0728:1.1.1.2
	pgoyette-compat-0625:1.1.1.2
	pgoyette-compat-0521:1.1.1.2
	pgoyette-compat-0502:1.1.1.2
	pgoyette-compat-0422:1.1.1.2
	pgoyette-compat-0415:1.1.1.2
	pgoyette-compat-0407:1.1.1.2
	pgoyette-compat-0330:1.1.1.2
	pgoyette-compat-0322:1.1.1.2
	pgoyette-compat-0315:1.1.1.2
	pgoyette-compat:1.1.1.2.0.40
	pgoyette-compat-base:1.1.1.2
	perseant-stdc-iso10646:1.1.1.2.0.38
	perseant-stdc-iso10646-base:1.1.1.2
	prg-localcount2-base3:1.1.1.2
	prg-localcount2-base2:1.1.1.2
	prg-localcount2-base1:1.1.1.2
	prg-localcount2:1.1.1.2.0.36
	prg-localcount2-base:1.1.1.2
	pgoyette-localcount-20170426:1.1.1.2
	bouyer-socketcan-base1:1.1.1.2
	pgoyette-localcount-20170320:1.1.1.2
	bouyer-socketcan:1.1.1.2.0.34
	bouyer-socketcan-base:1.1.1.2
	pgoyette-localcount-20170107:1.1.1.2
	pgoyette-localcount-20161104:1.1.1.2
	localcount-20160914:1.1.1.2
	pgoyette-localcount-20160806:1.1.1.2
	pgoyette-localcount-20160726:1.1.1.2
	pgoyette-localcount:1.1.1.2.0.32
	pgoyette-localcount-base:1.1.1.2
	netbsd-5-2-3-RELEASE:1.1.1.2
	netbsd-5-1-5-RELEASE:1.1.1.2
	yamt-pagecache-base9:1.1.1.2
	yamt-pagecache-tag8:1.1.1.2
	tls-earlyentropy:1.1.1.2.0.28
	tls-earlyentropy-base:1.1.1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2
	riastradh-drm2-base3:1.1.1.2
	netbsd-5-2-2-RELEASE:1.1.1.2
	netbsd-5-1-4-RELEASE:1.1.1.2
	netbsd-5-2-1-RELEASE:1.1.1.2
	netbsd-5-1-3-RELEASE:1.1.1.2
	agc-symver:1.1.1.2.0.30
	agc-symver-base:1.1.1.2
	tls-maxphys-base:1.1.1.2
	yamt-pagecache-base8:1.1.1.2
	netbsd-5-2:1.1.1.2.0.26
	yamt-pagecache-base7:1.1.1.2
	netbsd-5-2-RELEASE:1.1.1.2
	netbsd-5-2-RC1:1.1.1.2
	yamt-pagecache-base6:1.1.1.2
	yamt-pagecache-base5:1.1.1.2
	yamt-pagecache-base4:1.1.1.2
	netbsd-5-1-2-RELEASE:1.1.1.2
	netbsd-5-1-1-RELEASE:1.1.1.2
	yamt-pagecache-base3:1.1.1.2
	yamt-pagecache-base2:1.1.1.2
	yamt-pagecache:1.1.1.2.0.24
	yamt-pagecache-base:1.1.1.2
	bouyer-quota2-nbase:1.1.1.2
	bouyer-quota2:1.1.1.2.0.22
	bouyer-quota2-base:1.1.1.2
	matt-nb5-pq3:1.1.1.2.0.20
	matt-nb5-pq3-base:1.1.1.2
	netbsd-5-1:1.1.1.2.0.18
	netbsd-5-1-RELEASE:1.1.1.2
	netbsd-5-1-RC4:1.1.1.2
	netbsd-5-1-RC3:1.1.1.2
	netbsd-5-1-RC2:1.1.1.2
	netbsd-5-1-RC1:1.1.1.2
	netbsd-5-0-2-RELEASE:1.1.1.2
	netbsd-5-0-1-RELEASE:1.1.1.2
	jym-xensuspend-nbase:1.1.1.2
	netbsd-5-0:1.1.1.2.0.16
	netbsd-5-0-RELEASE:1.1.1.2
	netbsd-5-0-RC4:1.1.1.2
	netbsd-5-0-RC3:1.1.1.2
	netbsd-5-0-RC2:1.1.1.2
	jym-xensuspend:1.1.1.2.0.14
	jym-xensuspend-base:1.1.1.2
	netbsd-5-0-RC1:1.1.1.2
	netbsd-5:1.1.1.2.0.12
	netbsd-5-base:1.1.1.2
	mjf-devfs2:1.1.1.2.0.10
	mjf-devfs2-base:1.1.1.2
	yamt-pf42-base4:1.1.1.2
	yamt-pf42-base3:1.1.1.2
	hpcarm-cleanup-nbase:1.1.1.2
	yamt-pf42-base2:1.1.1.2
	yamt-pf42:1.1.1.2.0.8
	yamt-pf42-base:1.1.1.2
	keiichi-mipv6:1.1.1.2.0.6
	keiichi-mipv6-base:1.1.1.2
	cube-autoconf:1.1.1.2.0.4
	cube-autoconf-base:1.1.1.2
	hpcarm-cleanup:1.1.1.2.0.2
	hpcarm-cleanup-base:1.1.1.2
	netbsd-0-8:1.1.1.1
	netbsd-alpha-1:1.1.1.1
	patchkit-0-2-2:1.1.1.1
	WFJ-386bsd-01:1.1.1.1
	WFJ-920714:1.1.1;
locks; strict;
comment	@# @;


1.1
date	93.03.21.09.45.37;	author cgd;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	93.03.21.09.45.37;	author cgd;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	93.07.14.09.12.06;	author mycroft;	state dead;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@# Makefile for GNU C++ class library (libg++)
#   Copyright (C) 1989 Free Software Foundation, Inc.
#   written by Doug Lea (dl@@rocky.oswego.edu)

#This file is part of GNU libg++.

#GNU libg++ is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 1, or (at your option)
#any later version.

#GNU libg++ is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with GNU libg++; see the file COPYING.  If not, write to
#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

###########################################################################
#
# Directories, paths, compilation flags and program names.
#
# Please make sure these are correct.
#

# ------ source locations

# Manually set PWD to *this* directory if you are not using gnu make
PWD := $(shell pwd)
#PWD=/home/dl/libg++

# source include directory 
SRCIDIR= $(PWD)/g++-include

# the genclass program
GENCLASS=$(PWD)/genclass
# and its directory of prototype files
PROTODIR=$(PWD)/g++-include/gen

# ------ installation destinations
# ------ You will require write-permission on the destination directories
# ------ in order to `make install'

# set `prefix' to something else if you want to install things
# in nonstandard places

prefix =/usr/gnu

# libg++.a destination
LIBDIR = $(prefix)/lib

# executables directory: location to install the genclass class generator
BINDIR = $(prefix)/bin

# directory to install man pages
MANDIR= $(prefix)/man

# location to install include file directory
IDIR = $(prefix)/lib/g++-include


# ------- System-dependent defines
# ------- use the second form of each for SystemV (USG)

# g++ flags
OSFLAG=
#OSFLAG = -DUSG

# other compilation control flags -- use any combination

# use this only if you have a strange stdio implementation
#XTRAFLAGS = -DDEFAULT_filebuf

# use this if you do not want gnulib3 in libg++.a
#XTRAFLAGS = -DNO_GNULIB3

# use this if you need COFF encapulation defined in gnulib3
#XTRAFLAGS = -DCOFF_ENCAPSULATE

# use this if you want to disable line buffering for stream output
#XTRAFLAGS = -DNO_LINE_BUFFER_STREAMBUF

# Use this to disable placing libg++ version of malloc in libg++.a 
#XTRAFLAGS = -DNO_LIBGXX_MALLOC

# Please use this & send me some results of malloc_stats() sometime
# (it is off by default, since stat gathering hurts performance)
#XTRAFLAGS = -DMALLOC_STATS

#suggested for NeXT by cdr@@acc.stolaf.edu
#XTRAFLAGS = -DNO_GNULIB3 -DNO_LIBGXX_MALLOC

# ld or ld++ flags
OSLDFLAG =
#OSLDFLAG= -lPW

# how to install
INSTALL=install -c
#INSTALL=cp

# ranlib if necessary
RANLIB=ranlib
#RANLIB=echo

# which make?
MAKE=make

#which ar?
AR=ar

# not used, but convenient for those who preprocess things while compiling
SHELL=/bin/sh


# ------ compiler names

# GNU C++ compiler name
GXX = g++
#GXX=gcc

# GNU CC compiler name (needed for some .c files in libg++.a)
CC = gcc

# GNU loader
LDXX = $(LIBDIR)/gcc-ld
#LDXX = $(LIBDIR)/gcc-ld++

# crt0+.o location (for dynamic loading tests)
GXXCRT1=$(LIBDIR)/crt1+.o

# ------ Other compilation flags
# ------ modify as you like -- the ones here are sheer overkill
# ------ However, You MUST compile libg++.a with EITHER -O OR
# ------ -DUSE_LIBGXX_INLINES or both

GXX_OPTIMIZATION_FLAGS= -O -fstrength-reduce  -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized 

#GXX_OPTIMIZATION_FLAGS=-DUSE_LIBGXX_INLINES

GCC_OPTIMIZATION_FLAGS= -O -fstrength-reduce -fdelayed-branch 

DEBUG_FLAGS= -g

#use this only if you like to look at lots of useless messages
#VERBOSITY_FLAGS= -Wall -v 
VERBOSITY_FLAGS= -Wall

GXX_INCLUDE_DIRS= -I$(SRCIDIR)

GCC_INCLUDE_DIRS= -I$(prefix)/lib/gcc-include -I/usr/include -I$(SRCIDIR)

#use this only if you use GNU as (gas) or other assemblers that 
#can read from pipes. 
PIPE_AS= -pipe
#PIPE_AS=

# Flags for all C++ compiles
GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(XTRAFLAGS) $(PIPE_AS)

# Flags for all C compiles
CFLAGS= $(OSFLAG) $(GCC_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GCC_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(XTRAFLAGS) $(PIPE_AS)

# g++ load time flags 
GXXLDFLAGS = -L$(PWD)/src -lg++ -lm $(OSLDFLAG)

# Comment out the next line to disable incremental linking test
# (this test NOT included in 1.39.0, so don't re-enable)
#TEST0=test0
TEST0=

###########################################################################
#
# compilation actions
#




src: FORCE
	(cd src; $(MAKE) GXX="$(GXX)"  GXXFLAGS="$(GXXFLAGS)" GXXLDFLAGS="$(GXXLDFLAGS)" LIBDIR="$(LIBDIR)" SRCIDIR="$(SRCIDIR)" CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" LDXX="$(LDXX)" GXXCRT1="$(GXXCRT1)" MAKE="$(MAKE)" prefix="$(prefix)" VPATH="$(SRCIDIR)" AR="$(AR)" PROTODIR="$(PROTODIR)" GENCLASS="$(GENCLASS)")

tests: FORCE
	(cd tests;	$(MAKE) checktests GXX="$(GXX)"  GXXFLAGS="$(GXXFLAGS)" GXXLDFLAGS="$(GXXLDFLAGS)" LIBDIR="$(LIBDIR)" SRCIDIR="$(SRCIDIR)" CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" LDXX="$(LDXX)" GXXCRT1="$(GXXCRT1)" MAKE="$(MAKE)" prefix="$(prefix)" AR="$(AR)" TEST0="$(TEST0)" PROTODIR="$(PROTODIR)" GENCLASS="$(GENCLASS)")

etc: FORCE
	(cd etc;	$(MAKE) GXX="$(GXX)"  GXXFLAGS="$(GXXFLAGS)" GXXLDFLAGS="$(GXXLDFLAGS)" LIBDIR="$(LIBDIR)" SRCIDIR="$(SRCIDIR)" CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" LDXX="$(LDXX)" GXXCRT1="$(GXXCRT1)" MAKE="$(MAKE)" prefix="$(prefix)" AR="$(AR)" PROTODIR="$(PROTODIR)" GENCLASS="$(GENCLASS)")

run_etc: FORCE
	(cd etc;	$(MAKE) run_tests GXX="$(GXX)"  GXXFLAGS="$(GXXFLAGS)" GXXLDFLAGS="$(GXXLDFLAGS)" LIBDIR="$(LIBDIR)" SRCIDIR="$(SRCIDIR)" CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" LDXX="$(LDXX)" GXXCRT1="$(GXXCRT1)" MAKE="$(MAKE)" prefix="$(prefix)" AR="$(AR)" PROTODIR="$(PROTODIR)" GENCLASS="$(GENCLASS)")

gperf: FORCE
	(cd gperf;	$(MAKE) GXX="$(GXX)"  GXXFLAGS="$(GXXFLAGS)" GXXLDFLAGS="$(GXXLDFLAGS)" LIBDIR="$(LIBDIR)" SRCIDIR="$(SRCIDIR)" CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" LDXX="$(LDXX)" GXXCRT1="$(GXXCRT1)" prefix="$(prefix)" AR="$(AR)" PROTODIR="$(PROTODIR)" GENCLASS="$(GENCLASS)")

genclass: genclass.sh
	echo "/^PROTODIR=/c\\" > sedscript
	echo "PROTODIR=$$\{PROTODIR-$(IDIR)/gen\}" >> sedscript
	sed -f sedscript < genclass.sh > genclass
	chmod 0755 genclass
	rm -f sedscript

#to force sub-makes
FORCE:


###########################################################################
#
# Installation
#

MAKE_ENVIRON=\
	BINDIR=$(BINDIR) \
	LIBDIR=$(LIBDIR) \
	MANDIR=$(MANDIR) \
	INSTALL="$(INSTALL)"

all: src tests genclass etc gperf 

install:  install-lib install-include-files install-progs

install-lib:
	(cd src; $(MAKE) $(MAKE_ENVIRON) install)

install-progs:
	(cd etc; $(MAKE) $(MAKE_ENVIRON) install)
	(cd gperf; $(MAKE) $(MAKE_ENVIRON) install)
	$(INSTALL) genclass $(BINDIR)

install-include-files:
	-mkdir $(IDIR)
	-mkdir $(IDIR)/sys
	-mkdir $(IDIR)/gen
	cd $(SRCIDIR); \
	FILES=`find . ! -type d  -print`; \
	cd gen; \
	GFILES=`find . ! -type d -print`;\
	cd $(IDIR); \
	rm -fr $$FILES; \
	rm -f $$GFILES; \
	cd $(SRCIDIR); \
	FILES=`find . ! -type d  -print`; \
	for file in $$FILES; do \
		rm -f $(IDIR)/$$file; \
		cp $$file $(IDIR)/$$file; \
		chmod 0444 $(IDIR)/$$file; \
		echo $$file installed; \
	done


###########################################################################
#
# Destructors
#

clean:
	rm -f *.o *~ \#* *.bak *.pl a.out 
	cd tests; $(MAKE) clean
	cd etc; $(MAKE) clean
	cd gperf; $(MAKE) clean

realclean:
	cd src; $(MAKE) realclean
	cd tests; $(MAKE) realclean
	cd etc; $(MAKE) realclean
	cd gperf; $(MAKE) realclean
	-rm -f genclass
	-rm -f libg++.info* libg++.?? libg++.??s libg++.log libg++.toc libg++.*aux
	-rm -f *.orig src/*.orig tests/*.orig etc/*.orig g++-include/*.orig g++-include/sys/*.orig g++-include/gen/*.orig
	-rm -f *.rej src/*.rej tests/*.rej etc/*.rej g++-include/*.rej g++-include/sys/*.rej g++-include/gen/*.rej
	-rm -f *~ src/*~ tests/*~ etc/*~ g++-include/*~ g++-include/sys/*~ g++-include/gen/*~
	-rm -f a.out src/a.out tests/a.out etc/a.out 
	-rm -f *.s src/*.s tests/*.s etc/*.s 


.PHONY: src tests genclass etc gperf FORCE install install-include-files 
@


1.1.1.1
log
@initial import of 386bsd-0.1 sources
@
text
@@


1.1.1.2
log
@Clean up deleted files.
@
text
@@
