You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.7 KiB

  1. --- a/Makefile
  2. +++ b/Makefile
  3. @@ -25,11 +25,7 @@ SOLIBNAME = libhttp_parser
  4. SOMAJOR = 2
  5. SOMINOR = 9
  6. SOREV = 4
  7. -ifeq (darwin,$(PLATFORM))
  8. -SOEXT ?= dylib
  9. -SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT)
  10. -LIBNAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOREV).$(SOEXT)
  11. -else ifeq (wine,$(PLATFORM))
  12. +ifeq (wine,$(PLATFORM))
  13. CC = winegcc
  14. BINEXT = .exe.so
  15. HELPER = wine
  16. @@ -65,12 +61,8 @@ PREFIX ?= /usr/local
  17. LIBDIR = $(PREFIX)/lib
  18. INCLUDEDIR = $(PREFIX)/include
  19. -ifeq (darwin,$(PLATFORM))
  20. -LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
  21. -else
  22. # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
  23. LDFLAGS_LIB += -Wl,-soname=$(SONAME)
  24. -endif
  25. test: test_g test_fast
  26. $(HELPER) ./test_g$(BINEXT)
  27. @@ -131,14 +123,18 @@ tags: http_parser.c http_parser.h test.c
  28. ctags $^
  29. install: library
  30. - $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
  31. - $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
  32. + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
  33. + $(INSTALL) -d $(DESTDIR)$(LIBDIR)
  34. + $(INSTALL) http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
  35. + $(INSTALL) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
  36. ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
  37. ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
  38. install-strip: library
  39. - $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
  40. - $(INSTALL) -D -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
  41. + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
  42. + $(INSTALL) -d $(DESTDIR)$(LIBDIR)
  43. + $(INSTALL) http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
  44. + $(INSTALL) -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
  45. ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
  46. ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)