-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (24 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CC=g++
CFLAGS=-std=gnu++0x
INCLUDES=-Iiq-module-communication-cpp/src -Iiq-module-communication-cpp/inc
OUTPUTNAME=iq_demo
OBJS=iq-module-communication-cpp/src/generic_interface.o iq-module-communication-cpp/inc/client_communication.o iq-module-communication-cpp/src/byte_queue.o iq-module-communication-cpp/src/crc_helper.o iq-module-communication-cpp/src/packet_finder.o iqmotor.o
default: simplest_demo
# How to build an object file (x.o) from a corresponding C source file (x.c)
.c.o:
$(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $<
# How to build an object file from a corresponding C++ source file (x.cpp)
.cpp.o:
$(CXX) $(INCLUDES) $(CFLAGS) -c -o $@ $<
simplest_demo: simplest_demo.o $(OBJS)
$(CC) $(CFLAGS) $(INC) -o $(OUTPUTNAME) $(OBJS) [email protected]
turn_demo: turn_demo.o $(OBJS)
$(CC) $(CFLAGS) $(INC) -o $(OUTPUTNAME) $(OBJS) [email protected]
copy_demo: copy_demo.o $(OBJS)
$(CC) $(CFLAGS) $(INC) -o $(OUTPUTNAME) $(OBJS) [email protected]
.PHONY: clean
clean:
rm *.o
rm iq-module-communication-cpp/src/*.o
rm iq-module-communication-cpp/inc/*.o
rm $(OUTPUTNAME)