# $Header: https://oberon.oapd.inaf.it/shins/trunk/shins/src/obs_ctrl/Makefile.am 3896 2022-04-13 13:24:17Z depa $
include $(top_srcdir)/config/all.mk

SLICE_INC += -I$(top_srcdir)/src/ -I$(top_srcdir)/src/lbto/ -I$(pkgincludedir)

ICE_CXXFLAGS += -I$(top_srcdir)/src/ -I$(top_srcdir)/src/lbto/ -I$(pkgincludedir)


SUBDIRS =  panels

uidir = $(datadir)/ui/Sharknir/


#Interface

# Configuration files, go to $INSROOT/etc
etcdir=$(sysconfdir)/resourcesQt/images/
dist_etc_DATA = panels/resourcesQt/images/SHINS_splash.png

#
# http://sources.redhat.com/automake/automake.html#Program-and-Library-Variables
#
lib_LIBRARIES =

#
# http://sources.redhat.com/automake/automake.html#A-Library
#

# static library example:
# lib_LIBRARIES = libXXX.a
# nodist_libXXX_a_SOURCES = XXX.cc
# libXXX_a_SOURCES = XXX.cc
# libXXX_adir = $(includedir)
# libXXX_a_HEADERS =  XXX.h


lib_LTLIBRARIES = 
#
# http://sources.redhat.com/automake/automake.html#A-Shared-Library
#

# shared library example with package version:
# lib_LTLIBRARIES = libXXX.la
# nodist_libXXX_la_SOURCES = XXX.cc
# libXXX_la_SOURCES = XXX.cc
# libXXX_ladir = $(includedir)
# libXXX_la_HEADERS = XXX.h
# libXXX_la_LDFLAGS = -version-info ${LIBRARY_VERSION} -no-undefined
# libXXX_la_LIBADD = -lSOMELIBRARY


bin_PROGRAMS = obsControlServer # shark_eng_panel

#
# http://sources.redhat.com/automake/automake.html#A-Program
#
# Example:
# bin_PROGRAMS = AAA

# nodist_AAA_SOURCES = AAA.moc.cc ## moc builtfile for all QT Headerfiles (QOBJECT in the header),
                                  ## all header have to be in one of *_HEADERS or *_SOURCES
# AAA_SOURCES = aaa.cc iii.ice uuu.ui
# AAA_LDADD = $(QT_LIBS) $(ICE_LIBS) -lIsStatic
# AAA_LDFLAGS = -L. -DDEBUG
# AAA_DEPENDENCIES = ../libIsStatic.a # needed for dependencie checking

obsControlServer_SOURCES = \
  ../tcs_iif/iifApp.cpp \
  ../motion_ctrl/niceCallback.cpp \
  ../motion_ctrl/stagesX/multiStageX.cpp \
  ../motion_ctrl/wheels/multiWheel.cpp \
  ../motion_ctrl/stagesXY/multiStageXY.cpp \
  ../calunit_ctrl/calunitCtrl.cpp \
  ../motion_ctrl/motionCtrl.cpp \
  ../track_ctrl/AdcWorkerThread.cpp \
  ../track_ctrl/trackingCtrl.cpp \
  ../tiptilt_ctrl/bcu/util/rtcDetector.cpp \
  ../tiptilt_ctrl/bcu/util/rtcDM.cpp \
  ../tiptilt_ctrl/bcu/util/rtcSlopeComputer.cpp \
  ../tiptilt_ctrl/tiptiltCtrl.cpp \
  ../lbto/LbtoIIFInterface.ice \
  ../data_mgr/fitsFileI.cpp \
  ../data_mgr/dataManager.ice \
  sharknir.ice \
  obsControl.ice \
  seqISetup.cpp \
  seqIDataMgr.cpp \
  seqITcs.cpp \
  seqISnmp.cpp \
  sequencerI.cpp \
  obsControlServer.cpp


obsControlServer_LDFLAGS = -L. \
-L/lib64 \
$(BASDA_MOCCA_LDFLAGS) \
$(BASDA_LDFLAGS) \
$(ICE_LDFLAGS) \
$(NICE_LDFLAGS) \
$(INDI_LDFLAGS) \
$(IIF_LDFLAGS) \
$(BOOST_LDFLASGS) \
-L$(libdir)/lib/shins

obsControlServer_LDADD = -lBasdaMoccaNService_NiceType \
-lLtcsIifService \
-lLtcsIifService_NiceType \
-lShinsUtil_SharknirType \
-lSharknirDrotService_NiceType \
-lSharknirBasdaServiceBcu \
-lcfitsio \
-lCCfits \
-lnetsnmp \
$(BASDA_MOCCA_LIBS) \
$(BASDA_LIBS) \
$(NICE_LIBS) \
$(ICE_LIBS) \
$(BOOST_SYSTEM_LIB) \
$(BOOST_THREAD_LIB) \
-lboost_chrono \
$(INDI_LIBS) \
$(IIF_LIBS)

OsApp_SOURCES = OsApp.cpp
OsApp_LDFLAGS = -L. $(BASDA_MOCCA_LDFLAGS) $(BASDA_LDFLAGS) $(NICE_LDFLAGS) $(ICE_LDFLAGS) $(IIF_LDFLAGS) 
OsApp_LDADD = $(BASDA_MOCCA_LIBS) $(BASDA_LIBS) $(NICE_LIBS) $(BOOST_SYSTEM_LIBS) $(ICE_LIBS) $(IIF_LIBS)  -lLtcsIifService -lLtcsIifService_NiceType


AM_CXXFLAGS = -I. \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/motion_ctrl \
-I$(top_srcdir)/src/util \
-I$(includedir)/shins/ \
-I$(top_srcdir)/data_mgr/ \
-I$(top_srcdir)/src/tiptilt_ctrl/bcu/Interface/Sharknir/Bcu \
-I/usr/include/python2.7 \
-I/usr/include/cfitsio \
-I/usr/local/include/CCfits \
$(EIGEN_CXXFLAGS)/ \
$(ICE_CXXFLAGS) \
$(NICE_CXXFLAGS) \
$(BASDA_MOCCA_CXXFLAGS) \
$(BASDA_CXXFLAGS) \
$(INDI_CXXFLAGS) \
$(CFITSIO_CFLAGS)	\
$(BOOST_CPPFLAGS) \
$(NICEQT_CXXFLAGS) \
$(QT4_CXXFLAGS)
#-I../src/motion_ctrl/ -I../src/util/
#-D_GLIBCXX_USE_CXX11_ABI=0 
# -I$(top_srcdir)/src -I/usr/include/cfitsio -I/usr/local/include/CCfits
# -I$(srcdir)/bcu/Interface/Sharknir/Bcu -I$(srcdir)/bcu/util -I/usr/include/python2.7
# same as bin_PROGRAMS, only compiled if you do make check

check_PROGRAMS =
#ui_SHINS_log_monitor engineerctrlpanel

# for scripts
bin_SCRIPTS = obsControlServer obsControlServer.sh

# to install in PYHTHOPATH directory /opt/tan/lib/python/site-packages
# dist_python_SCRIPTS = panels/shark_eng_panel.py
dist_bin_SCRIPTS = panels/shark_eng_panel.py


# test programs or scripts.
#
# http://sources.redhat.com/automake/automake.html#Tests
#
TESTS =



#
# http://sources.redhat.com/automake/automake.html#Sources
#

# files that have to go in the dist (project archive).

# Example:
EXTRA_DIST =
dist_ui_DATA = panels/ui/Sharknir/deviceWidgetTable.ui panels/ui/Sharknir/header.ui panels/ui/Sharknir/lampWidget.ui panels/ui/Sharknir/xydeviceWidgetTable.ui panels/ui/Sharknir/deviceList.json
