# $OpenBSD: Makefile.bsd-wrapper,v 1.21 2006/07/17 09:47:57 espie Exp $ MAN= cpp.1 gcc.1 protoize.1 gcov.1 MLINKS+= gcc.1 cc.1 MLINKS+= protoize.1 unprotoize.1 .if defined(BOOTSTRAP) LANGUAGES=--enable-languages=c .else LANGUAGES=--enable-languages='c,c++,objc,f77' MAN+= cp/g++.1 f/g77.1 MLINKS+= g++.1 c++.1 MLINKS+= g77.1 f77.1 .endif FAKE_FILES= /usr/share/info/cppinternals.info \ /usr/share/info/gccint.info LIBIBERTY_INCLUDES=${.CURDIR}/../../lib/libiberty/include GNUCFLAGS= ${CFLAGS} ${COPTS} -DOPENBSD_NATIVE \ -I${LIBIBERTY_INCLUDES} VAXHOST_CFLAGS= -DIN_GCC -DOPENBSD_NATIVE -DHAVE_CONFIG_H -O0 MAKE_FLAGS= CFLAGS="${GNUCFLAGS}" \ CC="${CC}" LDFLAGS="${LDSTATIC}" \ DEMANGLER_PROG= \ DEMANGLE_H= \ LIBIBERTY_INCLUDES=${LIBIBERTY_INCLUDES} \ build_infodir=. \ MAKEINFO='makeinfo --no-split' .if ${MACHINE_ARCH} == "vax" MAKE_FLAGS+= HOST_CFLAGS="${VAXHOST_CFLAGS} -I${LIBIBERTY_INCLUDES}" .endif GXX_INCDIR= /usr/include/g++ CLEANFILES= .gdbinit */.gdbinit *.info* \ c-parse.c c-parse.h c-parse.y cexp.c cp/parse.c cp/parse.h \ f/*.info* objc-parse.c objc-parse.y target_path \ genrtl.c genrtl.h fixinc.sh fixinc/Makefile \ po/Makefile po/Makefile.in po/POTFILES CXX_HEADERS= ${.CURDIR}/cp/inc/typeinfo ${.CURDIR}/cp/inc/exception \ ${.CURDIR}/cp/inc/new ${.CURDIR}/cp/inc/new.h .if ${MACHINE} == "arc" || ${MACHINE} == "pmax" || ${MACHINE} == "wgrisc" M_ARCH= mipsel .elif ${MACHINE} == "hkmips" || ${MACHINE} == "sgi" M_ARCH= mips .else M_ARCH= ${MACHINE_ARCH} .endif GCCARCH= ${M_ARCH}-unknown-openbsd${OSREV} all: config.status exec ${MAKE} ${MAKE_FLAGS} all doc tconfig.h: config.status exec ${MAKE} ${MAKE_FLAGS} tconfig.h tree-check.h: config.status exec ${MAKE} ${MAKE_FLAGS} $@ .FORCE: .IGNORE .include .ifdef GLOBAL_AUTOCONF_CACHE CF= --cache-file=${GLOBAL_AUTOCONF_CACHE} .else CF= .endif config.status: Makefile.in configure c-parse.in PATH="/bin:/usr/bin:/sbin:/usr/sbin" \ INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \ MAKEINFO='makeinfo --no-split' \ /bin/sh ${.CURDIR}/configure --with-gnu-as --with-gnu-ld \ --prefix=/usr --mandir='$$(prefix)/share/man' \ --with-local-prefix=/usr ${CF} \ ${LANGUAGES} --enable-cpp --disable-nls \ --with-gxx-include-dir=${GXX_INCDIR} ${GCCARCH} && touch config.status includes: @-for i in ${CXX_HEADERS}; do \ j=`basename $$i` \ cmp -s $$i ${DESTDIR}/${GXX_INCDIR}/$$j || \ ${INSTALL} ${INSTALL_COPY} -m 444 $$i \ ${DESTDIR}/${GXX_INCDIR}; \ done .ifdef NOMAN maninstall: @echo NOMAN is set .endif # XXX INSTALL_TARGET should be install-normal, more or less # the only reason is not so is because our man handling is special # (pre-formatted) and also because of cpp, that we install by hand # elsewhere, until we get rid of that old `compatibility' script. target_path: Makefile __target=`sed -n '/^target=/s/target=//p' Makefile`; \ __version=`sed -n '/^gcc_version=/s/gcc_version=//p' Makefile`; \ echo /usr/lib/gcc-lib/$$__target/$$__version >target_path install: maninstall target_path ${MAKE} ${MAKE_FLAGS} \ prefix=${DESTDIR}/usr \ INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \ infodir=${DESTDIR}/usr/share/info \ tooldir=/tmp assertdir=/tmp \ INSTALL_TARGET='install-common $$(INSTALL_HEADERS) \ $$(INSTALL_LIBGCC) install-info \ intl.install lang.install-normal' \ NO_TARGET_GCC=true bindir=${DESTDIR}/usr/bin \ install chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/lib/gcc-lib chmod -R a+rX ${DESTDIR}/usr/lib/gcc-lib # if [ -e ${DESTDIR}/usr/lib/libf2c.a ]; then \ # chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/lib/libf2c.a; \ # chmod 444 ${DESTDIR}/usr/lib/libf2c.a; \ # fi if [ -e ${DESTDIR}/usr/include/f2c.h ]; then \ chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include/f2c.h; \ chmod 444 ${DESTDIR}/usr/include/f2c.h; \ fi ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -m 755 cpp \ ${DESTDIR}/usr/libexec/cpp ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -m 755 xgcc \ ${DESTDIR}/usr/bin/gcc ln -f ${DESTDIR}/usr/bin/gcc ${DESTDIR}/usr/bin/cc [ -f ${DESTDIR}/usr/bin/g77 ] && \ ln -f ${DESTDIR}/usr/bin/g77 ${DESTDIR}/usr/bin/f77 # ln -fs `cat target-path`/cpp \ # ${DESTDIR}/usr/libexec for i in ${FAKE_FILES}; do \ touch ${DESTDIR}$$i; \ done clean cleandir: -@if [ -e Makefile ]; then ${MAKE} distclean; fi -rm -f ${CLEANFILES} depend: ln -sf ${.CURDIR}/cccp.1 ${.OBJDIR}/cpp.1 lint: # Nothing here so far... tags: # Nothing here so far... .include .include .ifndef NOMAN .include .endif