From cee1519fd9ca4e3e6a34cc13cba79ede42128b9f Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 9 Oct 2011 01:59:31 +0000 Subject: [PATCH] Add psim --- external/gpl3/gdb/bin/Makefile | 7 +++- external/gpl3/gdb/bin/psim/Makefile | 55 +++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 external/gpl3/gdb/bin/psim/Makefile diff --git a/external/gpl3/gdb/bin/Makefile b/external/gpl3/gdb/bin/Makefile index 6f877356de23..00323be6f6f4 100644 --- a/external/gpl3/gdb/bin/Makefile +++ b/external/gpl3/gdb/bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/09/26 03:02:44 christos Exp $ +# $NetBSD: Makefile,v 1.2 2011/10/09 01:59:31 christos Exp $ .include "../Makefile.inc" @@ -11,4 +11,9 @@ SUBDIR+= gdbtui #SUBDIR+= gdbserver +.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \ + ${MACHINE_ARCH} == powerpc64 +SUBDIR+= psim +.endif + .include diff --git a/external/gpl3/gdb/bin/psim/Makefile b/external/gpl3/gdb/bin/psim/Makefile new file mode 100644 index 000000000000..8d443a0c2982 --- /dev/null +++ b/external/gpl3/gdb/bin/psim/Makefile @@ -0,0 +1,55 @@ +# $NetBSD: Makefile,v 1.1 2011/10/09 01:59:31 christos Exp $ + +NOMAN= # defined + +.include +.include "../Makefile.inc" + +PROG= psim +SRCS= main.c + +HOST_CPPFLAGS+= -I. \ + -I${DIST}/sim/ppc -I${DIST}/include \ + -I${.CURDIR}/../../lib/libsim/arch/${MACHINE_ARCH} \ + -I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \ + -I${DIST}/bfd \ + -I${.CURDIR}/../../lib/libgdb \ + -I${DIST}/gdb \ + -I${DIST}/gdb/config \ + -I${DIST}/sim/common \ + -I${LIBSIMDIR} +PSIM_DEFINES= -DHAVE_CONFIG_H \ + -DHAVE_COMMON_FPU \ + -DDEFAULT_INLINE=PSIM_INLINE_LOCALS \ + -DWITH_HOST_BYTE_ORDER=BYTE_ORDER \ + -DWITH_SMP=5 \ + -DHAVE_TERMIOS_STRUCTURE \ + -DHAVE_DEVZERO +CPPFLAGS+= ${HOST_CPPFLAGS} ${PSIM_DEFINES} + +SRCS+=version.c + +.include + +LIBSIMDIR!= cd ${.CURDIR}/../../lib/libsim && ${PRINTOBJDIR} + +LDADD+= -L${LIBSIMDIR} -lsim +DPADD+= ${LIBSIMDIR}/libsim.a + +LIBBFDDIR!= cd ${.CURDIR}/../../lib/libbfd && ${PRINTOBJDIR} +LDADD+= -L${LIBBFDDIR} -lbfd +DPADD+= ${LIBBFDDIR}/libbfd.a + +LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR} +LDADD+= -L${LIBIBERTYDIR} -liberty +DPADD+= ${LIBIBERTYDIR}/libiberty.a + +LDADD+= -lintl +DPADD+= ${LIBINTL} + +CLEANFILES+= version.c + +version.c: ${DIST}/gdb/version.in + echo 'const char version[] = "'$$(cat ${.ALLSRC})'";' > ${.TARGET} + +.PATH: ${DIST}/sim/ppc