Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CXXFLAGS = -DTHPOOL_DEBUG -pthread

./bin/example : ./obj/example.o ./obj/thpool.o
gcc -o $@ $^ $(CXXFLAGS) $(LIBS)

./obj/thpool.o : thpool.c
gcc -c -o $@ $< $(CXXFLAGS)

./obj/example.o : example.c
gcc -c -o $@ $< $(CXXFLAGS)

.PHONY : clean

clean:
rm -f ./bin/* ./obj/*.o
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ If this project reduced your development time feel free to buy me a coffee.
The library is not precompiled so you have to compile it with your project. The thread pool
uses POSIX threads so if you compile with gcc on Linux you have to use the flag `-pthread` like this:

gcc example.c thpool.c -D THPOOL_DEBUG -pthread -o example
make


Then run the executable like this:

./example
./bin/example


## Basic usage
Expand Down