--- Makefile.orig 2005-10-29 12:13:15.000000000 -0500 +++ Makefile 2011-01-21 03:08:54.000000000 -0600 @@ -3,7 +3,7 @@ # CC = gcc -LD = gcc +LD = $(CC) INSTALL = cp -f INSTALL_PROGRAM = $(INSTALL) @@ -16,7 +16,7 @@ LDLIBS = -CFLAGS = -Wall -pedantic $(OPT) -D$(DB) +CFLAGS = -Wall $(OPT) -D$(DB) LDFLAGS = OBJS =\ @@ -36,16 +36,19 @@ LOCAL_INSTALL_DIR = $(HOME)/bin LOCAL_RESOURCES_DIR = $(HOME)/.antiword -GLOBAL_INSTALL_DIR = /usr/local/bin -GLOBAL_RESOURCES_DIR = /usr/share/antiword +BINDIR = ${prefix}/bin +DATADIR = ${prefix}/share/antiword +MAN1DIR = ${prefix}/share/man/man1/ all: $(PROGS) install: all - mkdir -p $(LOCAL_INSTALL_DIR) - cp -pf $(PROGS) $(LOCAL_INSTALL_DIR) - mkdir -p $(LOCAL_RESOURCES_DIR) - cp -pf Resources/* $(LOCAL_RESOURCES_DIR) + install -m 755 -d ${BINDIR} + install -m 755 ${PROGS} ${BINDIR} + install -m 755 -d ${DATADIR} + install -m 644 Resources/*.txt ${DATADIR} + install -m 755 -d ${MAN1DIR} + install -m 644 Docs/antiword.1 ${MAN1DIR} # NOTE: you might have to be root to do this global_install: all