]> git.sur5r.net Git - openldap/blobdiff - libraries/libmdb/Makefile
Add install target
[openldap] / libraries / libmdb / Makefile
index 5c206f223893e2127b337562bb251d79ed5fea0d..501921767068823e794da3f2b7f504ceaa25014d 100644 (file)
@@ -4,9 +4,18 @@ OPT = -O2 -g
 CFLAGS = -pthread $(OPT) $(W) $(XCFLAGS)
 LDLIBS =
 SOLIBS =
-
-PROGS  = mdb_stat mdb_copy mtest mtest2 mtest3 mtest4 mtest5
-all:   liblmdb.a liblmdb.so $(PROGS)
+prefix = /usr/local
+
+IHDRS  = lmdb.h
+ILIBS  = liblmdb.a liblmdb.so
+IPROGS = mdb_stat mdb_copy
+PROGS  = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
+all:   $(ILIBS) $(PROGS)
+
+install: $(ILIBS) $(IPROGS) $(IHDRS)
+       cp $(IPROGS) $(prefix)/bin
+       cp $(ILIBS) $(prefix)/lib
+       cp $(IHDRS) $(prefix)/include
 
 clean:
        rm -rf $(PROGS) *.[ao] *.so *~ testdb