aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTaylor C. Richberger <Taywee@gmx.com>2016-05-06 16:04:30 -0600
committerTaylor C. Richberger <Taywee@gmx.com>2016-05-06 16:04:30 -0600
commitd619e095c21ba623aac577f9572bc8acd59a5d16 (patch)
treeadcb2a1decc72cccbd08ef104d423d02e786229e /Makefile
parentbump version (diff)
downloadargs.hxx-d619e095c21ba623aac577f9572bc8acd59a5d16.tar.xz
improve installation and documentation1.2.4
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 25 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 42bce87..adf8a1f 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ OS = $(shell uname -s)
CC ?= cc
CXX ?= c++
-DESTDIR ?= /usr
+DESTDIR ?= /usr/local
FLAGS += -std=c++11
ifdef DEBUG
FLAGS += -ggdb -O0
@@ -19,7 +19,7 @@ OBJECTS = $(SOURCES:.cxx=.o)
DEPENDENCIES= $(SOURCES:.cxx=.d)
EXECUTABLE = test
-.PHONY: all clean pages runtests
+.PHONY: all clean pages runtests uninstall install installman
all: $(EXECUTABLE)
@@ -28,16 +28,33 @@ all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
-clean:
- rm $(EXECUTABLE) $(OBJECTS) $(DEPENDENCIES)
+uninstall:
+ -rm $(DESTDIR)/include/args.hxx
+ -rmdir $(DESTDIR)/include
+ -rm $(DESTDIR)/share/man/man3/args_*.3.bz2
+ -rmdir -p $(DESTDIR)/share/man/man3
-%.o: %.cxx
- $(CXX) $< -o $@ $(CFLAGS)
+install:
+ mkdir -p $(DESTDIR)/include
+ cp args.hxx $(DESTDIR)/include
+
+installman: doc/man
+ mkdir -p $(DESTDIR)/share/man/man3
+ cp doc/man/man3/*.3.bz2 $(DESTDIR)/share/man/man3
+
+clean:
+ rm -rv $(EXECUTABLE) $(OBJECTS) $(DEPENDENCIES) doc
pages:
doxygen Doxyfile
- cp -rv html/* .
- rm -r html
+ cp -rv doc/html/* .
+
+man:
+ doxygen Doxyfile
+ bzip2 doc/man/man3/*.3
runtests: test
./test
+
+%.o: %.cxx
+ $(CXX) $< -o $@ $(CFLAGS)