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 --- glcdskin/Makefile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'glcdskin') diff --git a/glcdskin/Makefile b/glcdskin/Makefile index 90fe310..d80ffea 100644 --- a/glcdskin/Makefile +++ b/glcdskin/Makefile @@ -2,8 +2,7 @@ # Makefile for the GraphLCD skin library # --include ../Make.config - +include ../Make.config CXXFLAGS += -fPIC @@ -48,18 +47,18 @@ $(LIBNAME): $(OBJS) ln -sf $(LIBNAME) $(BASENAME) install: all - install -d $(LIBDIR) - install -m 755 $(LIBNAME) $(LIBDIR)/ - install -d $(INCDIR)/glcdskin - install -m 644 $(HEADERS) $(INCDIR)/glcdskin/ - ( 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)/glcdskin + install -m 644 $(HEADERS) $(DESTDIR)$(INCDIR)/glcdskin/ + ( 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)/glcdskin/$$i; done) - rmdir $(INCDIR)/glcdskin + 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)/glcdskin/$$i; done) + rmdir $(DESTDIR)$(INCDIR)/glcdskin clean: rm -f $(OBJS) $(DEPFILE) $(LIBNAME) $(BASENAME) *~ -- cgit v1.2.3