--- Makefile.orig 2015-10-29 05:47:12.000000000 +0100 +++ Makefile 2015-10-30 06:13:29.642432556 +0100 @@ -55,7 +55,7 @@ CFLAGS_LIB = $(CFLAGS_FAST) -fPIC LDFLAGS_LIB = $(LDFLAGS) -shared INSTALL ?= install -PREFIX ?= $(DESTDIR)/usr/local +PREFIX ?= /usr/local LIBDIR = $(PREFIX)/lib INCLUDEDIR = $(PREFIX)/include @@ -123,17 +123,17 @@ tags: http_parser.c http_parser.h test.c ctags $^ install: library - $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h - $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME) - ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) + $(INSTALL) -D http_parser.h $(DESTDIR)/$(INCLUDEDIR)/http_parser.h + $(INSTALL) -D $(SONAME) $(DESTDIR)/$(LIBDIR)/$(SONAME) + ln -sr $(DESTDIR)/$(LIBDIR)/$(SONAME) $(DESTDIR)/$(LIBDIR)/libhttp_parser.$(SOEXT) install-strip: library - $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h - $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME) - ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) + $(INSTALL) -D http_parser.h $(DESTDIR)/$(INCLUDEDIR)/http_parser.h + $(INSTALL) -D -s $(SONAME) $(DESTDIR)/$(LIBDIR)/$(SONAME) + ln -sr $(DESTDIR)/$(LIBDIR)/$(SONAME) $(DESTDIR)/$(LIBDIR)/libhttp_parser.$(SOEXT) uninstall: - rm $(INCLUDEDIR)/http_parser.h + rm $(DESTDIR)/$(INCLUDEDIR)/http_parser.h rm $(LIBDIR)/$(SONAME) rm $(LIBDIR)/libhttp_parser.so