blob: 0a1693ac7e3cc59670100637c281c13c1f32b2fc (
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
88
89
90
91
92
93
94
95
96
97
|
# $OpenBSD: Makefile.bsd-wrapper,v 1.6 2012/08/31 00:11:27 deraadt Exp $
.if (${MACHINE_ARCH} == "mips")
MAKE+= -DNOPIC
NOPIC=
.endif
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).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).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 <bsd.lib.mk>
|