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