[contrib][haskell] Hkl.Edf
[hkl.git] / hkl / Makefile.am
blob33e85374215e4b1f661ad071363a13eb6ab09105
1 ## Process this file with automake to produce Makefile.in
2 SUBDIRS = ccan . api2
4 AM_LDFLAGS = \
5         -no-undefined -version-info 5:0:0 \
6         $(GLIB_LIBS) \
7         $(GSL_LIBS)
8 AM_CFLAGS = \
9         -DG_LOG_DOMAIN=\"Hkl\" \
10         -I$(top_srcdir) \
11         -I$(top_builddir) \
12         $(GLIB_CFLAGS) \
13         $(GSL_CFLAGS)
15 hkl_c_sources = \
16         hkl-axis.c \
17         hkl-detector.c \
18         hkl-detector-factory.c \
19         hkl-factory.c \
20         hkl-geometry.c \
21         hkl-interval.c \
22         hkl-lattice.c \
23         hkl-macros.c \
24         hkl-matrix.c \
25         hkl-parameter.c \
26         hkl-pseudoaxis.c \
27         hkl-pseudoaxis-auto.c \
28         hkl-pseudoaxis-common-eulerians.c \
29         hkl-pseudoaxis-common-hkl.c \
30         hkl-pseudoaxis-common-psi.c \
31         hkl-pseudoaxis-common-q.c \
32         hkl-pseudoaxis-common-readonly.c \
33         hkl-pseudoaxis-common-tth.c \
34         hkl-engine-2c.c \
35         hkl-engine-e4c.c \
36         hkl-engine-k4c.c \
37         hkl-engine-e6c.c \
38         hkl-engine-k6c.c \
39         hkl-engine-petra3-p08-lisa.c \
40         hkl-engine-petra3-p09-eh2.c \
41         hkl-engine-soleil-sirius-turret.c \
42         hkl-engine-soleil-sixs-med.c \
43         hkl-engine-zaxis.c \
44         hkl-quaternion.c \
45         hkl-sample.c \
46         hkl-source.c \
47         hkl-trajectory.c \
48         hkl-unit.c \
49         hkl-vector.c
51 hkl_public_h_sources = ../hkl.h
53 hkl_private_h_sources = \
54         hkl-axis-private.h \
55         hkl-detector-private.h \
56         hkl-factory-private.h \
57         hkl-geometry-private.h \
58         hkl-interval-private.h \
59         hkl-lattice-private.h \
60         hkl-macros-private.h \
61         hkl-matrix-private.h \
62         hkl-parameter-private.h \
63         hkl-pseudoaxis-private.h \
64         hkl-pseudoaxis-auto-private.h \
65         hkl-pseudoaxis-common-eulerians-private.h \
66         hkl-pseudoaxis-common-hkl-private.h \
67         hkl-pseudoaxis-common-psi-private.h \
68         hkl-pseudoaxis-common-q-private.h \
69         hkl-pseudoaxis-common-readonly-private.h \
70         hkl-pseudoaxis-common-tth-private.h \
71         hkl-quaternion-private.h \
72         hkl-sample-private.h \
73         hkl-source-private.h \
74         hkl-trajectory-private.h \
75         hkl-unit-private.h \
76         hkl-vector-private.h
78 lib_LTLIBRARIES = libhkl.la
79 libhkl_la_SOURCES = $(hkl_c_sources) $(hkl_private_h_sources)
80 libhkl_la_LIBADD = ccan/libccan.la
81 libhkl_la_CFLAGS = \
82         $(AM_CFLAGS) \
83         -Wno-initializer-overrides \
84         -Wno-unused-result # \ do not activate visibility yet.
85         -fvisibility=hidden
87 # just compile the template diffractometer to be sure that it is valid
88 noinst_LTLIBRARIES = libdummy.la
89 libdummy_la_SOURCES = hkl-engine-template.c
91 # introspection
93 -include $(INTROSPECTION_MAKEFILE)
94 INTROSPECTION_GIRS =
95 INTROSPECTION_SCANNER_ARGS = \
96         --add-include-path=$(srcdir) \
97         --add-include-path=. \
98         --warn-all
99 INTROSPECTION_COMPILER_ARGS = \
100         --includedir=$(srcdir) \
101         --includedir=.
103 if HAVE_INTROSPECTION
105 libhkl_la_SOURCES += \
106         hkl-types.c \
107         hkl-types.h \
108         hkl-type-builtins.c \
109         hkl-type-builtins.h \
110         hkl-binding.c \
111         hkl-binding-private.h
113 introspection_files = \
114         ../hkl.h \
115         hkl-binding-private.h \
116         hkl-types.h \
117         hkl-vector.c \
118         hkl-matrix.c \
119         hkl-quaternion.c \
120         hkl-parameter.c \
121         hkl-axis.c \
122         hkl-geometry.c \
123         hkl-detector.c \
124         hkl-detector-factory.c \
125         hkl-lattice.c \
126         hkl-sample.c \
127         hkl-pseudoaxis.c \
128         hkl-factory.c \
129         hkl-binding.c \
130         hkl-types.c \
131         hkl-type-builtins.c \
132         hkl-type-builtins.h
134 AM_LDFLAGS += $(GOBJECT_LIBS)
135 AM_CFLAGS += $(GOBJECT_CFLAGS)
137 hkl-type-builtins.h: stamp-hkl-type-builtins.h
138         @true
139 stamp-hkl-type-builtins.h: $(hkl_public_h_sources) $(srcdir)/hkl-type-builtins.h.template
140         ( cd $(srcdir) && $(GLIB_MKENUMS) --template hkl-type-builtins.h.template \
141                 $(hkl_public_h_sources) ) >> xgen-gtbh \
142         && (cmp -s xgen-gtbh hkl-type-builtins.h || cp xgen-gtbh hkl-type-builtins.h ) \
143         && rm -f xgen-gtbh \
144         && echo timestamp > $(@F)
145 hkl-type-builtins.c: $(hkl_public_h_sources) $(srcdir)/hkl-type-builtins.c.template hkl-type-builtins.h
146         ( cd $(srcdir) && $(GLIB_MKENUMS) --template hkl-type-builtins.c.template \
147                 $(hkl_public_h_sources) ) > xgen-gtbc \
148         && cp xgen-gtbc hkl-type-builtins.c  \
149         && rm -f xgen-gtbc
151 Hkl-@VMAJ@.0.gir: $(INTROSPECTION_SCANNER) libhkl.la Makefile
153 Hkl_@VMAJ@_0_gir_NAMESPACE = Hkl
154 Hkl_@VMAJ@_0_gir_VERSION = @VMAJ@.0
155 Hkl_@VMAJ@_0_gir_LIBS = libhkl.la
156 Hkl_@VMAJ@_0_gir_FILES =  $(introspection_files)
157 Hkl_@VMAJ@_0_gir_PACKAGES = gobject-2.0
158 Hkl_@VMAJ@_0_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS)
159 Hkl_@VMAJ@_0_gir_EXPORT_PACKAGES = hkl-@VMAJ@.0
160 Hkl_@VMAJ@_0_gir_SCANNERFLAGS = --warn-all --c-include='hkl.h'
162 INTROSPECTION_GIRS += Hkl-@VMAJ@.0.gir
164 girdir = $(datadir)/gir-1.0
165 gir_DATA = $(INTROSPECTION_GIRS)
167 typelibsdir = $(libdir)/girepository-1.0
168 typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
170 EXTRA_DIST = \
171         hkl-type-builtins.h.template \
172         hkl-type-builtins.c.template
174 CLEANFILES = $(gir_DATA) $(typelibs_DATA) stamp-hkl-type-builtins.h hkl-type-builtins.h hkl-type-builtins.c
176 endif
178 # Support for GNU Flymake, in Emacs.
180 check-syntax: AM_CFLAGS += -fsyntax-only -pipe
181 check-syntax:
182         test -z "$(CHK_SOURCES)" || $(COMPILE) $(CHK_SOURCES)
184 # check for includes with iwyu
185 iwyu:
186         @list='$(libhkl_la_SOURCES)';\
187         for p in $$list; do\
188                 iwyu $(AM_CFLAGS) $$p; \
189         done;
191 .PHONY: check-syntax iwyu