--- a/Makefile +++ b/Makefile @@ -25,11 +25,7 @@ SOMAJOR = 2 SOMINOR = 9 SOREV = 2 -ifeq (darwin,$(PLATFORM)) -SOEXT ?= dylib -SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT) -LIBNAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOREV).$(SOEXT) -else ifeq (wine,$(PLATFORM)) +ifeq (wine,$(PLATFORM)) CC = winegcc BINEXT = .exe.so HELPER = wine @@ -65,12 +61,8 @@ LIBDIR = $(PREFIX)/lib INCLUDEDIR = $(PREFIX)/include -ifeq (darwin,$(PLATFORM)) -LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME) -else # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname... LDFLAGS_LIB += -Wl,-soname=$(SONAME) -endif test: test_g test_fast $(HELPER) ./test_g$(BINEXT) @@ -131,14 +123,18 @@ ctags $^ install: library - $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h - $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h + $(INSTALL) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT) install-strip: library - $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h - $(INSTALL) -D -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) -d $(DESTDIR)$(LIBDIR) + $(INSTALL) http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h + $(INSTALL) -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)