1 1.18 christos # $NetBSD: Makefile,v 1.18 2024/08/27 17:07:07 christos Exp $ 2 1.1 christos 3 1.1 christos .include <bsd.own.mk> 4 1.1 christos .include "../Makefile.inc" 5 1.1 christos 6 1.1 christos LIBISPRIVATE= yes 7 1.1 christos 8 1.1 christos LIB= bfd 9 1.1 christos 10 1.3 matt .include "${.CURDIR}/arch/${GDB_MACHINE_ARCH}/defs.mk" 11 1.1 christos 12 1.1 christos GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS} 13 1.3 matt CPPFLAGS+= -I${.CURDIR}/arch/${GDB_MACHINE_ARCH} -I${DIST}/include -I. \ 14 1.1 christos -I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \ 15 1.10 christos -DDEBUGDIR=\"/usr/libdata/debug\" -DBINDIR=\"${BINDIR}\" \ 16 1.10 christos -DLIBDIR=\"/usr/libexec\" 17 1.1 christos 18 1.1 christos GSRCS= ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \ 19 1.1 christos ${G_libbfd_la_DEPENDENCIES:M*.lo} 20 1.1 christos SRCS= ${GSRCS:.lo=.c} 21 1.1 christos 22 1.1 christos DPSRCS+= elf32-target.h elf64-target.h targmatch.h \ 23 1.13 skrll elf32-aarch64.c elf64-aarch64.c \ 24 1.13 skrll elf32-ia64.c elf64-ia64.c \ 25 1.14 skrll elf32-riscv.c elf64-riscv.c \ 26 1.9 christos peigen.c pex64igen.c 27 1.1 christos CLEANFILES+= elf32-target.h elf64-target.h targmatch.h \ 28 1.13 skrll elf32-aarch64.c elf64-aarch64.c \ 29 1.13 skrll elf32-ia64.c elf64-ia64.c \ 30 1.14 skrll elf32-riscv.c elf64-riscv.c \ 31 1.9 christos peigen.c pex64igen.c 32 1.1 christos 33 1.1 christos .PATH: ${DIST}/bfd 34 1.1 christos 35 1.1 christos .include <bsd.lib.mk> 36 1.1 christos 37 1.7 tron COPTS+= -Wno-stack-protector 38 1.7 tron 39 1.1 christos ${OBJS} ${SOBJS}: elf32-target.h elf64-target.h 40 1.1 christos targets.o targets.pico: targmatch.h Makefile 41 1.1 christos 42 1.1 christos targmatch.h: config.bfd targmatch.sed 43 1.1 christos ${_MKTARGET_CREATE} 44 1.1 christos ${TOOL_SED} -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} >$@ 45 1.1 christos 46 1.1 christos elf32-target.h: elfxx-target.h 47 1.1 christos ${_MKTARGET_CREATE} 48 1.1 christos ${TOOL_SED} -e s/NN/32/g < $> > $@ 49 1.1 christos 50 1.1 christos elf64-target.h: elfxx-target.h 51 1.1 christos ${_MKTARGET_CREATE} 52 1.1 christos ${TOOL_SED} -e s/NN/64/g < $> > $@ 53 1.1 christos 54 1.13 skrll elf64-aarch64.c: elfnn-aarch64.c 55 1.13 skrll ${_MKTARGET_CREATE} 56 1.13 skrll ${TOOL_SED} -e s/NN/64/g < $> > $@ 57 1.13 skrll 58 1.13 skrll elf32-aarch64.c: elfnn-aarch64.c 59 1.13 skrll ${_MKTARGET_CREATE} 60 1.13 skrll ${TOOL_SED} -e s/NN/32/g < $> > $@ 61 1.13 skrll 62 1.17 christos elf32-ia64.c: elfnn-ia64.c 63 1.1 christos ${_MKTARGET_CREATE} 64 1.1 christos ${TOOL_SED} -e s/NN/32/g < $> > $@ 65 1.1 christos 66 1.17 christos elf64-ia64.c: elfnn-ia64.c 67 1.1 christos ${_MKTARGET_CREATE} 68 1.1 christos ${TOOL_SED} -e s/NN/64/g < $> > $@ 69 1.1 christos 70 1.14 skrll elf32-riscv.c: elfnn-riscv.c 71 1.14 skrll ${_MKTARGET_CREATE} 72 1.14 skrll ${TOOL_SED} -e s/NN/32/g < $> > $@ 73 1.14 skrll 74 1.14 skrll elf64-riscv.c: elfnn-riscv.c 75 1.14 skrll ${_MKTARGET_CREATE} 76 1.14 skrll ${TOOL_SED} -e s/NN/64/g < $> > $@ 77 1.14 skrll 78 1.2 christos peigen.c: peXXigen.c 79 1.2 christos ${_MKTARGET_CREATE} 80 1.2 christos ${TOOL_SED} -e s/XX/pe/g < $> > $@ 81 1.1 christos 82 1.16 christos pepigen.c: peXXigen.c 83 1.16 christos ${_MKTARGET_CREATE} 84 1.16 christos ${TOOL_SED} -e s/XX/pep/g < $> > $@ 85 1.16 christos 86 1.1 christos pex64igen.c: peXXigen.c 87 1.1 christos ${_MKTARGET_CREATE} 88 1.1 christos ${TOOL_SED} -e s/XX/pex64/g < $> > $@ 89 1.15 christos 90 1.15 christos pe-aarch64igen.c: peXXigen.c 91 1.15 christos ${_MKTARGET_CREATE} 92 1.15 christos ${TOOL_SED} -e s/XX/peAArch64/g < $> > $@ 93 1.18 christos 94 1.18 christos pe-riscv64igen.c: peXXigen.c 95 1.18 christos ${_MKTARGET_CREATE} 96 1.18 christos ${TOOL_SED} -e s/XX/peRiscV64/g < $> > $@ 97