$ gcc program.c $(pkg-config monocypher --cflags) -c
$ gcc program.o $(pkg-config monocypher --libs) -o program
+If for any reason you wish to avoid installing the man pages or the
+`pkg-config` file, you can use the following installation sub targets
+instead: `install-lib`, `install-doc`, and `install-pc`.
+
Test suite
----------
SONAME=libmonocypher.so.4
.PHONY: all library static-library dynamic-library \
- install install-doc \
+ install install-lib install-pc install-doc \
check test tis-ci ctgrind \
clean uninstall dist
#############
## Install ##
#############
-install: library src/monocypher.h monocypher.pc install-doc
+install: install-lib install-pc install-doc
+
+install-lib: library src/monocypher.h
mkdir -p $(DESTDIR)/$(INCLUDEDIR)
mkdir -p $(DESTDIR)/$(LIBDIR)
- mkdir -p $(DESTDIR)/$(PKGCONFIGDIR)
cp -P lib/libmonocypher.a lib/libmonocypher.so* $(DESTDIR)/$(LIBDIR)
- cp src/monocypher.h $(DESTDIR)/$(INCLUDEDIR)
- cp src/optional/monocypher-ed25519.h $(DESTDIR)/$(INCLUDEDIR)
+ cp -P src/monocypher.h $(DESTDIR)/$(INCLUDEDIR)
+ cp -P src/optional/monocypher-ed25519.h $(DESTDIR)/$(INCLUDEDIR)
+
+install-pc: monocypher.pc
+ mkdir -p $(DESTDIR)/$(PKGCONFIGDIR)
sed "s|PREFIX|$(PREFIX)|" monocypher.pc \
- > $(DESTDIR)/$(PKGCONFIGDIR)/monocypher.pc
+ > $(DESTDIR)/$(PKGCONFIGDIR)/monocypher.pc
+
install-doc: doc/man3/intro.3monocypher
mkdir -p $(DESTDIR)/$(MANDIR)