Introduction
Introduction Statistics Contact Development Disclaimer Help
Makefile: add install and uninstall rule, remove TODO - sub - subscene.com subt…
git clone git://git.codemadness.org/sub
Log
Files
Refs
README
LICENSE
---
commit 0949ea1b085c5a0cd8194f829f57062f473481db
parent eca3be95a8429e72bea2b29251e31d708208e346
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 4 May 2018 17:39:37 +0200
Makefile: add install and uninstall rule, remove TODO
Diffstat:
M Makefile | 23 ++++++++++++++++++++---
D TODO | 1 -
2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/Makefile b/Makefile
@@ -1,6 +1,23 @@
+PREFIX = /usr/local
+
+BIN = sub
+SCRIPTS = \
+ sub-dl \
+ sub-search
+
+all: build
+
build: clean
- cc -c xml.c util.c sub.c ${CFLAGS}
- cc -o sub xml.o util.o sub.o ${LDFLAGS}
+ $(CC) -c xml.c util.c sub.c ${CFLAGS}
+ $(CC) -o $(BIN) xml.o util.o sub.o ${LDFLAGS}
clean:
- rm -f sub *.o
+ rm -f $(BIN) *.o
+
+install: all
+ mkdir -p "${DESTDIR}${PREFIX}/bin"
+ cp -f ${BIN} ${SCRIPTS} "${DESTDIR}${PREFIX}/bin"
+ for f in $(BIN) $(SCRIPTS); do chmod 755 "${DESTDIR}${PREFIX}/bin/$$f"…
+
+uninstall:
+ for f in $(BIN) $(SCRIPTS); do rm -f "${DESTDIR}${PREFIX}/bin/$$f"; do…
diff --git a/TODO b/TODO
@@ -1 +0,0 @@
-- suckless Makefile
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.