diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -6,38 +6,39 @@ SRC = queryt.c src/utils.c src/video.c libs/curl.c libs/string.c libs/json.c # Compiler CC = cc +CFLAGS = -Wall # Install Dir PREFIX = /usr/local # Libraries -LIBS = -lcurl -ljson-c +LDFLAGS = -lcurl -ljson-c +## Uncomment for OpenBSD +# LDFLAGS = -lcurl -ljson-c -I/usr/local/include -L/usr/local/lib # Binary Name BIN = queryt -## Uncomment for OpenBSD -# LIBS = -lcurl -ljson-c -I/usr/local/include -L/usr/local/lib # Compiled Code CLEAN = ${BIN} ${BIN}_debug # MakeOPTS build: clean - ${CC} -o ${BIN} ${SRC} ${LIBS} + ${CC} ${CFLAGS} -o ${BIN} ${SRC} ${LDFLAGS} debug: clean - ${CC} -g -o ${BIN}_debug ${SRC} ${LIBS} + ${CC} ${CFLAGS} -g -o ${BIN}_debug ${SRC} ${LDFLAGS} clean: rm -rf ${CLEAN} install: build mkdir -p ${PREFIX}/bin - cp -f queryt ${PREFIX}/bin + cp -f ${BIN} ${PREFIX}/bin chmod 755 ${PREFIX}/bin mkdir -p ${PREFIX}/share/man/man1 - cp -f queryt.1 ${PREFIX}/share/man/man1 + cp -f ${BIN}.1 ${PREFIX}/share/man/man1 chmod 644 ${PREFIX}/share/man/man1/${BIN}.1 uninstall: |