-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
87 lines (67 loc) · 1.77 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#INCLUDE:=\
# include/Arm.h\
# include/canopen_master/layer.h\
# include/canopen_master/objdict.h\
# include/canopen_master/can_layer.h\
# include/canopen_master/master.h\
# include/canopen_master/exceptions.h\
# include/canopen_master/canopen.h\
# include/canopen_master/timer.h\
# include/canopen_402/motor.h\
# include/canopen_402/base.h\
# include/socketcan_interface/threading.h\
# include/socketcan_interface/interface.h\
# include/socketcan_interface/dummy.h\
# include/socketcan_interface/dispatcher.h\
# include/socketcan_interface/string.h\
# include/socketcan_interface/asio_base.h\
# include/socketcan_interface/reader.h\
# include/socketcan_interface/FastDelegate.h\
# include/socketcan_interface/socketcan.h
#
#SRC:=\
# src/emcy.cpp \
# src/master.cpp \
# src/motor.cpp \
# src/node.cpp \
# src/objdict.cpp \
# src/pdo.cpp \
# src/sdo.cpp
INCLUDE:=\
include/FTSLWA.h \
include/ipa_canopen_core/schunkErrors.h \
include/ipa_canopen_core/canopen.h \
include/ipa_canopen_core/pcan_compat.h
# include/Arm.h \
SRC:=\
src/ipa_canopen_core.cpp \
src/pcan_compat.cpp \
src/FTSLWA.cpp
# src/Arm.cpp \
OBJ:=$(patsubst src/%.cpp,obj/%.o,$(SRC))
#CFLAGS:=-std=c++11 -fPIC -g -Iinclude
CFLAGS:=-std=c++0x -fPIC -g -Iinclude
ifndef CXX
CXX:=c++
endif
all: lib/libPowerballArm.so examples
clean:
-rm lib/libPowerballArm.so
-rm $(OBJ)
lib/libPowerballArm.so: $(OBJ)
@mkdir -p lib
$(CXX) -shared -o $@ $^ -lboost_thread -lboost_system -lpthread
obj/%.o: src/%.cpp
@mkdir -p obj
$(CXX) -c $(CFLAGS) -o $@ $^
examples: FORCE
$(MAKE) -C examples
include Makefile.dep
Makefile.dep:
$(info building Makefile.dep)
$(CXX) $(CFLAGS) -MM $(SRC) >Makefile.dep
info:
$(info SRC=$(SRC))
$(info OBJ=$(OBJ))
FORCE:
.PHONY: info all clean examples