1 # $NetBSD: Makefile,v 1.11 2026/03/13 22:08:57 christos Exp $ 2 3 NOMAN= # defined 4 5 .include <bsd.own.mk> 6 .include "../Makefile.inc" 7 8 PROG= psim 9 SRCS= main.c 10 11 HOST_CPPFLAGS+= -I. \ 12 -I${DIST}/sim/ppc -I${DIST}/include \ 13 -I${.CURDIR}/../../lib/libsim/arch/${MACHINE_ARCH} \ 14 -I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \ 15 -I${.CURDIR}/../../lib/libgnulib/arch/${MACHINE_ARCH} \ 16 -I${DIST}/bfd \ 17 -I${.CURDIR}/../../lib/libgdb \ 18 -I${DIST}/gdb \ 19 -I${DIST}/gdb/config \ 20 -I${DIST}/sim/common \ 21 -I${LIBSIMDIR} 22 PSIM_DEFINES= -DHAVE_CONFIG_H \ 23 -DHAVE_COMMON_FPU \ 24 -DDEFAULT_INLINE=PSIM_INLINE_LOCALS \ 25 -DWITH_HOST_BYTE_ORDER=BYTE_ORDER \ 26 -DWITH_SMP=5 \ 27 -DSIM_COMMON_BUILD \ 28 -DHAVE_TERMIOS_STRUCTURE \ 29 -DHAVE_DEVZERO \ 30 -DRETSIGTYPE=void \ 31 -DWITH_STDIO=0 32 33 CPPFLAGS+= ${HOST_CPPFLAGS} ${PSIM_DEFINES} 34 35 # /home/source/ab/HEAD-llvm/src/external/gpl3/gdb/bin/psim/../../dist/include/sim/sim.h:37:27: error: redefinition of typedef 'SIM_DESC' is a C11 feature [-Werror,-Wtypedef-redefinition] 36 # typedef struct sim_state *SIM_DESC; 37 # ^ 38 # /home/source/ab/HEAD-llvm/src/external/gpl3/gdb/bin/psim/../../dist/sim/ppc/sim_callbacks.h:106:27: note: previous definition is here 39 # typedef struct sim_state *SIM_DESC; 40 # ^ 41 # 42 # XXX remove me when we use -std=c11 or -std=gnu11 or something 43 CWARNFLAGS.clang+= -Wno-error=typedef-redefinition 44 45 SRCS+=version.c 46 47 GDBLIBDIR= ${.CURDIR}/../../lib 48 PROGDPLIBS+= sim ${GDBLIBDIR}/libsim \ 49 bfd ${GDBLIBDIR}/libbfd \ 50 sframe ${GDBLIBDIR}/libsframe \ 51 iberty ${GDBLIBDIR}/libiberty \ 52 53 .include <bsd.prog.mk> 54 55 56 LDADD+= -lintl -lz 57 DPADD+= ${LIBINTL} ${LIBZ} 58 59 CLEANFILES+= version.c 60 61 version.c: ${DIST}/gdb/version.in 62 echo 'const char version[] = "'$$(cat ${.ALLSRC})'";' > ${.TARGET} 63 64 .PATH: ${DIST}/sim/ppc 65