forked from bilash/threadpool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (18 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
22 lines (18 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
BINPATH=./bin
OBJPATH=./obj
all:
g++ CondVar.cpp -lpthread -fpic -c -o $(OBJPATH)/CondVar.o
g++ Mutex.cpp -lpthread -fpic -c -o $(OBJPATH)/Mutex.o
g++ Task.cpp -lpthread -fpic -c -o $(OBJPATH)/Task.o
g++ ThreadPool.cpp -lpthread -fpic -c -o $(OBJPATH)/ThreadPool.o
g++ -fPIC -shared -lpthread $(OBJPATH)/CondVar.o $(OBJPATH)/Mutex.o $(OBJPATH)/Task.o $(OBJPATH)/ThreadPool.o -o $(BINPATH)/libthreadpool.so
# g++ threadpool_test.cpp -L$(BINPATH) -lthreadpool -lpthread -fpic -o $(BINPATH)/threadpool_test
g++ $(OBJPATH)/CondVar.o $(OBJPATH)/Mutex.o $(OBJPATH)/Task.o $(OBJPATH)/ThreadPool.o threadpool_test.cpp -lpthread -o $(BINPATH)/threadpool_test
#all:
# g++ threadpool.cpp -lpthread -fpic -c -o bin/obj/threadpool.o
# g++ -L./bin bin/obj/threadpool.o -lpthread threadpool_test.cpp -o bin/example/threadpool_test
#threadpool:
# g++ threadpool.cpp -lpthread -fpic -c -o bin/obj/threadpool.o
# g++ -shared -fPIC bin/obj/threadpool.o -o bin/lib/libthreadpool.so
#example:
# g++ -L./bin/lib -lthreadpool threadpool_test.cpp -o threadpool_test