summaryrefslogtreecommitdiff
path: root/usr.bin/objformat
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>1998-05-25 14:42:22 +0000
committerSøren Schmidt <sos@FreeBSD.org>1998-05-25 14:42:22 +0000
commit8d2cfc044cee21bc42295709185e4780a1b0f8fd (patch)
tree945227241d38805722f8be1131608f8a9fdf2f91 /usr.bin/objformat
parent7ac237e80fe2ec6e55e4240fa4a27f569f0ce572 (diff)
Notes
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 d9ba31bf80e8..e25e3f5520fb 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 92440d642637..d3535480582e 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) {