etc/services - sync with NetBSD-8
[minix.git] / external / gpl3 / binutils / lib / libbfd / Makefile
blob616122a3ebb981db3f007b0e8e4971930e3e7cd3
1 # $NetBSD: Makefile,v 1.13 2015/03/28 07:03:23 matt Exp $
3 NOLINKLIB= # defined
4 NOLINT= # defined
5 NOMAN= # defined
6 NOPROFILE= # defined
7 NOCLANGERROR= # defined
9 .include <bsd.own.mk>
11 # If the platform does not support shared libraries, we need to supply
12 # *something* for BFD-using programs to link against. Also provide an
13 # empty libinstall target so that libbfd.a does not get installed.
14 .if ${MKPIC} == "no"
15 MKLINKLIB= yes
16 libinstall: # do nothing
17 .endif
19 LIB= bfd
21 BFD_MACHINE_ARCH?= ${MACHINE_ARCH:C/armv[4-7]/arm/}
23 DEFS_MK=${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk
25 .if exists(${DEFS_MK})
26 .include "${DEFS_MK}"
28 DIST= ${NETBSDSRCDIR}/external/gpl3/binutils/dist
30 .if defined(__MINIX)
31 # MINIX: make sure sources are fetched, even when tools not built earlier
32 GNUHOSTDIST= ${DIST}
33 .include "${.CURDIR}/../../../../../minix/Makefile.fetchgnu"
34 .endif # defined(__MINIX)
36 SHLIB_MAJOR= 13
37 SHLIB_MINOR= 0
39 LIBDPLIBS+= z ${.CURDIR}/../../../../../lib/libz
41 GCPPFLAGS= ${G_archdefs} ${G_DEFS} ${G_INCLUDES} ${G_TDEFAULTS}
42 CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
43 -I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \
44 -DDEBUGDIR=\"${DEBUGDIR}\"
46 .if (${BFD_MACHINE_ARCH} == "vax")
47 CPPFLAGS.elf.c += -O0
48 .endif
50 GSRCS= ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \
51 ${G_libbfd_la_DEPENDENCIES:M*.lo}
52 SRCS= ${GSRCS:.lo=.c}
54 DPSRCS+= elf32-target.h elf64-target.h targmatch.h \
55 elf32-ia64.c elf64-ia64.c peigen.c pepigen.c \
56 pex64igen.c
57 CLEANFILES+= elf32-target.h elf64-target.h targmatch.h \
58 elf32-ia64.c elf64-ia64.c peigen.c pepigen.c \
59 pex64igen.c
61 TEXINFO= bfd.texinfo
62 INFOFLAGS= -I${DIST}/bfd/doc
64 .PATH: ${DIST}/bfd ${DIST}/bfd/doc
66 .include <bsd.lib.mk>
67 .include <bsd.info.mk>
69 ${OBJS} ${SOBJS}: elf32-target.h elf64-target.h
70 targets.o targets.pico: targmatch.h Makefile
71 .else
72 .include <bsd.prog.mk> # do nothing
73 .endif
75 targmatch.h: config.bfd targmatch.sed
76 ${_MKTARGET_CREATE}
77 ${TOOL_SED} -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} >$@
79 elf32-target.h: elfxx-target.h
80 ${_MKTARGET_CREATE}
81 ${TOOL_SED} -e s/NN/32/g < $> > $@
83 elf64-target.h: elfxx-target.h
84 ${_MKTARGET_CREATE}
85 ${TOOL_SED} -e s/NN/64/g < $> > $@
87 elf32-ia64.c: elfnn-ia64.c
88 ${_MKTARGET_CREATE}
89 ${TOOL_SED} -e s/NN/32/g < $> > $@
91 elf64-ia64.c: elfnn-ia64.c
92 ${_MKTARGET_CREATE}
93 ${TOOL_SED} -e s/NN/64/g < $> > $@
95 elf32-riscv.c: elfnn-riscv.c
96 ${_MKTARGET_CREATE}
97 ${TOOL_SED} -e s/NN/32/g < $> > $@
99 elf64-riscv.c: elfnn-riscv.c
100 ${_MKTARGET_CREATE}
101 ${TOOL_SED} -e s/NN/64/g < $> > $@
103 peigen.c: peXXigen.c
104 ${_MKTARGET_CREATE}
105 ${TOOL_SED} -e s/XX/pe/g < $> > $@
107 pepigen.c: peXXigen.c
108 ${_MKTARGET_CREATE}
109 ${TOOL_SED} -e s/XX/pep/g < $> > $@
111 pex64igen.c: peXXigen.c
112 ${_MKTARGET_CREATE}
113 ${TOOL_SED} -e s/XX/pex64/g < $> > $@
115 .if defined(__MINIX) && ${USETOOLS} != "yes"
116 # Trigger the fetch phase, even when not building tools
117 ${SRCS} realdepend realall realinstall: ${fetch_done}
118 .endif # defined(__MINIX)