-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
163 lines (88 loc) · 10 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#sigverse header
SIG_SRC = $(SIGVERSE_PATH)/include/sigverse
# To be added to the Python path
# export PYTHONPATH=$PYTHONPATH:/home/raghav/SigverseDevelopment/examplesForPractice/MyWorld/finalproject/postAwakening/generalization
# Please add the following lie in your bashrc file. We want to add the lib/ directory of your boost installation.
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/pool/lib
#all: $(OBJS)
#compile
#./%.so: ./%.cpp
# g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -fPIC -shared -o $@ $<
#clean:
# rm ./*.so
CC = gcc
CPP = g++
AS = as
LD = g++
AR = ar
RANLIB = ranlib
OBJCOPY = objcopy
# external libraries and headers
# change the next line to point to the location of your boost installation
EXTERN_DIR = $(HOME)/lib
EXTERN_LIBDIR = $(EXTERN_DIR)/lib
EXTERN_INCDIR = $(EXTERN_DIR)/include
EXTERN_BINDIR = $(EXTERN_DIR)/bin
BOOST_PYTHON_LIB = $(EXTERN_LIBDIR)/libboost_python.a
INCDIRS = .
INCDIRS += $(EXTERN_INCDIR)
# you may also need to change this directory if you want to pin to a specific
# python version
INCDIRS += /usr/include/python2.7
INCDIRS += /usr/lib/python2.7/dist-packages/numpy/core/include
INCDIR = $(foreach dir, $(INCDIRS), -I$(dir))
WORKDIR= .
%.o: %.cpp
$(CPP) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
#specifying of object file
OBJS = libControlPosition.so libStopMotion.so libMeasureDisplacement.so ControllerSample_11.so ControllerSample_12.so ControllerSample_13.so ControllerSample_21.so ControllerSample_22.so ControllerSample_23.so ControllerSample_31.so ControllerSample_32.so ControllerSample_33.so ControllerSample_41.so ControllerSample_42.so ControllerSample_43.so ControllerSample_51.so ControllerSample_52.so ControllerSample_53.so
# OBJS = libControlPosition.so ToolController.so libSegmentPositions.so libCalculateNormals.so libControlPosition.so libToolPlacement.so
all: $(OBJS)
libControlPosition.so:: ControlPosition.cpp
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -lboost_python -lpython2.7
libApplyAction.so:: ApplyAction.cpp libControlPosition.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lControlPosition
libEntityMotionStatus.so:: EntityMotionStatus.cpp
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -lboost_python -lpython2.7
libResetEntity.so:: ResetEntity.cpp libControlPosition.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lControlPosition
libStopMotion.so:: StopMotion.cpp
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -lboost_python -lpython2.7
libMeasureDisplacement.so:: MeasureDisplacement.cpp
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -lboost_python -lpython2.7
ControllerSample_11.so :: ControllerSample_11.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_12.so :: ControllerSample_12.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_13.so :: ControllerSample_13.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_21.so :: ControllerSample_21.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_22.so :: ControllerSample_22.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_23.so :: ControllerSample_23.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_31.so :: ControllerSample_31.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_32.so :: ControllerSample_32.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_33.so :: ControllerSample_33.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_41.so :: ControllerSample_41.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_42.so :: ControllerSample_42.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_43.so :: ControllerSample_43.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_51.so :: ControllerSample_51.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_52.so :: ControllerSample_52.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
ControllerSample_53.so :: ControllerSample_53.cpp libStopMotion.so libMeasureDisplacement.so libApplyAction.so libEntityMotionStatus.so libResetEntity.so
g++ -DCONTROLLER -DNDEBUG -DUSE_ODE -DdDOUBLE -I$(SIG_SRC) -I$(SIG_SRC)/comm/controller -I$(INCDIR) -fPIC -shared -o $@ $^ $(LDFLAGS) -L$(EXTERN_LIBDIR) -L$(WORKDIR) -lboost_python -lpython2.7 -lResetEntity -lApplyAction -lMeasureDisplacement -lStopMotion -lEntityMotionStatus
#$^ , $+ The names of all the prerequisites, with spaces between them. The value of $^ omits duplicate prerequisites,
# while $+ retains them and preserves their order
clean:
rm -rf *.so *.o
#-I$(INCDIR) -I$(BOOST_PYTHON_LIB) -I$(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -lpython2.7
#-lpython2.7