Makefile 540 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
BOOST_FLAGS = -lboost_system -lboost_thread -lboost_chrono
BINARIES=timingtest

all: $(BINARIES)

egmri.pb.cc egmri.pb.h : egmri.proto
	protoc --cpp_out=. egmri.proto

timingtest:  timingtest.cpp defs.h \
	     egmri.pb.h egmri.pb.o \
	     robot_message.h robot_message.o \
	     sensor_message.h sensor_message.o 
	gcc -O3 -std=c++11 -o $@ $< $(filter %.o,$^) \
		$(BOOST_FLAGS) -lprotobuf -lstdc++ -lm -lpthread

%.o:	%.cpp %.h
	gcc -O3 -std=c++11 -c -o $@ $<

clean:
	rm -f *~
	rm -f *.o
	rm -f *.pb.h
	rm -f *.pb.cc
	rm -f $(BINARIES)