Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. MAJOR = @MAJOR_NR@
  2. MINOR = @MINOR_NR@
  3. BUILD = @BUILD_NR@
  4. CURRENT=`expr $(MAJOR) + $(MINOR)`
  5.  
  6. lib_LTLIBRARIES = libopenjpeg.la
  7.  
  8. INCLUDES = -I.. -I.
  9.  
  10. libopenjpeg_la_LDFLAGS = -no-undefined \
  11.   -version-info $(CURRENT):$(BUILD):$(MINOR)
  12.  
  13. SRCS = bio.c cio.c dwt.c event.c image.c j2k.c j2k_lib.c jp2.c jpt.c \
  14.  mct.c mqc.c openjpeg.c pi.c raw.c t1.c t2.c tcd.c tgt.c
  15.  
  16. INCLS = bio.h cio.h dwt.h event.h fix.h image.h int.h j2k.h j2k_lib.h \
  17.  jp2.h jpt.h mct.h mqc.h pi.h raw.h t1.h t2.h tcd.h tgt.h opj_malloc.h \
  18.  opj_includes.h
  19.  
  20. libopenjpeg_la_SOURCES = $(SRCS) $(INCLS)
  21.  
  22. includedir = ${prefix}/include/openjpeg-$(MAJOR).$(MINOR)
  23. include_HEADERS = openjpeg.h
  24.  
  25. # Converts cr/lf to just lf
  26. DOS2UNIX = dos2unix
  27.  
  28. dos2unix:
  29.         @$(DOS2UNIX) $(SRCS) $(INCLS)
  30.  
  31. COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
  32.  
  33. if with_sharedlibs
  34. COMPILERFLAGS += -DOPJ_EXPORTS
  35. else
  36. COMPILERFLAGS += -DOPJ_STATIC
  37. libopenjpeg_la_LDFLAGS += -static
  38. endif
  39.  
  40. CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
  41.  
  42. headerdir = openjpeg-$(MAJOR).$(MINOR)
  43.  
  44. all-local:
  45.         @$(INSTALL) -d ../bin
  46.         @cp -P .libs/libopenjpeg.* ../bin/
  47.         @rm -f ../bin/libopenjpeg.la*
  48.         @rm -rf .report_lib
  49.         @$(INSTALL) -d .report_lib
  50.         @cp -P .libs/libopenjpeg.* .report_lib
  51.         @rm -f .report_lib/libopenjpeg.lai
  52.         @echo "" > .report.txt
  53.         @echo "Installing: ${prefix}/include/${headerdir}/" >> .report.txt
  54.         @echo "Installing: ${prefix}/include/${headerdir}/openjpeg.h" >> .report.txt
  55.         @(cd .report_lib; \
  56.         l=`ls --file-type`; \
  57.         for f in $$l ; do \
  58.         echo "Installing: ${prefix}/lib/$$f" >> ../.report.txt ; \
  59.         done)
  60.         @rm -rf .report_lib
  61.  
  62. install-data-hook:
  63.         (cd $(DESTDIR)${prefix}/include && rm -f openjpeg.h)
  64.         (cd $(DESTDIR)${prefix}/include && \
  65.         $(LN_S) ${headerdir}/openjpeg.h openjpeg.h)
  66.        
  67. uninstall-hook:
  68.         (cd $(DESTDIR)${prefix}/include && rm -rf openjpeg.h ${headerdir})
  69.