summaryrefslogtreecommitdiffstats
path: root/usr.bin/objformat
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1998-05-25 14:42:22 +0000
committersos <sos@FreeBSD.org>1998-05-25 14:42:22 +0000
commite93c797887b52fcac9eed98a646e0c11777f30c9 (patch)
treedf8d1165a372161c4b9c6ed3737fa1fd9a048aab /usr.bin/objformat
parent60d78a8916a3ac6d725e00bd64b76c06ead142ad (diff)
downloadFreeBSD-src-e93c797887b52fcac9eed98a646e0c11777f30c9.zip
FreeBSD-src-e93c797887b52fcac9eed98a646e0c11777f30c9.tar.gz
Make objformat DTRT when in the make world environment.
Diffstat (limited to 'usr.bin/objformat')
-rw-r--r--usr.bin/objformat/Makefile16
-rw-r--r--usr.bin/objformat/objformat.c2
2 files changed, 14 insertions, 4 deletions
diff --git a/usr.bin/objformat/Makefile b/usr.bin/objformat/Makefile
index d9ba31b..e25e3f5 100644
--- a/usr.bin/objformat/Makefile
+++ b/usr.bin/objformat/Makefile
@@ -2,7 +2,11 @@
PROG= objformat
NOMAN= not yet
-CFLAGS+= -DMAIN
+CFLAGS+= -DMAIN -DROOTDIR=\"${DESTDIR}/usr/libexec/\"
+
+beforeinstall:
+ $(CC) -DMAIN -DROOTDIR=\"${DESTDIR}/usr/libexec/\" \
+ ${.CURDIR}/objformat.c -o ${.OBJDIR}/objformat
.if ${BINFORMAT} == elf
CFLAGS+= -DFREEBSD_ELF
@@ -10,7 +14,13 @@ CFLAGS+= -DFREEBSD_ELF
CFLAGS+= -DFREEBSD_AOUT
.endif
-# LINKS+= /usr/bin/objformat /usr/bin/as
-# LINKS+= /usr/bin/objformat /usr/bin/ld
+LINKS+= /usr/bin/objformat /usr/bin/ar
+LINKS+= /usr/bin/objformat /usr/bin/as
+LINKS+= /usr/bin/objformat /usr/bin/ld
+LINKS+= /usr/bin/objformat /usr/bin/nm
+LINKS+= /usr/bin/objformat /usr/bin/ranlib
+LINKS+= /usr/bin/objformat /usr/bin/size
+LINKS+= /usr/bin/objformat /usr/bin/strings
+LINKS+= /usr/bin/objformat /usr/bin/strip
.include <bsd.prog.mk>
diff --git a/usr.bin/objformat/objformat.c b/usr.bin/objformat/objformat.c
index 92440d6..d353548 100644
--- a/usr.bin/objformat/objformat.c
+++ b/usr.bin/objformat/objformat.c
@@ -138,7 +138,7 @@ main(int argc, char **argv)
/* 'make world' glue */
objformat_path = getenv("OBJFORMAT_PATH");
if (objformat_path == NULL)
- objformat_path = "/usr/libexec";
+ objformat_path = ROOTDIR;
path = strdup(objformat_path);
if (objformat_aout) {
OpenPOWER on IntegriCloud