]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/objcopy/Makefile
ifconfig(8): wordsmith -G and -g descriptions
[FreeBSD/FreeBSD.git] / usr.bin / objcopy / Makefile
1
2 .include <src.opts.mk>
3
4 PACKAGE=        elftoolchain
5
6 ELFTCDIR=       ${SRCTOP}/contrib/elftoolchain
7 ELFCOPYDIR=     ${ELFTCDIR}/elfcopy
8
9 .PATH: ${ELFCOPYDIR}
10
11 PROG=   objcopy
12 objcopy.1: elfcopy.1
13         sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \
14             -e '/\.Nm elfcopy ,/d' < ${.ALLSRC} > ${.TARGET}
15 CLEANFILES+= objcopy.1
16
17 SRCS=   archive.c ascii.c binary.c main.c pe.c sections.c segments.c symbols.c
18
19 WARNS?= 5
20
21 LIBADD= archive elftc elf pe
22
23 CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/libpe -I${ELFTCDIR}/common
24 CFLAGS+=-DWITH_PE=1
25
26 MAN=    ${PROG}.1 strip.1
27
28 LINKS=  ${BINDIR}/${PROG} ${BINDIR}/strip
29
30 # This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
31 # We need to link against the correct version of these files. One
32 # solution is to include SRCTOP/sys in the include path. This causes
33 # problems when a header file in sys depends on a file in another
34 # part of the tree, e.g. a machine dependent header.
35 #
36 SRCS+=          sys/elf_common.h
37 CLEANDIRS=      sys
38 CFLAGS+=        -I.
39 sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
40         mkdir -p ${.OBJDIR}/sys
41         ln -sf ${.ALLSRC} ${.TARGET}
42
43 .include <bsd.prog.mk>