blob: 229bbb6853271664a1085695d469acddfa870eaa [file] [log] [blame]
diff -aruN a/Makefile b/Makefile
--- a/Makefile 2010-08-03 06:57:27.000000000 -0700
+++ b/Makefile 2010-11-04 08:16:03.930197265 -0700
@@ -1,19 +1,22 @@
CC=gcc
-FLAGS=-Wall
+FLAGS=-Wall ${CFLAGS}
EXEC_NAME=beep
-INSTALL_DIR=/usr/bin
+INSTALL_PREFIX=
+BIN_DIR=${INSTALL_PREFIX}/usr/bin
MAN_FILE=beep.1.gz
-MAN_DIR=/usr/man/man1
+MAN_DIR=${INSTALL_PREFIX}/usr/man/man1
-default : beep
+default : ${EXEC_NAME}
clean :
rm ${EXEC_NAME}
-beep : beep.c
+${EXEC_NAME} : beep.c
${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
-install :
- cp ${EXEC_NAME} ${INSTALL_DIR}
+install :
+ -mkdir -p ${BIN_DIR}
+ cp ${EXEC_NAME} ${BIN_DIR}
# rm -f /usr/man/man1/beep.1.bz2
+ -mkdir -p ${MAN_DIR}
cp ${MAN_FILE} ${MAN_DIR}