diff options
-rw-r--r-- | usr.bin/objformat/Makefile | 16 | ||||
-rw-r--r-- | usr.bin/objformat/objformat.c | 2 |
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) { |