From cebab6f35a4b3e343d1a85cad21919a3dc5122c8 Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Sat, 7 Apr 2018 11:40:46 +0200 Subject: Final Makefile fixes. Packaging should be much easier now --- glcdgraphics/Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'glcdgraphics') diff --git a/glcdgraphics/Makefile b/glcdgraphics/Makefile index 2d6e7ff..cba3a37 100644 --- a/glcdgraphics/Makefile +++ b/glcdgraphics/Makefile @@ -2,11 +2,11 @@ # Makefile for the GraphLCD graphics library # --include ../Make.config +include ../Make.config # External image lib to use: imagemagick, graphicsmagick, or none # (two ifdef/endif are used because older installations may not support 'else ifdef') -IMAGELIB = +IMAGELIB = ifdef HAVE_GRAPHICSMAGICK IMAGELIB = graphicsmagick endif @@ -73,18 +73,18 @@ $(LIBNAME): $(OBJS) ln -sf $(LIBNAME) $(BASENAME) install: all - install -d $(LIBDIR) - install -m 755 $(LIBNAME) $(LIBDIR)/ - install -d $(INCDIR)/glcdgraphics - install -m 644 $(HEADERS) $(INCDIR)/glcdgraphics/ - ( cd $(LIBDIR); ln -sf $(LIBNAME) $(BASENAME).$(VERMAJOR); ln -sf $(LIBNAME) $(BASENAME) ) + install -d $(DESTDIR)$(LIBDIR) + install -m 755 $(LIBNAME) $(DESTDIR)$(LIBDIR)/ + install -d $(DESTDIR)$(INCDIR)/glcdgraphics + install -m 644 $(HEADERS) $(DESTDIR)$(INCDIR)/glcdgraphics/ + ( cd $(DESTDIR)$(LIBDIR); ln -sf $(LIBNAME) $(BASENAME).$(VERMAJOR); ln -sf $(LIBNAME) $(BASENAME) ) uninstall: - rm -f $(LIBDIR)/$(BASENAME) - rm -f $(LIBDIR)/$(BASENAME).$(VERMAJOR) - rm -f $(LIBDIR)/$(LIBNAME) - (for i in $(HEADERS); do rm -f $(INCDIR)/glcdgraphics/$$i; done) - rmdir $(INCDIR)/glcdgraphics + rm -f $(DESTDIR)$(LIBDIR)/$(BASENAME) + rm -f $(DESTDIR)$(LIBDIR)/$(BASENAME).$(VERMAJOR) + rm -f $(DESTDIR)$(LIBDIR)/$(LIBNAME) + (for i in $(HEADERS); do rm -f $(DESTDIR)$(INCDIR)/glcdgraphics/$$i; done) + rmdir $(DESTDIR)$(INCDIR)/glcdgraphics clean: rm -f $(OBJS) $(DEPFILE) $(LIBNAME) $(BASENAME) *~ -- cgit v1.2.3