tests: fix build on os/x
[schroedinger.git] / schroedinger / Makefile.am
blobc1240fea4ac18d98a1422f21d5dd2249948c57ad
2 if HAVE_CUDA
3 SUBDIRS = cuda
4 endif
6 if HAVE_OPENGL
7 SUBDIRS = opengl
8 endif
10 ORC_SOURCE=schroorc
11 include $(top_srcdir)/orc.mak
13 pkgincludedir = $(includedir)/schroedinger-@SCHRO_MAJORMINOR@/schroedinger
15 lib_LTLIBRARIES = libschroedinger-@SCHRO_MAJORMINOR@.la
17 BUILT_SOURCES += \
18         schroversion.h
20 DISTCLEANFILES = schroversion.h
22 EXTRA_DIST += schroarith-i386.c \
23         schroasync-none.c \
24         schroasync-pthread.c \
25         schroasync-gthread.c \
26         schroasync-win32.c
28 pkginclude_HEADERS = \
29         schro.h \
30         schrobuffer.h \
31         schrobufferlist.h \
32         schrodecoder.h \
33         schroencoder.h \
34         schroengine.h \
35         schrofilter.h \
36         schroframe.h \
37         schro-stdint.h \
38         schroarith.h \
39         schroanalysis.h \
40         schroasync.h \
41         schrobitstream.h \
42         schrodebug.h \
43         schrodomain.h \
44         schrofft.h \
45         schrohistogram.h \
46         schrolimits.h \
47         schrolist.h \
48         schrometric.h \
49         schromotion.h \
50         schromotionest.h \
51         schropack.h \
52         schroparams.h \
53         schroparse.h \
54         schrophasecorrelation.h \
55         schroqueue.h \
56         schrossim.h \
57         schrotables.h \
58         schrounpack.h \
59         schroutils.h \
60         schrovideoformat.h \
61         schrovirtframe.h \
62         schrowavelet.h
64 nodist_pkginclude_HEADERS = \
65         schroversion.h
67 noinst_HEADERS = \
68         schrogpuframe.h
70 if HAVE_CUDA
71 cuda_sources = \
72         schrocuda.c \
73         schrocuda.h \
74         schrogpuframe.c \
75         schrogpumotion.c \
76         dummy.cc
77 cuda_libs = cuda/libdcuda.la
78 endif
80 if HAVE_OPENGL
81 opengl_libs = opengl/libopengl.la
82 endif
84 libschroedinger_@SCHRO_MAJORMINOR@_la_SOURCES = \
85         schro.c \
86         schroarith.c \
87         schrodecoder.c \
88         schrodebug.c \
89         schrodomain.c \
90         schroframe.c \
91         schrohistogram.c \
92         schrobuffer.c \
93         schrobufferlist.c \
94         schrolowdelay.c \
95         schromotion.c \
96         schromotion8.c \
97         schromotionfast.c \
98         schroparams.c \
99         schroroughmotion.c \
100         schroparse.c \
101         schroqueue.c \
102         schrotables.c \
103         schrotablesinit.c \
104         schrounpack.c \
105         schrounpacktables.c \
106         schroutils.c \
107         schrovideoformat.c \
108         schrovirtframe.c \
109         schrowaveletorc.c \
110         $(cuda_sources) \
111         schroasync-@THREAD_IMPL@.c
113 nodist_libschroedinger_@SCHRO_MAJORMINOR@_la_SOURCES = $(ORC_NODIST_SOURCES)
115 if ENABLE_MOTION_REF
116 libschroedinger_@SCHRO_MAJORMINOR@_la_SOURCES += \
117         schromotionref.c
118 endif
120 encoder_sources = \
121         schroanalysis.c \
122         schroencoder.c \
123         schroengine.c \
124         schrofft.c \
125         schrofilter.c \
126         schroglobalest.c \
127         schrohierbm.c \
128         schrolist.c \
129         schrometric.c \
130         schromotionest.c \
131         schropack.c \
132         schrophasecorrelation.c \
133         schroquantiser.c \
134         schrossim.c \
135         schrowavelettables.c
137 if ENABLE_ENCODER
138 libschroedinger_@SCHRO_MAJORMINOR@_la_SOURCES += \
139         $(encoder_sources)
140 endif
143 libschroedinger_@SCHRO_MAJORMINOR@_la_CFLAGS = \
144         $(SCHRO_CFLAGS) $(ORC_CFLAGS) $(ERROR_CFLAGS) \
145         -DSCHRO_ENABLE_UNSTABLE_API \
146         $(GTHREAD_CFLAGS) \
147         $(GCOV_CFLAGS) \
148         $(CUDA_CFLAGS) -I$(srcdir)/cuda -I$(srcdir)/opengl
150 libschroedinger_@SCHRO_MAJORMINOR@_la_LIBADD = \
151         $(cuda_libs) \
152         $(CUDA_LIBS) \
153         $(opengl_libs) \
154         $(OPENGL_LIBS) \
155         $(ORC_LIBS) \
156         $(GCOV_LIBS) \
157         $(PTHREAD_LIBS)
158 libschroedinger_@SCHRO_MAJORMINOR@_la_LDFLAGS = \
159         -no-undefined \
160         -version-info $(SCHRO_LIBVERSION) \
161         -export-symbols-regex '^schro_'
163 %.c.gcov: .libs/libschroedinger_@SCHRO_MAJORMINOR@_la-%.gcda %.c
164         $(GCOV) -b -f -o $^ > $@.out
166 gcov: $(libschroedinger_1.0_la_SOURCES:=.gcov) $(encoder_sources:=.gcov)