Subversion Repositories Kolibri OS

Rev

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

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