summaryrefslogtreecommitdiff
path: root/gnu/lib/libstdc++/Makefile.bsd-wrapper
blob: 407e6bd9f726280b0429eee40293948e11240ba0 (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.6 2004/10/16 22:21:33 brad Exp $

.include "${.CURDIR}/shlib_version"
SHLIB_MAJOR=${major}
SHLIB_MINOR=${minor}

LIBIBERTY_INCLUDES=${.CURDIR}/../libiberty/include
LIBIBERTY_SRCDIR=${.CURDIR}/../libiberty/src
GCC_SRCDIR=${.CURDIR}/../../usr.bin/gcc/gcc

GXX_INCDIR=	/usr/include/g++

MAKE_FLAGS= 	GCC_SRCDIR="${GCC_SRCDIR}" \
		LIBIBERTY_INCLUDES="${LIBIBERTY_INCLUDES}" \
		LIBIBERTY_SRCDIR="${LIBIBERTY_SRCDIR}" \
		mkinstalldirs='mkdir -p' \
		libtool_VERSION=${SHLIB_MAJOR}:${SHLIB_MINOR}:0

.MAIN: all

all:	config.status
	${MAKE} ${MAKE_FLAGS} all

install:	all
	${MAKE} ${MAKE_FLAGS} \
		install DESTDIR=${DESTDIR} INCLUDE_SUBDIR=
# XXX
	rm -f ${DESTDIR}/usr/lib/libstdc++.la ${DESTDIR}/usr/lib/libsupc++.la
	chmod ${NONBINMODE} ${DESTDIR}/usr/lib/libstdc++.* \
	    ${DESTDIR}/usr/lib/libsupc++.*

#	cd ${.OBJDIR}/include && ${MAKE} ${MAKE_FLAGS} all

.include <bsd.own.mk>

.ifdef GLOBAL_AUTOCONF_CACHE
CF=	--cache-file=${GLOBAL_AUTOCONF_CACHE}
.else
CF=
.endif
.ifdef NOPIC
CF_SHARED= --disable-shared
.else
CF_SHARED= --enable-shared
.endif

config.status:
	PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
	INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
	CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS} ${COPTS}" \
	CXXFLAGS="${CXXFLAGS} ${COPTS}" \
	/bin/sh ${.CURDIR}/libstdc++/configure \
		--prefix=/usr \
		--disable-nls \
		${CF_SHARED} \
		--disable-multilib \
		--with-gnu-ld \
		--with-gxx-include-dir=${GXX_INCDIR} \
		&& touch config.status

#CPPFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR}/libstdc++/libmath
#SRCS=libmath/stubs.c libmath/nan.c libmath/signbit.c libmath/signbitf.c
depend:
	# Nothing here so far...

lint:
	# Nothing here so far...

tags:
	# Nothing here so far...

prereq: config.status
	cd ${.OBJDIR}/include && exec ${MAKE} ${MAKE_FLAGS} all
	
includes:
	cd ${.OBJDIR}/include && exec ${SUDO} ${MAKE} ${MAKE_FLAGS} install DESTDIR=${DESTDIR}
	cd ${.OBJDIR}/libsupc++ && exec ${SUDO} ${MAKE} ${MAKE_FLAGS} install-data DESTDIR=${DESTDIR}

clean cleandir:
	-@if [ -e Makefile ]; then ${MAKE} distclean; fi
	-rm -f ${CLEANFILES}

.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.ifndef NOMAN
.include <bsd.man.mk>
.endif