Commit c89281b3 authored by seb's avatar seb

change Makefile to manage dependancies


git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@162 45c4679d-1946-429d-baad-37912b19538b
parent 81103fb6
include ../../common/espia/include/espia.inc
SRCS = FrelonBase.cpp FrelonSerialLine.cpp FrelonCamera.cpp FrelonInterface.cpp
frelon-objs = FrelonBase.o FrelonSerialLine.o FrelonCamera.o FrelonInterface.o
CXXFLAGS = -I../include -I../../common/espia/include \
-I../../../hardware/include -I../../../common/include \
-I$(ESPIA_DRV_INCL) -Wall -pthread -fPIC
all: clean Frelon.o
all: Frelon.o
Frelon.o: $(frelon-objs)
$(LD) -o $@ -r $+
......@@ -17,3 +18,12 @@ FrelonBase.o: Frelon.cpp
clean:
rm -f *.o
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
-include $(SRCS:.cpp=.P)
\ No newline at end of file
SRCS = ./src/Frelon.cpp ../../common/espia/src/Espia.cpp \
../../../hardware/src/Hw.cpp ../../../common/src/Common.cpp
frelon-objs = ../src/Frelon.o ../../common/espia/src/Espia.o \
../../../hardware/src/Hw.o ../../../common/src/Common.o
......@@ -15,7 +17,7 @@ CXXFLAGS = -I../include -I../../common/espia/include \
-I../../../third-party/Processlib/tasks/include \
-I$(ESPIA_DRV_INCL) -Wall -pthread
all: clean testfrelon testfreloninterface
all: testfrelon testfreloninterface
testfrelon: testfrelon.o $(frelon-objs)
$(CXX) $(LDFLAGS) -o $@ $+ $(LDLIBS)
......@@ -25,3 +27,12 @@ testfreloninterface: testfreloninterface.o $(frelon-objs)
clean:
rm -f *.o testfrelon testfreloninterface
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
-include $(SRCS:.cpp=.P)
\ No newline at end of file
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