Home | History | Annotate | Line # | Download | only in gdb
Makefile revision 1.36
      1  1.36  christos #	$NetBSD: Makefile,v 1.36 2018/05/01 19:59:46 christos Exp $
      2   1.1        cl 
      3  1.36  christos .include <bsd.hostinit.mk>
      4   1.1        cl 
      5  1.19  christos MODULE=		gdb
      6  1.30       mrg GDBDIR=		${.CURDIR}/../../external/gpl3/${EXTERNAL_GDB_SUBDIR}
      7  1.30       mrg GNUHOSTDIST=    ${GDBDIR}/dist
      8   1.1        cl 
      9   1.1        cl FIND_ARGS=	\! \( -type d -name sim -prune \)
     10   1.1        cl 
     11   1.1        cl CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
     12   1.1        cl 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-,"
     13   1.1        cl 
     14   1.1        cl MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
     15   1.1        cl 
     16   1.1        cl ALL_TARGET=	all-gdb
     17   1.1        cl INSTALL_TARGET=	install-gdb
     18   1.1        cl 
     19  1.30       mrg .include "${GDBDIR}/Makefile.gdb_arch"
     20  1.30       mrg #GDB_MACHINE_ARCH=       ${MACHINE_ARCH:C/e?armv[4-7]h?f?/arm/}
     21  1.30       mrg 
     22  1.22    bouyer .include "${.CURDIR}/../Makefile.gmakehost"
     23  1.32  christos BUILD_MAKE=${TOOL_GMAKE}
     24  1.32  christos 
     25  1.32  christos BINENV=		/usr/bin/env -i
     26  1.32  christos 
     27  1.32  christos 
     28  1.34  christos MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:NC*:NLD*:Nam_cv_func_iconv*} \
     29  1.32  christos 			CC_FOR_BUILD=${HOST_CC:Q} \
     30  1.33  christos 			CXX_FOR_BUILD=${HOST_CXX:Q} \
     31  1.33  christos 			CFLAGS_FOR_BUILD="-I${TOOLDIR}/include" \
     32  1.32  christos 			CC=${CC:Q}' '${CCADDFLAGS:Q} \
     33  1.33  christos 			CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
     34  1.33  christos 			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
     35  1.33  christos 			CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
     36  1.33  christos 			AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
     37  1.32  christos 			MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
     38  1.33  christos 			NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \
     39  1.32  christos 			XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
     40  1.32  christos 			LIBS=-lintl \
     41  1.32  christos 			${MKNATIVE_CONFIGURE_PRESET}
     42  1.32  christos 
     43  1.32  christos MKENV_BUILD_MAKE=${MKNATIVE_ENV} ${BUILD_MAKE}
     44   1.1        cl 
     45  1.29  christos CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
     46  1.29  christos LDADDFLAGS+= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib
     47  1.28  christos CXXADDFLAGS+= -D__STDC_FORMAT_MACROS
     48  1.28  christos CXXADDFLAGS+= -D__STDC_LIMIT_MACROS
     49  1.28  christos CXXADDFLAGS+= -D__STDC_CONSTANT_MACROS
     50  1.29  christos HOST_CXXFLAGS+= ${CXXADDFLAGS}
     51   1.2   nathanw 
     52   1.2   nathanw NEWCONFIGDIR?=	${.CURDIR}/../..
     53   1.2   nathanw MKNATIVE?=	${.CURDIR}/mknative-gdb
     54   1.2   nathanw 
     55   1.7       uwe # Some configure tests require running a test program, which is not
     56   1.7       uwe # possible when cross-building.  Provide configure with "cached"
     57   1.7       uwe # values in the environment.
     58   1.7       uwe MKNATIVE_CONFIGURE_PRESET= \
     59   1.7       uwe 	ac_cv_prog_cc_cross=yes \
     60   1.7       uwe 	ac_cv_func_fork_works=yes \
     61   1.7       uwe 	ac_cv_func_strcoll_works=yes \
     62   1.7       uwe 	bash_cv_func_ctype_nonascii=yes \
     63   1.7       uwe 	bash_cv_func_sigsetjmp=present \
     64   1.7       uwe 	bash_cv_func_strcoll_broken=no \
     65   1.7       uwe 	bash_cv_must_reinstall_sighandlers=no
     66   1.7       uwe 
     67  1.34  christos CONFIGURE_ENV+=	am_cv_func_iconv=no
     68  1.31  jmcneill 
     69  1.17      hans # Recent versions of Solaris have ncurses, but they hide the lib in an
     70  1.17      hans # odd directory. Prevent configure from finding the ncurses headers,
     71  1.17      hans # Solaris curses is sufficient.
     72  1.17      hans .if ${BUILD_OSTYPE} == "SunOS"
     73  1.17      hans CONFIGURE_ENV+=	ac_cv_header_ncurses_h=no \
     74  1.17      hans 		ac_cv_header_ncurses_ncurses_h=no \
     75  1.17      hans 		ac_cv_header_ncurses_term_h=no
     76  1.17      hans .endif
     77  1.17      hans 
     78   1.8       uwe # Disable sim unless it's known to work (configure's default is to
     79   1.8       uwe # enable sim if supported).
     80   1.8       uwe CONFIGURE_ARGS_SIM=
     81   1.8       uwe .if \
     82   1.9     skrll     ${MACHINE_CPU} != "powerpc" && \
     83   1.8       uwe     ${MACHINE_CPU} != "powerpc64"
     84   1.8       uwe CONFIGURE_ARGS_SIM+= --disable-sim
     85   1.8       uwe .endif
     86   1.8       uwe 
     87   1.2   nathanw native-gdb: .native/.configure_done
     88   1.2   nathanw 	@echo 'Extracting GDB configury for a native toolchain.'
     89  1.32  christos 	MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \
     90  1.30       mrg 		${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} \
     91  1.30       mrg 		${GDB_MACHINE_ARCH}
     92   1.2   nathanw 
     93   1.2   nathanw .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
     94   1.3   nathanw 	mkdir ${.OBJDIR}/.native 2>/dev/null || true
     95   1.2   nathanw 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
     96  1.32  christos 		(cd ${.OBJDIR}/.native && \
     97  1.32  christos 			${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
     98   1.4   nathanw 			--prefix=/usr \
     99   1.5     lukem 			--with-separate-debug-dir=/usr/libdata/debug \
    100   1.8       uwe 			${CONFIGURE_ARGS_SIM} \
    101   1.2   nathanw 			--build=`${GNUHOSTDIST}/config.guess` \
    102   1.2   nathanw 			--host=${MACHINE_GNU_PLATFORM} \
    103  1.32  christos 			--target=${MACHINE_GNU_PLATFORM})
    104  1.32  christos 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
    105   1.7       uwe 		(cd ${.OBJDIR}/.native && \
    106  1.32  christos 			${MKENV_BUILD_MAKE} configure-host) && \
    107  1.32  christos 		(cd ${.OBJDIR}/.native/bfd && \
    108  1.32  christos 			${MKENV_BUILD_MAKE} bfd.h bfdver.h) && \
    109  1.32  christos 		(cd ${.OBJDIR}/.native/gdb && \
    110  1.32  christos 			${MKENV_BUILD_MAKE} init.c version.c)
    111   1.2   nathanw 	@touch $@
    112   1.2   nathanw 
    113   1.2   nathanw clean: clean.native
    114   1.2   nathanw clean.native:
    115   1.2   nathanw 	-rm -r -f .native
    116