source: trunk/FACT++/Makefile.am@ 11655

Last change on this file since 11655 was 11618, checked in by tbretz, 13 years ago
First draft of compiling the raw events viewer.
File size: 11.5 KB
Line 
1include aminclude.am
2
3#-------------------------------------------------------------------------
4
5ACLOCAL_AMFLAGS = -I .macro_dir
6
7SVN_REVISION = -DREVISION=\"`svnversion -n .`\"
8
9DIM_FLAGS = -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux
10BOOST_FLAGS = -DBOOST_DISABLE_ASSERTS
11
12AM_CPPFLAGS = -Idim/dim $(DIM_FLAGS) $(BOOST_FLAGS) $(ROOTCPPFLAGS) \
13 -O3 -Wall -Winit-self -Wpointer-arith -Wcast-align -Wextra -Wformat=2 \
14 $(SVN_REVISION)
15
16AM_CXXFLAGS = $(AM_CPPFLAGS) $(QT4_INCLUDES) \
17 -Woverloaded-virtual -Wnon-virtual-dtor -Wshadow -std=c++0x
18
19# -no-undefined
20AM_LDFLAGS = -module -avoid-version
21
22#$(man3_MANS): doxygen-doc
23#DX_CLEANFILES = everything to clean.
24# Add to MOSTLYCLEANFILES.
25
26#-------------------------------------------------------------------------
27
28# Executables which are build by default ('all')
29bin_PROGRAMS = \
30 dns \
31 log logtime time argv \
32 dimctrl \
33 datalogger scheduler \
34 triggerschedule \
35 ftmctrl ftm \
36 fadctrl fad \
37 fscctrl fsc \
38 chatclient chatserv \
39 biasctrl \
40 mcp \
41 fitsdump
42
43if HAS_GUI
44bin_PROGRAMS += fact
45if HAS_VIEWER
46bin_PROGRAMS += viewer
47endif
48endif
49
50if HAS_LIBXP
51bin_PROGRAMS += did
52endif
53
54# This is a trick to be able to build them but not having them in 'all'
55if IS_FALSE
56bin_PROGRAMS += \
57 test \
58 dclient5 dserver2 \
59 fitsloader fitsgrep \
60 sched astro drivectrl \
61 readfits
62endif
63
64lib_LTLIBRARIES = \
65 libDim.la libDim++.la libDimExtension.la libTime.la libTools.la \
66 libConfiguration.la libStateMachine.la
67# libAstro.la
68
69if HAS_HELP2MAN
70dist_man1_MANS = \
71 dimctrl.man ftmctrl.man datalogger.man triggerschedule.man fitsdump.man
72endif
73
74#-------------------------------------------------------------------------
75
76CLEANFILES =
77
78dist_noinst_SCRIPTS = autogen.sh
79
80EXTRA_DIST = \
81 Doxyfile \
82 dim/DIM_Performance.pdf \
83 dim/LICENSE.GPL \
84 dim/README.txt \
85 dim/README_v9.txt \
86 dim/README_v10.txt \
87 dim/README_v11.txt \
88 dim/README_v12.txt \
89 dim/README_v13.txt \
90 dim/README_v14.txt \
91 dim/README_v17.txt \
92 dim/README_v16.txt \
93 dim/README_v17.txt \
94 dim/README_v18.txt \
95 dim/README_v19.txt
96
97dns_LDADD = libDim.la libDimExtension.la
98dns_SOURCES = src/dns.c
99#dns_CPPFLAGS = $(AM_CPPFLAGS) $(DIM_FLAGS)
100
101did_LDADD = libDim.la
102did_CPPFLAGS = $(AM_CPPFLAGS) -Idim/src/did
103did_SOURCES = \
104 dim/src/did/did.c dim/src/did/did.h \
105 dim/src/did/dui_util.c dim/src/did/dui_util.h \
106 dim/src/did/dui_colors.h
107
108
109#libDim_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIM_FLAGS)
110libDim_ladir =
111libDim_la_HEADERS = \
112 dim/dim/dic.h \
113 dim/dim/dim_common.h \
114 dim/dim/dim.h \
115 dim/dim/dim_tcpip.h \
116 dim/dim/dis.h
117
118libDim_la_SOURCES = \
119 dim/src/dic.c \
120 dim/src/dis.c \
121 dim/src/dna.c \
122 dim/src/sll.c \
123 dim/src/dll.c \
124 dim/src/hash.c \
125 dim/src/swap.c \
126 dim/src/copy_swap.c \
127 dim/src/open_dns.c \
128 dim/src/conn_handler.c \
129 dim/src/tcpip.c \
130 dim/src/dtq.c \
131 dim/src/dim_thr.c \
132 dim/src/utilities.c
133
134libDimExtension_la_SOURCES = src/DimSetup.cc src/DimSetup.h
135
136#libDimCpp_la_CXXFLAGS = $(AM_CXXFLAGS) $(DIM_FLAGS)
137libDim___ladir =
138libDim___la_HEADERS = \
139 dim/dim/dic.hxx \
140 dim/dim/dis.hxx \
141 dim/dim/dim_core.hxx \
142 dim/dim/dim.hxx \
143 dim/dim/dim_tcpip.h \
144 dim/dim/dllist.hxx \
145 dim/dim/sllist.hxx \
146 dim/dim/tokenstring.hxx \
147 src/Dim.h
148libDim___la_SOURCES = \
149 dim/src/diccpp.cxx \
150 dim/src/dimcpp.cxx \
151 dim/src/tokenstring.cxx \
152 dim/src/discpp.cxx
153
154# Divide into Readline / StateMachine / StateMachineDim / Tools?
155libStateMachine_la_SOURCES = \
156 src/WindowLog.h src/WindowLog.cc \
157 src/Readline.h src/Readline.cc \
158 src/ReadlineColor.h src/ReadlineColor.cc \
159 src/ReadlineWindow.h src/ReadlineWindow.cc \
160 src/Console.h src/Console.cc \
161 src/Shell.h src/Shell.cc \
162 \
163 src/EventImp.h src/EventImp.cc \
164 src/Event.h src/Event.cc \
165 src/State.h src/State.cc \
166 src/Description.h src/Description.cc \
167 src/MessageImp.h src/MessageImp.cc \
168 src/Converter.h src/Converter.cc \
169 src/StateMachineImp.h src/StateMachineImp.cc \
170 src/StateMachine.h src/StateMachine.cc \
171 \
172 src/EventDim.h \
173 src/MessageDim.h src/MessageDim.cc \
174 src/StateMachineDim.h src/StateMachineDim.cc \
175 src/DimServerList.h src/DimServerList.cc \
176 src/DimServiceInfoList.h src/DimServiceInfoList.cc \
177 src/DimNetworkList.h src/DimNetwork.cc \
178 src/ServiceList.h src/ServiceList.cc \
179 src/DimErrorRedirecter.h \
180 src/DimErrorRedirecter.cc \
181 src/DimDescriptionService.h \
182 src/DimDescriptionService.cc \
183 \
184 src/Connection.h src/Connection.cc \
185 src/ConnectionUSB.h src/ConnectionUSB.cc \
186 \
187 FACT.h ByteOrder.h \
188 \
189 src/DimWriteStatistics.h src/DimWriteStatistics.cc
190
191
192libConfiguration_la_SOURCES = \
193 src/Configuration.h src/Configuration.cc \
194 src/FACT.h src/FACT.cc
195
196libTime_la_SOURCES = src/Time.h src/Time.cc
197#libAstro_la_SOURCES = src/Astro.h src/Astro.cc
198libTools_la_SOURCES = src/tools.h src/tools.cc
199
200
201dserver2_SOURCES = src/dserver2.cc
202dserver2_LDADD = libTime.la libTools.la
203
204ftm_SOURCES = src/ftm.cc src/HeadersFTM.cc
205ftm_LDADD = libTime.la libTools.la libDim.la libDim++.la libConfiguration.la libDimExtension.la
206
207fad_SOURCES = src/fad.cc src/HeadersFAD.cc
208fad_LDADD = libTime.la libTools.la libTools.la libDim.la libDim++.la libConfiguration.la libDimExtension.la
209
210fsc_SOURCES = src/fsc.cc
211fsc_LDADD = libTime.la libTools.la
212
213
214log_SOURCES = src/log.cc
215log_LDADD = libTime.la libDim.la libDim++.la libTools.la libStateMachine.la
216
217
218logtime_SOURCES = src/logtime.cc
219logtime_LDADD = libTools.la libStateMachine.la libTime.la libDim.la libDim++.la
220
221
222chatserv_SOURCES = src/chatserv.cc src/LocalControl.h
223chatserv_LDADD = libTools.la libStateMachine.la libConfiguration.la libTime.la \
224 libDim.la libDim++.la libDimExtension.la
225
226
227dclient5_SOURCES = src/dclient5.cc src/LocalControl.h
228dclient5_LDADD = libDim.la libDim++.la libTime.la libTools.la libStateMachine.la \
229 libConfiguration.la
230
231ftmctrl_SOURCES = src/ftmctrl.cc src/LocalControl.h src/HeadersFTM.cc
232ftmctrl_LDADD = libDim.la libDim++.la libDimExtension.la \
233 libTime.la libTools.la libStateMachine.la \
234 libConfiguration.la
235
236drivectrl_SOURCES = src/drivectrl.cc src/LocalControl.h src/HeadersFTM.cc
237drivectrl_LDADD = libDim.la libDim++.la libDimExtension.la \
238 libTime.la libTools.la libStateMachine.la \
239 libConfiguration.la
240
241fadctrl_SOURCES = src/fadctrl.cc src/LocalControl.h src/HeadersFAD.cc \
242 src/EventBuilder.c src/EventBuilder.h
243fadctrl_LDADD = libDim.la libDim++.la libDimExtension.la \
244 libTime.la libTools.la libStateMachine.la \
245 libConfiguration.la
246
247fscctrl_SOURCES = src/fscctrl.cc src/LocalControl.h
248fscctrl_LDADD = libDim.la libDim++.la libDimExtension.la \
249 libTime.la libTools.la libStateMachine.la \
250 libConfiguration.la
251
252biasctrl_SOURCES = src/biasctrl.cc src/LocalControl.h
253biasctrl_LDADD = libDim.la libDim++.la libDimExtension.la \
254 libTime.la libTools.la libStateMachine.la \
255 libConfiguration.la
256
257mcp_SOURCES = src/mcp.cc src/LocalControl.h
258mcp_LDADD = libDim.la libDim++.la libDimExtension.la \
259 libTime.la libTools.la libStateMachine.la \
260 libConfiguration.la
261
262
263argv_SOURCES = src/argv.cc
264argv_LDADD = libConfiguration.la
265
266
267dimctrl_SOURCES = src/dimctrl.cc src/RemoteControl.cc src/RemoteControl.h
268dimctrl_LDADD = libTools.la libStateMachine.la libTime.la \
269 libDim.la libDim++.la libDimExtension.la libConfiguration.la
270
271
272chatclient_SOURCES = src/chatclient.cc src/ChatClient.h
273chatclient_LDADD = libTools.la libStateMachine.la libTime.la \
274 libDim.la libDim++.la libDimExtension.la libConfiguration.la
275
276
277time_SOURCES = src/time.cc
278time_LDADD = libTime.la
279
280#astro_SOURCES = src/astro.cc
281#astro_LDADD = libAstro.la libTime.la
282
283test_SOURCES = src/test.cc
284test_LDADD = libTools.la libStateMachine.la libTime.la libDim.la libDim++.la libConfiguration.la
285
286datalogger_SOURCES = src/datalogger.cc src/LocalControl.h
287if HAS_FITS
288datalogger_SOURCES += src/Fits.cc
289endif
290datalogger_LDADD = libDim.la libDim++.la libDimExtension.la \
291 libTime.la libTools.la libStateMachine.la \
292 libConfiguration.la
293
294scheduler_SOURCES = src/scheduler.cc src/LocalControl.h
295scheduler_LDADD = libStateMachine.la libTools.la libTime.la \
296 libDim.la libDim++.la libDimExtension.la libConfiguration.la
297
298fitsloader_SOURCES = src/fitsloader.cc src/LocalControl.h
299fitsloader_LDADD = libStateMachine.la libTools.la libTime.la libDim.la libDim++.la libConfiguration.la
300
301fitsdump_SOURCES = src/fitsdump.cc
302fitsdump_LDADD = libConfiguration.la
303
304readfits_SOURCES = src/readfits.cc src/ReadFits.h
305readfits_LDADD = libStateMachine.la libTools.la libTime.la libDim.la libDim++.la libConfiguration.la
306
307triggerschedule_SOURCES = src/triggerschedule.cc
308triggerschedule_LDADD = libDim.la libDim++.la libDimExtension.la libConfiguration.la
309
310#fitsgrep_SOURCES = src/fitsgrep.cc
311#fitsgrep_LDADD = libConfiguration.la
312
313# -----
314
315if HAS_GUI
316
317#
318
319fact_DIALOGS = \
320 gui/design.ui
321
322fact_RESOURCES = \
323 gui/design.qrc
324
325fact_QT_SOURCES = \
326 gui/DockWindow.cc \
327 gui/MainWindow.cc
328
329fact_SRCADD = $(fact_DIALOGS:.ui=.h) $(fact_RESOURCES:.qrc=.cc) $(fact_QT_SOURCES:.cc=.moc.cc)
330
331#
332
333if HAS_VIEWER
334
335viewer_DIALOGS = \
336 gui/RawEventsViewer/viewer.ui
337
338viewer_QT_SOURCES = \
339 gui/RawEventsViewer/RawEventsViewer.cc
340
341viewer_SRCADD = $(viewer_DIALOGS:.ui=.h) $(viewer_RESOURCES:.qrc=.cc) $(viewer_QT_SOURCES:.cc=.moc.cc)
342
343endif
344
345endif
346
347
348
349BUILT_SOURCES = $(fact_SRCADD) $(viewer_SRCADD)
350
351CLEANFILES += $(BUILT_SOURCES)
352
353EXTRA_DIST += $(DIALOGS) $(RESOURCES)
354
355fact_LDADD = $(ROOTLDFLAGS) $(ROOTGLIBS) $(QT4_LIB) $(QT4_LDFLAGS) -L. \
356 libDim.la libDim++.la libDimExtension.la \
357 libTools.la libTime.la libTools.la libStateMachine.la \
358 libConfiguration.la
359
360fact_SOURCES = $(fact_SRCADD) $(fact_QT_SOURCES) \
361 gui/CheckBoxDelegate.cc gui/HtmlDelegate.cc \
362 gui/fact.cc gui/FactGui.cc src/HeadersFTM.cc
363
364viewer_LDADD = $(QT4_LIB) $(QT4_LDFLAGS) -L. -lQtOpenGL -lGLU
365
366viewer_SOURCES = $(viewer_SRCADD) $(viewer_QT_SOURCES)
367
368
369
370#-------------------------------------------------------------------------
371
372SUFFIXES = .moc.cc
373
374.ui.h: $<
375 $(AM_V_GEN)$(UIC4) $< -o $@
376
377.h.moc.cc: $<
378 $(AM_V_GEN)$(MOC4) $(EXTRA_CPPFLAGS) $< -o $@
379
380.qrc.cc: $<
381 $(AM_V_GEN)$(RCC4) -name `echo "$<" | sed 's|^.*/\(.*\)\.qrc$$|\1|'` $< -o $@
382
383
384#-------------------------------------------------------------------------
385
386MAN_TARGETS = $(dist_man1_MANS)
387
388if HAS_GROFF
389
390MAN_TARGETS += $(dist_man1_MANS:.man=.html)
391EXTRA_DIST += $(dist_man1_MANS:.man=.html)
392CLEANFILES += $(dist_man1_MANS:.man=.html)
393
394if HAS_PS2PDF
395
396MAN_TARGETS += $(dist_man1_MANS:.man=.pdf)
397EXTRA_DIST += $(dist_man1_MANS:.man=.pdf)
398CLEANFILES += $(dist_man1_MANS:.man=.pdf)
399endif
400
401endif
402
403$(dist_man1_MANS): $(dist_man1_MANS:.man=)
404 @mkdir -p man
405 $(AM_V_GEN)help2man -N -o $@ -m $(@:.man=) ./$(@:.man=)
406
407.man.html: $<
408 $(AM_V_GEN)groff -mandoc `man -w -l $<` -T html > $@
409
410.man.pdf: $<
411 $(AM_V_GEN)groff -mandoc `man -w -l $<` | ps2pdf - $@
412
413man: $(MAN_TARGETS) doxygen-doc
414
415diff:
416 @svn diff | $(COLORDIFF)
417
418#-------------------------------------------------------------------------
419
420# Overwrite rules for silent or other verbosity levels
421#AM_V_MAN = $(AM_MAN_$(V))
422#AM_MAN_ = $(AM_V_GEN)
423#AM_MAN_0 = @echo " MAN "$@;
424
425#$(MyAnalysisDS): $(MyAnalysisH) $(MyAnalysisL)
426# $(ROOTCINT) -f $@ -c -I$(top_builddir)/config $(INCLUDES) $^
427# rootcint_files=`echo $@ | sed -ne 's/\(.*\)\..*/\1.cxx \1.h/p'` && \
428# $(top_srcdir)/config/runsed $(top_srcdir)/config/rootcint.sed $$rootcint_files && \
429# for i in $$rootcint_files; do \
430# if test ! `diff $$i $(srcdir)/$$i >/dev/null 2>&1`; then \
431# cp $$i $(srcdir)/; \
432# fi; \
433# done
434
435#CLEANFILES = *~ *.rej *.orig
436#MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
437# stamp-h.in stamp-h[0-9].in
438#DISTCLEANFILES = config.cache config.log
Note: See TracBrowser for help on using the repository browser.