forked from eighthave/MPOST_Linux_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (34 loc) · 1.04 KB
/
Makefile
File metadata and controls
46 lines (34 loc) · 1.04 KB
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
CXXFLAGS = -I/usr/include/python2.6 -I../MPOST_Linux/
LDFLAGS =
LIBS = $(libMPOST)
libMPOST = ../MPOST_Linux/Debug/libMPOST_Linux.a
# All Target
all: mpostmodule.so
$(libMPOST): ../MPOST_Linux/*.h ../MPOST_Linux/*.cpp
make -C ../MPOST_Linux/Debug clean all
# Tool invocations
libpympost.so: main.o $(LIBS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
$(CXX) -rdynamic -shared -fPIC -o $@ main.o $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
libpympost.a: main.o
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
ar -r "libpympost.a" main.o
@echo 'Finished building target: $@'
@echo ' '
mpostmodule.so: CAcceptor.o
$(CXX) -rdynamic -shared -fPIC -o $@ CAcceptor.o $(LIBS) -lboost_python
test: test.o main.o
g++ -o test test.o -lpthread main.o $(LIBS)
testso: test.o libpympost.so
g++ -o testso test.o -lpthread -L. -lpympost
# Other Targets
clean:
-$(RM) main.o libpympost.so libpympost.a test testso test.o
-@echo ' '
TAGS:
etags *.cpp ../MPOST_Linux/*.h ../MPOST_Linux/*.cpp
.PHONY: all clean