summaryrefslogtreecommitdiff
path: root/jp3d/libjp3dvm/Makefile.am
blob: 434fa977e6042be7963cf5a8bb0de7fff76d1e65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#libjp3dvm
#
MAJOR = @JP3D_MAJOR_NR@
MINOR = @JP3D_MINOR_NR@
BUILD = @JP3D_BUILD_NR@
CURRENT=`expr $(MAJOR) + $(MINOR)`

lib_LTLIBRARIES = libopenjp3dvm.la

libopenjp3dvm_la_LDFLAGS = -no-undefined \
  -version-info $(CURRENT):$(BUILD):$(MINOR)

SRCS = bio.c cio.c dwt.c event.c jp3d.c jp3d_lib.c volume.c mct.c mqc.c \
  openjpeg.c pi.c raw.c t1.c t1_3d.c t2.c tcd.c tgt.c

INCLS = t1_3d.h bio.h cio.h  dwt.h event.h fix.h int.h jp3d.h jp3d_lib.h \
  volume.h mct.h mqc.h pi.h raw.h t1.h  t2.h tcd.h tgt.h opj_includes.h

libopenjp3dvm_la_SOURCES = $(SRCS) $(INCLS)

includedir = ${prefix}/include/openjpeg3d-$(MAJOR).$(MINOR)
include_HEADERS = openjpeg3d.h

# Converts cr/lf to just lf
DOS2UNIX = dos2unix

dos2unix:
	@$(DOS2UNIX) $(SRCS) $(INCLS)

INCLUDES = -I../.. -I.
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99

if with_sharedlibs
COMPILERFLAGS += -DOPJ_EXPORTS
else
COMPILERFLAGS += -DOPJ_STATIC
libopenjp3dvm_la_LDFLAGS += -static
endif

CFLAGS = $(COMPILERFLAGS) $(INCLUDES) 
#CFLAGS += -DJP3D_VERSION="\"$(MAJOR).$(MINOR).$(BUILD)\""

headerdir = openjpeg3d-$(MAJOR).$(MINOR)

all-local:
	@$(INSTALL) -d ../../bin
	@cp -P .libs/libopenjp3dvm.* ../../bin
	@rm -f ../../bin/libopenjp3dvm.la*
	@rm -rf .report_lib
	@$(INSTALL) -d .report_lib
	@cp -P .libs/libopenjp3dvm.* .report_lib
	@rm -f .report_lib/libopenjp3dvm.lai
	@echo "" > ../.report.txt
	@echo "Installing: ${prefix}/include/${headerdir}/" >> ../.report.txt
	@echo "Installing: ${prefix}/include/${headerdir}/openjpeg3d.h" >> ../.report.txt
	@(cd .report_lib; \
	l=`ls --file-type`; \
	for f in $$l ; do \
	echo "Installing: ${prefix}/lib/$$f" >> ../../.report.txt ; \
	done)
	@rm -rf .report_lib

install-data-hook:
	(cd $(DESTDIR)${prefix}/include && rm -f openjpeg3d.h)
	(cd $(DESTDIR)${prefix}/include && \
	$(LN_S) ${headerdir}/openjpeg3d.h openjpeg3d.h)

uninstall-hook:
	(cd $(DESTDIR)${prefix}/include && rm -rf openjpeg3d.h ${headerdir})