# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2000/05/15 06:10:20 niklas Exp $ LIBIO= io LIBIOSTREAM= iostream LIB= $(LIBIO) CXXFLAGS+= -fno-implicit-templates CPPFLAGS+= -I$(.CURDIR) -I$(.OBJDIR) VERSION= 2.9.0 IO_SRCS= filedoalloc.c floatconv.c genops.c fileops.c iovfprintf.c \ iovfscanf.c ioignore.c iopadn.c iofgetpos.c iofread.c \ iofscanf.c iofsetpos.c iogetdelim.c iogetline.c ioprintf.c \ ioseekoff.c ioseekpos.c outfloat.c strops.c iofclose.c \ iopopen.c ioungetc.c peekc.c iogetc.c ioputc.c iofeof.c \ ioferror.c STDIO_SRCS= stdfiles.c STDIO_WRAP_SRCS=iofdopen.c iofflush.c iofgets.c iofopen.c iofprintf.c \ iofputs.c iofwrite.c iogets.c ioperror.c ioputs.c ioscanf.c \ iosetbuffer.c iosetvbuf.c iosprintf.c iosscanf.c ioftell.c \ iovsscanf.c iovsprintf.c IOSTREAM_SRCS= builtinbuf.cc filebuf.cc fstream.cc indstream.cc ioassign.cc \ ioextend.cc iomanip.cc iostream.cc isgetline.cc isgetsb.cc \ isscan.cc osform.cc procbuf.cc sbform.cc sbgetline.cc \ sbscan.cc stdiostream.cc stdstrbufs.cc stdstreams.cc \ stream.cc streambuf.cc strstream.cc PlotFile.cc SFile.cc \ parsestream.cc pfstream.cc editbuf.cc OSPRIM_SRCS= ioprims.c iostrerror.c cleanup.c LIBIO_SRCS= $(IO_SRCS) $(STDIO_WRAP_SRCS) $(OSPRIM_SRCS) $(STDIO_SRCS) LIBIOSTREAM_SRCS= $(IO_SRCS) $(IOSTREAM_SRCS) $(OSPRIM_SRCS) SRCS= $(LIBIO_SRCS) CLEANFILES+= _G_config.h iostream.list dummy.h all: _G_config.h iostream.list $(LIBIOSTREAM) beforedepend: _G_config.h $(LIBIOSTREAM): @if [ -z "$(MAKE_IOSTREAM)" ] ; then \ cd $(.CURDIR); $(MAKE) -f $(.CURDIR)/Makefile.bsd-wrapper LIB=$(LIBIOSTREAM) SRCS='$$(LIBIOSTREAM_SRCS)' MAKE_IOSTREAM=true ; \ exit ; \ fi _G_config.h: gen-params @echo Building $(.TARGET) @rootme=`pwd`/ ; export rootme; \ CC="$(CC)"; export CC; \ CXX="$(CXX) $(CXXFLAGS)"; export CXX; \ CONFIG_NM="nm"; export CONFIG_NM; \ sh $(.CURDIR)/gen-params LIB_VERSION=$(VERSION) $(G_CONFIG_ARGS) >tmp-params.h @mv tmp-params.h _G_config.h iostream.list: _G_config.h @echo Generating $(.TARGET) @echo "$(LIBIOSTREAM_SRCS:N*.h:R:S/$/.o/g)" > iostream.list clean: rm -f a.out [Ee]rrs mklog core *.core $(CLEANFILES) rm -f lib$(LIBIO).a $(LIBIO_SRCS:.c=.o) rm -f lib$(LIBIO)_g.a $(LIBIO_SRCS:.c=.go) rm -f lib$(LIBIO)_p.a $(LIBIO_SRCS:.c=.po) rm -f lib$(LIBIO)_pic.a lib$(LIBIO).so.*.* $(LIBIO_SRCS:.c=.so) rm -f llib-lib$(LIBIO).ln $(LIBIO_SRCS:.c=.ln) rm -f lib$(LIBIOSTREAM).a $(IOSTREAM_SRCS:.cc=.o) rm -f lib$(LIBIOSTREAM)_g.a $(IOSTREAM_SRCS:.cc=.go) rm -f lib$(LIBIOSTREAM)_p.a $(IOSTREAM_SRCS:.cc=.po) rm -f lib$(LIBIOSTREAM)_pic.a lib$(LIBIOSTREAM).so.*.* \ $(IOSTREAM_SRCS:.cc=.so) rm -f llib-lib$(LIBIOSTREAM).ln $(IOSTREAM_SRCS:.cc=.ln) includes: _G_config.h @install -d -m 755 -o $(BINOWN) -g $(BINGRP) $(DESTDIR)/usr/include/g++ @-cd $(.CURDIR); for i in *.h; do \ if [ -e $$i ]; then \ cmp -s $$i $(DESTDIR)/usr/include/g++/$$i || \ install -c -o $(BINOWN) -g $(BINGRP) -m $(NONBINMODE) \ $$i $(DESTDIR)/usr/include/g++/$$i; \ fi \ done @cmp -s _G_config.h $(DESTDIR)/usr/include/g++/_G_config.h || \ install -c -o $(BINOWN) -g $(BINGRP) -m $(NONBINMODE) \ _G_config.h $(DESTDIR)/usr/include/g++/_G_config.h install: @echo "done" # @-cd $(.CURDIR); for i in iostream.info* ; do \ # cmp -s $$i $(DESTDIR)/usr/share/info/$$i || \ # install -c -o $(BINOWN) -g $(BINGRP) -m $(NONBINMODE) \ # $$i $(DESTDIR)/usr/share/info/$$i; \ # done .include