Commit 820cec62 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

Use Makefile cpp and linker flags from control.inc

parent e1725990
......@@ -31,8 +31,10 @@ frelon-objs = FrelonBase.o FrelonSerialLine.o FrelonModel.o FrelonCamera.o \
SRCS = $(frelon-objs:.o=.cpp)
CXXFLAGS = -I../include -I$(LIMA_ESPIA_DIR)/include $(CT_CXXFLAGS) \
CPPFLAGS = -I../include -I$(LIMA_ESPIA_DIR)/include $(CT_CPPFLAGS) \
-I$(ESPIA_DRV_INCL)
CXXFLAGS = $(CT_CXXFLAGS)
all: Frelon.o
......@@ -40,13 +42,13 @@ Frelon.o: $(frelon-objs)
$(LD) -o $@ -r $+
FrelonBase.o: Frelon.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(CXX) $(CPPFLAGS) -c $(CXXFLAGS) -o $@ $<
clean:
rm -f *.o *.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; \
......@@ -56,4 +58,4 @@ clean:
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
$(CXX) $(CPPFLAGS) -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
......@@ -29,21 +29,15 @@ include $(LIMA_ESPIA_DIR)/include/espia.inc
SRCS = test_frelon.cpp test_frelon_interface.cpp test_frelon_spectroscopy.cpp \
test_frelon_control.cpp
LDFLAGS = -pthread -L$(LIMA_DIR)/build -L$(ESPIA_DRV_LIB)
LDLIBS = -llimafrelon -llimaespia -llimacore -lespia
ifneq ($(COMPILE_CBF_SAVING), 0)
LDFLAGS += -L$(LIMA_DIR)/third-party/CBFLib/lib
LDLIBS += -lcbf
endif
ifneq ($(COMPILE_CONFIG), 0)
LDFLAGS += -L$(LIMA_DIR)/third-party/libconfig/lib/.libs
LDLIBS += -lconfig++
endif
CXXFLAGS = -I../include -I$(LIMA_ESPIA_DIR)/include $(CT_CXXFLAGS) \
CPPFLAGS = -I../include -I$(LIMA_ESPIA_DIR)/include $(CT_CPPFLAGS) \
-I$(ESPIA_DRV_INCL)
CXXFLAGS = $(CT_CXXFLAGS)
DEPLIBS = $(CT_DEPLIBS) \
$(LIMA_DIR)/build,limacore \
$(LIMA_DIR)/build,limaespia \
$(LIMA_DIR)/build,limafrelon
LDFLAGS = $(CT_LDFLAGS) $(call lib-depflags,$(DEPLIBS)) -L$(ESPIA_DRV_LIB)
LDLIBS = $(CT_LDLIBS) $(call lib-deplibs,$(DEPLIBS)) -lespia
test-progs = test_frelon test_frelon_interface test_frelon_spectroscopy \
test_frelon_control
......@@ -68,7 +62,7 @@ clean:
rm -f *.o *.P $(test-progs) $(old-progs)
%.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; \
......
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