]> git.cworth.org Git - glenv/commitdiff
Add a "make install" target for glenv
authorCarl Worth <cworth@cworth.org>
Wed, 4 Sep 2013 23:55:35 +0000 (16:55 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 4 Sep 2013 23:55:35 +0000 (16:55 -0700)
Simply copy the glenv binary and the libglenv.so library to
${PREFIX}/bin and ${PREFIX}/lib respectively.

Makefile

index 50e21941ee7e0153a3f1e810835299ccc91ac6bd..d03d78d485df2ad4ec68447e17b07dff0fda5aff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,5 +33,12 @@ glenv: glenv.c
 libglenv.so: glwrap.c
        $(CC) $(GLENV_CFLAGS) $(GLENV_LDFLAGS) -fPIC -shared -Wl,-Bsymbolic -o $@ $<
 
+.PHONY: install
+install: all
+       mkdir -p $(DESTDIR)$(BINDIR)
+       install -m07555 glenv $(DESTDIR)$(BINDIR)
+       mkdir -p $(DESTDIR)$(LIBDIR)
+       install -m0644 libglenv.so $(DESTDIR)$(LIBDIR)
+
 clean:
        rm -f $(TARGETS)