openjpeg-1.3-Makefile.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Index: OpenJPEG_v1_3/Makefile
  2. ===================================================================
  3. --- OpenJPEG_v1_3.orig/Makefile
  4. +++ OpenJPEG_v1_3/Makefile
  5. @@ -25,8 +25,7 @@ MODULES = $(SRCS:.c=.o)
  6. CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
  7. TARGET = openjpeg
  8. -STATICLIB = lib$(TARGET).a
  9. -SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
  10. +SHAREDLIB = lib$(TARGET).so.$(VER_MAJOR).$(VER_MINOR)
  11. LIBNAME = lib$(TARGET).so.$(VER_MAJOR)
  12. @@ -37,7 +36,6 @@ all: OpenJPEG
  13. dist: OpenJPEG
  14. install -d dist
  15. - install -m 644 $(STATICLIB) dist
  16. install -m 755 $(SHAREDLIB) dist
  17. ln -sf $(SHAREDLIB) dist/$(LIBNAME)
  18. install libopenjpeg/openjpeg.h dist
  19. @@ -45,28 +43,23 @@ dist: OpenJPEG
  20. dos2unix:
  21. @$(DOS2UNIX) $(SRCS) $(INCLS)
  22. -OpenJPEG: $(STATICLIB) $(SHAREDLIB)
  23. +OpenJPEG: $(SHAREDLIB)
  24. .c.o:
  25. $(CC) $(CFLAGS) -c $< -o $@
  26. -$(STATICLIB): $(MODULES)
  27. - $(AR) r $@ $(MODULES)
  28. -
  29. $(SHAREDLIB): $(MODULES)
  30. - $(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
  31. + $(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
  32. install: OpenJPEG
  33. install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)'
  34. - install -m 644 -o root -g root $(STATICLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
  35. - ranlib '$(DESTDIR)$(INSTALL_LIBDIR)/$(STATICLIB)'
  36. - install -m 755 -o root -g root $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
  37. + install -m 755 $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)'
  38. ln -sf $(SHAREDLIB) '$(DESTDIR)$(INSTALL_LIBDIR)/$(LIBNAME)'
  39. - install -m 644 -o root -g root libopenjpeg/openjpeg.h '$(DESTDIR)$(INSTALL_INCLUDE)'
  40. - -ldconfig
  41. + ln -sf $(LIBNAME) '$(DESTDIR)$(INSTALL_LIBDIR)/lib$(TARGET).so'
  42. + install -m 644 libopenjpeg/openjpeg.h '$(DESTDIR)$(INSTALL_INCLUDE)'
  43. clean:
  44. - rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
  45. + rm -rf core dist/ u2dtmp* $(MODULES) $(SHAREDLIB) $(LIBNAME)
  46. osx:
  47. make -f Makefile.osx