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