Commit 3ab33349 authored by Laurent Claustre's avatar Laurent Claustre

Include cpp and linker flags in control.inc, upgrade subsystems Makefiles:

* Common, Hardware, Control, Software_Operations, GLDisplay, Simulator

Conflicts:

	third-party/gldisplay
parent 6401de57
......@@ -20,9 +20,6 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../config.inc
############################
# HELPER MACROS
############################
......@@ -31,6 +28,10 @@ this-dir := $(shell pwd)
lima-dir := $(this-dir)/..
third-party-dir := $(lima-dir)/third-party
LIMA_DIR = $(lima-dir)
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
full-version = $(shell cat $(1))
minor-version = $(shell echo $(call full-version,$(1)) | cut -f1-2 -d.)
ifneq ($(LINK_STRICT_VERSION),0)
......@@ -44,20 +45,6 @@ lib-full = $(call lib-base,$(1)).$(call full-version,$(2))
lib-minor = $(call lib-base,$(1)).$(call minor-version,$(2))
lib-link = $(call lib-base,$(1)).$(call link-version,$(2))
lib-flags = -fPIC -Wl,-soname,$(call lib-link,$(1),$(2))
lib-depshcmd = for p in $(1); do \
d=$$(echo $${p} | cut -d, -f1); \
l=$$(echo $${p} | cut -d, -f2); \
template=$$(echo $${p} | cut -d, -f3); \
if [ ! -z $${template} ] ; then \
eval echo $${template}; \
else \
echo $(2); \
fi \
done
lib-depflagsstr = "-L $${d} -Wl,-rpath=$${d}"
lib-depflags = $(shell $(call lib-depshcmd,$(1),$(lib-depflagsstr)))
lib-deplibs = $(shell $(call lib-depshcmd,$(1),"-l$${l}"))
lib-deps = $(shell $(call lib-depshcmd,$(1),"$${d}/lib$${l}.so"))
# 1=name, 2=ver-file 3=deps 4=flags 5=libs, 6=target, 7=objs
compile-lib = \
......@@ -75,40 +62,12 @@ create-links = \
# LIMA - CORE
############################
CORE_LDFLAGS :=
CORE_LDLIBS := -lrt
CORE_DEPLIBS := $(third-party-dir)/Processlib/build,processlib
ifneq ($(COMPILE_CBF_SAVING),0)
CORE_LDLIBS += -lcrypto
CORE_DEPLIBS += $(third-party-dir)/CBFLib/lib,cbf,'$${d}/lib$${l}.a'
endif
ifneq ($(COMPILE_FITS_SAVING),0)
CORE_DEPLIBS += $(third-party-dir)/cfitsio/lib,cfitsio \
$(third-party-dir)/CCfits/.libs,CCfits
endif
ifneq ($(COMPILE_EDFGZ_SAVING),0)
CORE_LDLIBS += -lz
endif
ifneq ($(COMPILE_EDFLZ4_SAVING),0)
CORE_LDLIBS += -llz4
endif
ifneq ($(COMPILE_TIFF_SAVING),0)
CORE_LDLIBS += -ltiff
endif
CORE_LDFLAGS := $(CT_LDFLAGS)
CORE_LDLIBS := $(CT_LDLIBS)
CORE_DEPLIBS := $(CT_DEPLIBS)
ifneq ($(COMPILE_HDF5_SAVING),0)
PROCESSOR_TYPE := $(shell uname -m)
CORE_DEPLIBS += $(third-party-dir)/hdf5/src/.libs,hdf5 \
$(third-party-dir)/hdf5/c++/src/.libs,hdf5_cpp
endif
ifneq ($(COMPILE_CONFIG),0)
CORE_DEPLIBS += $(third-party-dir)/libconfig/lib/.libs,config++
endif
ifneq ($(COMPILE_CORE),0)
......
......@@ -19,14 +19,19 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../../..
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
simu-objs = SimulatorFrameBuilder.o SimulatorCamera.o SimulatorInterface.o \
SimulatorSyncCtrlObj.o SimulatorDetInfoCtrlObj.o SimulatorShutterCtrlObj.o
SRCS = $(simu-objs:.o=.cpp)
CXX = g++
INC = -I../include -I../../../common/include -I../../../hardware/include
CXXFLAGS += $(INC) -Wall -pthread -fPIC -g
CPPFLAGS = -I../include $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
all: Simu.o
......@@ -37,7 +42,7 @@ clean:
rm -f Simu.o *.P $(simu-objs)
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -47,4 +52,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,36 +19,38 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../../..
simu-objs = ../src/Simu.o
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
test-objs = test.o
test-ext-objs = $(simu-objs)
testsimulator-objs = testsimulator.o
testsimulator-ext-objs = $(simu-objs)
testsimuhwinterface-objs = testsimuhwinterface.o
testsimuhwinterface-ext-objs = $(simu-objs)
SRCS = $(test-objs:.o=.cpp) $(testsimulator-objs:.o=.cpp) \
$(testsimuhwinterface-objs:.o=.cpp)
INC = -I../include -I../../../common/include -I../../../hardware/include -I../../../third-party/Processlib/core/include
CXXFLAGS += $(INC) -Wall -pthread -g
LDFLAGS = -L../../../third-party/Processlib/build -lprocesslib -L../../../build -llimacore -pthread -lrt
CPPFLAGS = -I../include $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) \
$(LIMA_DIR)/build,limacore \
$(LIMA_DIR)/build,limasimulator
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS))
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS))
all: test testsimulator testsimuhwinterface
test: $(test-objs) $(test-ext-objs)
$(CXX) -o $@ $+ $(LDFLAGS)
test: $(test-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
testsimulator: $(testsimulator-objs) $(testsimulator-ext-objs)
$(CXX) -o $@ $+ $(LDFLAGS)
testsimulator: $(testsimulator-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
testsimuhwinterface: $(testsimuhwinterface-objs) \
$(testsimuhwinterface-ext-objs)
$(CXX) -o $@ $+ $(LDFLAGS)
testsimuhwinterface: $(testsimuhwinterface-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
clean:
rm -f $(test-objs) test *.edf
......@@ -57,7 +59,7 @@ clean:
rm -f *.P
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......
......@@ -19,7 +19,10 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../../config.inc
LIMA_DIR := $(shell pwd)/../..
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
common-objs := Constants.o SizeUtils.o Timestamp.o ThreadUtils.o Exceptions.o \
MemUtils.o RegExUtils.o AcqState.o Debug.o VideoUtils.o Event.o \
......@@ -29,10 +32,11 @@ has_not_inotify = $(shell grep INOTIFY_USER /boot/config-$(shell uname -r) >/dev
SRCS = $(common-objs:.o=.cpp)
CXXFLAGS += -I../include -I../../hardware/include -I../../third-party/Processlib/core/include -Wall -pthread -fPIC -g
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
ifeq ($(has_not_inotify),0)
CXXFLAGS += -DHAS_INOTIFY
CPPFLAGS += -DHAS_INOTIFY
endif
ifndef COMPILE_CONFIG
......@@ -41,7 +45,7 @@ endif
ifneq ($(COMPILE_CONFIG),0)
common-objs += ConfigUtils.o
CXXFLAGS += -DWITH_CONFIG -I../../third-party/libconfig/lib
CPPFLAGS += -DWITH_CONFIG -I$(LIMA_DIR)/third-party/libconfig/lib
endif
all: Common.o
......@@ -54,7 +58,7 @@ clean:
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -64,4 +68,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,20 +19,27 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../..
include $(LIMA_DIR)/control/control.inc
SRCS = testregex.cpp
CXXFLAGS = -Wall -I ../include -pthread -g
LDFLAGS = -L../../build/ -Wl,--no-as-needed,-rpath=$(shell pwd)/../../build -llimacore -lpthread
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) $(LIMA_DIR)/build,limacore
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS))
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS))
all: testregex
testregex: testregex.o
$(CXX) $(LDFLAGS) -o $@ $+
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
clean:
rm -f *.o testregex
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -42,4 +49,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -20,11 +20,12 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
ct-objs := CtSaving.o CtControl.o CtAcquisition.o CtBuffer.o \
ct-objs = CtSaving.o CtControl.o CtAcquisition.o CtBuffer.o \
CtImage.o CtSaving_Edf.o CtShutter.o CtAccumulation.o CtVideo.o \
CtEvent.o
CT_INCLS = -I. -I$(LIMA_DIR)/common/include -I$(LIMA_DIR)/hardware/include \
CT_INCLS = -I$(LIMA_DIR)/common/include \
-I$(LIMA_DIR)/hardware/include \
-I$(LIMA_DIR)/control/include \
-I$(LIMA_DIR)/control/software_operation/include \
-I$(LIMA_DIR)/third-party/Processlib/core/include \
......@@ -32,9 +33,11 @@ CT_INCLS = -I. -I$(LIMA_DIR)/common/include -I$(LIMA_DIR)/hardware/include \
-I$(LIMA_DIR)/third-party/Sps/Include # \
# -I/usr/include/nexuscpp/include
ifneq ($(CT_LIBS),0)
CT_LIBS=
endif
CT_CPPFLAGS =
CT_CXXFLAGS =
CT_DEPLIBS = $(LIMA_DIR)/third-party/Processlib/build,processlib
CT_LDFLAGS = -pthread
CT_LDLIBS = -lrt
ifndef COMPILE_CBF_SAVING
COMPILE_CBF_SAVING = 0
......@@ -43,7 +46,9 @@ endif
ifneq ($(COMPILE_CBF_SAVING),0)
ct-objs += CtSaving_Cbf.o
CT_INCLS += -I$(LIMA_DIR)/third-party/CBFLib/include
CT_CXXFLAGS += -DWITH_CBF_SAVING
CT_CPPFLAGS += -DWITH_CBF_SAVING
CT_DEPLIBS += $(LIMA_DIR)/third-party/CBFLib/lib,cbf
CT_LDLIBS += -lcrypto
endif
ifndef COMPILE_HDF5_SAVING
......@@ -54,7 +59,7 @@ ifneq ($(COMPILE_HDF5_SAVING),0)
ct-objs += CtSaving_Hdf5.o
CT_INCLS += -I$(LIMA_DIR)/third-party/hdf5/src
CT_INCLS += -I$(LIMA_DIR)/third-party/hdf5/c++/src
CT_CXXFLAGS += -DWITH_HDF5_SAVING
CT_CPPFLAGS += -DWITH_HDF5_SAVING
endif
ifndef COMPILE_NXS_SAVING
......@@ -66,7 +71,9 @@ ct-objs += CtSaving_Nxs.o
# nexuscpp lib is not yet available but soon !
#CT_INCLS += -I$(LIMA_DIR)/third-party/NXSLib/include
CT_INCLS += `pkg-config nexuscpp --cflags-only-I`
CT_CXXFLAGS += -DWITH_NXS_SAVING
CT_CPPFLAGS += -DWITH_NXS_SAVING
CT_DEPLIBS += $(LIMA_DIR)/third-party/hdf5/src/.libs,hdf5 \
$(LIMA_DIR)/third-party/hdf5/c++/src/.libs,hdf5_cpp
endif
ifndef COMPILE_FITS_SAVING
......@@ -75,12 +82,10 @@ endif
ifneq ($(COMPILE_FITS_SAVING),0)
ct-objs += CtSaving_Fits.o
CT_CXXFLAGS += -DWITH_FITS_SAVING -I$(LIMA_DIR)/third-party/cfitsio \
-I$(LIMA_DIR)/third-party
#CT_LIBS += -L$(LIMA_DIR)/third-party/CCfits/.libs \
-L$(LIMA_DIR)/third-party/cfitsio/libs \
-lcfitsio \
-lCCfits
CT_INCLS += -I$(LIMA_DIR)/third-party/cfitsio -I$(LIMA_DIR)/third-party
CT_CPPFLAGS += -DWITH_FITS_SAVING
CT_DEPLIBS += $(LIMA_DIR)/third-party/cfitsio/lib,cfitsio \
$(LIMA_DIR)/third-party/CCfits/.libs,CCfits
endif
ifndef COMPILE_EDFGZ_SAVING
......@@ -88,7 +93,8 @@ COMPILE_EDFGZ_SAVING = 0
endif
ifneq ($(COMPILE_EDFGZ_SAVING),0)
CT_CXXFLAGS += -DWITH_EDFGZ_SAVING
CT_CPPFLAGS += -DWITH_EDFGZ_SAVING
CT_LDLIBS += -lz
endif
ifndef COMPILE_EDFLZ4_SAVING
......@@ -96,7 +102,8 @@ COMPILE_EDFLZ4_SAVING = 0
endif
ifneq ($(COMPILE_EDFLZ4_SAVING),0)
CT_CXXFLAGS += -DWITH_EDFLZ4_SAVING
CT_CPPFLAGS += -DWITH_EDFLZ4_SAVING
CT_LDLIBS += -llz4
endif
ifndef COMPILE_TIFF_SAVING
......@@ -105,7 +112,7 @@ endif
ifneq ($(COMPILE_TIFF_SAVING),0)
ct-objs += CtSaving_Tiff.o
CT_CXXFLAGS += -DWITH_TIFF_SAVING
CT_CPPFLAGS += -DWITH_TIFF_SAVING
endif
ifndef COMPILE_SPS_IMAGE
......@@ -114,7 +121,7 @@ endif
ifneq ($(COMPILE_SPS_IMAGE),0)
ct-objs += CtSpsImage.o $(LIMA_DIR)/third-party/Sps/Src/sps.o
CT_CXXFLAGS += -DWITH_SPS_IMAGE
CT_CPPFLAGS += -DWITH_SPS_IMAGE
endif
ifndef COMPILE_CONFIG
......@@ -123,8 +130,25 @@ endif
ifneq ($(COMPILE_CONFIG),0)
ct-objs += CtConfig.o
CT_CXXFLAGS += -DWITH_CONFIG -I$(LIMA_DIR)/third-party/libconfig/lib
CT_INCLS += -I$(LIMA_DIR)/third-party/libconfig/lib
CT_CPPFLAGS += -DWITH_CONFIG
CT_DEPLIBS += $(LIMA_DIR)/third-party/libconfig/lib/.libs,config++
endif
CT_CXXFLAGS += $(CT_INCLS) -fPIC -Wall -pthread -g
CT_CPPFLAGS += $(CT_INCLS)
CT_CXXFLAGS += -fPIC -Wall -pthread -g
############################
# HELPER MACROS
############################
lib-depshcmd = for p in $(1); do \
d=$$(echo $${p} | cut -d, -f1); \
l=$$(echo $${p} | cut -d, -f2); \
echo $(2); \
done
lib-depflagsstr = "-L $${d} -Wl,-rpath=$${d}"
lib-depflags = $(shell $(call lib-depshcmd,$(1),$(lib-depflagsstr)))
lib-deplibs = $(shell $(call lib-depshcmd,$(1),"-l$${l}"))
lib-deps = $(shell $(call lib-depshcmd,$(1),"$${d}/lib$${l}.so"))
......@@ -19,13 +19,17 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../../..
ct-objs := SoftOpInternalMgr.o SoftOpExternalMgr.o SoftOpId.o
SRCS = $(ct-objs:.o=.cpp)
INCLUDES=-I../include -I../../../third-party/Processlib/core/include -I../../../third-party/Processlib/tasks/include -I../../../common/include
CXXFLAGS += $(INCLUDES) -fPIC -Wall -pthread -g
CPPFLAGS = -I../include \
-I$(LIMA_DIR)/third-party/Processlib/core/include \
-I$(LIMA_DIR)/third-party/Processlib/tasks/include \
-I$(LIMA_DIR)/common/include
CXXFLAGS = -fPIC -Wall -pthread -g
all: CtSoftwareOperation.o
......@@ -37,7 +41,7 @@ clean:
rm -f CtSoftwareOperation.o $(ct-objs) *.P
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -48,4 +52,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -24,20 +24,24 @@ LIMA_DIR := $(shell pwd)/../..
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
LDFLAGS = $(CT_LDFLAGS)
LDLIBS = $(CT_LIBS) $(lib-deplibs $(CT_DEPLIBS))
SRCS = $(ct-objs:.o=.cpp)
all: Ct.o
Ct.o: $(ct-objs) ../software_operation/src/CtSoftwareOperation.o
ld $(CT_LIBS) -o $@ -r $+
ld -o $@ -r $+
clean:
rm -f Ct.o $(ct-objs) *.P
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -47,4 +51,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,58 +19,38 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
include ../../config.inc
LIMA_DIR := $(shell pwd)/../..
simu-objs = ../../camera/simulator/src/Simu.o
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
simutest-objs = simutest.o
simutest-ext-objs = $(simu-objs)
SRCS = $(simutest-objs:.o=.cpp)
INC = -I../include -I../../common/include -I../control/include \
-I../../hardware/include -I../../camera/simulator/include \
-I../software_operation/include \
-I../../third-party/Processlib/core/include \
-I../../third-party/Processlib/tasks/include
CPPFLAGS += $(INC)
CXXFLAGS += -g -Wall -pthread
LDFLAGS = -pthread
LDLIBS = -L../../build -llimacore \
-L../../third-party/Processlib/build -lprocesslib
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) $(LIMA_DIR)/build,limacore
build_targets = roicountertest
ifndef COMPILE_CBF_SAVING
COMPILE_CBF_SAVING = 0
endif
ifneq ($(COMPILE_CBF_SAVING),0)
LDLIBS += -L../../third-party/CBFLib/lib -lcbf
endif
ifneq ($(COMPILE_FITS_SAVING),0)
CXXFLAGS += -DWITH_FITS_SAVING -I../../third-party/cfitsio \
-I../../third-party
LDLIBS += -L../../third-party/CCfits/.libs \
-L../../third-party/cfitsio/lib \
-lcfitsio \
-lCCfits
endif
ifndef COMPILE_SIMULATOR
COMPILE_SIMULATOR = 0
endif
ifneq ($(COMPILE_SIMULATOR),0)
build_targets += simutest
CPPFLAGS += -I$(LIMA_DIR)/camera/simulator/include
DEPLIBS += $(LIMA_DIR)/build,limasimulator
endif
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS))
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS))
all: $(build_targets)
simutest: $(simutest-objs) $(simutest-ext-objs)
simutest: $(simutest-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
roicountertest: roicountertest.o
......@@ -81,7 +61,7 @@ clean:
roicountertest roicountertest.o
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -91,4 +71,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -19,6 +19,11 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
LIMA_DIR := $(shell pwd)/../..
include $(LIMA_DIR)/config.inc
include $(LIMA_DIR)/control/control.inc
hw-objs := HwInterface.o HwCap.o HwSyncCtrlObj.o HwFrameInfo.o \
HwFrameCallback.o HwBufferCtrlObj.o HwBufferMgr.o \
HwShutterCtrlObj.o HwMaxImageSizeCallback.o HwDetInfoCtrlObj.o \
......@@ -28,8 +33,8 @@ hw-objs := HwInterface.o HwCap.o HwSyncCtrlObj.o HwFrameInfo.o \
SRCS = $(hw-objs:.o=.cpp)
CXXFLAGS += -I../include -I../../common/include -I../../third-party/Processlib/core/include \
-Wall -pthread -fPIC -g
CPPFLAGS = $(CT_CPPFLAGS)
CXXFLAGS = $(CT_CXXFLAGS)
all: Hw.o
......@@ -40,7 +45,7 @@ clean:
rm -f Hw.o *.P $(hw-objs)
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
$(COMPILE.cpp) $(CPPFLAGS) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
......@@ -50,4 +55,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
Subproject commit b2afaa88ff60333b2c39d0f1e6bc6c7bde512643
Subproject commit 54b9bda60cd7151af9753054bd0c2472a79a2679
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment