aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/objcopy
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-06-21 14:28:20 +0000
committerEd Maste <emaste@FreeBSD.org>2018-06-21 14:28:20 +0000
commit9b844631a61b29f0152fcbb9984e4eb09d4dc50d (patch)
tree4c6a19d5769043e8efed4d537b5dcbf65dbc1508 /usr.bin/objcopy
parent22c1b4c0f14966310c9455418bc966f41d2977af (diff)
Notes
Diffstat (limited to 'usr.bin/objcopy')
-rw-r--r--usr.bin/objcopy/Makefile42
-rw-r--r--usr.bin/objcopy/Makefile.depend27
2 files changed, 69 insertions, 0 deletions
diff --git a/usr.bin/objcopy/Makefile b/usr.bin/objcopy/Makefile
new file mode 100644
index 0000000000000..5fc78a0186d90
--- /dev/null
+++ b/usr.bin/objcopy/Makefile
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+ELFTCDIR= ${SRCTOP}/contrib/elftoolchain
+ELFCOPYDIR= ${ELFTCDIR}/elfcopy
+
+.PATH: ${ELFCOPYDIR}
+
+PROG= objcopy
+objcopy.1: elfcopy.1
+ sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \
+ -e 's/\.Nm elfcopy/.Nm objcopy/' < ${.ALLSRC} > ${.TARGET}
+CLEANFILES+= objcopy.1
+
+SRCS= archive.c ascii.c binary.c main.c pe.c sections.c segments.c symbols.c
+
+WARNS?= 5
+
+LIBADD= archive elftc elf pe
+
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/libpe -I${ELFTCDIR}/common
+CFLAGS+=-DWITH_PE=1
+
+MAN= ${PROG}.1 strip.1
+
+LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip
+
+# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
+# We need to link against the correct version of these files. One
+# solution is to include SRCTOP/sys in the include path. This causes
+# problems when a header file in sys depends on a file in another
+# part of the tree, e.g. a machine dependent header.
+#
+SRCS+= sys/elf_common.h
+CLEANDIRS= sys
+CFLAGS+= -I.
+sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
+ mkdir -p ${.OBJDIR}/sys
+ ln -sf ${.ALLSRC} ${.TARGET}
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/objcopy/Makefile.depend b/usr.bin/objcopy/Makefile.depend
new file mode 100644
index 0000000000000..1188b4e4157ed
--- /dev/null
+++ b/usr.bin/objcopy/Makefile.depend
@@ -0,0 +1,27 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libarchive \
+ lib/libbz2 \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libelf \
+ lib/libelftc \
+ lib/libexpat \
+ lib/liblzma \
+ lib/libpe \
+ lib/libthr \
+ lib/libz \
+ secure/lib/libcrypto \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif