blob: 63be99286057a84a364fb3ab61c3b51c3de23c75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 1996/04/17 08:01:41 deraadt Exp $
LIBIO= io
LIBIOSTREAM= iostream
LIB= $(LIBIO)
CXXFLAGS+= -fno-implicit-templates -nostdinc++
CPPFLAGS+= -I$(.CURDIR) -I$(.OBJDIR)
VERSION= 2.7.1
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
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
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 \
iovsprintf.c iovsscanf.c
OSPRIM_SRCS= ioprims.c iostrerror.c cleanup.c
LIBIO_SRCS= $(IO_SRCS) $(STDIO_WRAP_SRCS) $(OSPRIM_SRCS) stdfiles.c
LIBIOSTREAM_SRCS= $(IO_SRCS) $(IOSTREAM_SRCS) $(OSPRIM_SRCS)
SRCS= $(LIBIO_SRCS)
CLEANFILES+= _G_config.h iostream.list
FILES= *.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)_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)_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)
install: _G_config.h
install -d -m 755 -o $(BINOWN) -g $(BINGRP) $(DESTDIR)/usr/include/g++
@-cd $(.CURDIR); for i in $(FILES); do \
cmp -s $$i $(DESTDIR)/usr/include/g++/$$i || \
install -c -o $(BINOWN) -g $(BINGRP) -m $(NONBINMODE) \
$$i $(DESTDIR)/usr/include/g++/$$i; \
done
@-for i in $(FILES); do \
cmp -s $$i $(DESTDIR)/usr/include/g++/$$i || \
install -c -o $(BINOWN) -g $(BINGRP) -m $(NONBINMODE) \
$$i $(DESTDIR)/usr/include/g++/$$i; \
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 <bsd.lib.mk>
|