diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d2c4b7d --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +CFLAGS = -std=c11 -D_XOPEN_SOURCE=700 -fPIC -g -O3 -Wall -fsanitize=thread +LIBS=-lm +LDFLAGS = -Wl,--version-script=libthreadpool.v -shared -pthread $(LIBS) -fsanitize=thread +CC = cc + +TARGET = libthreadpool.so + +OBJECTS = \ + threadpool.o \ + worker.o \ + +all: $(TARGET) + +$(TARGET): $(OBJECTS) + $(CC) ${LDFLAGS} -o $@ $(OBJECTS) + +%.o: %.c + $(CC) $(CFLAGS) -MMD -MF $(@:.o=.d) -MT $@ -c -o $@ $< + +clean: + -rm -f $(OBJECTS) $(TARGET) + +-include $(OBJECTS:.o=.d) + +.PHONY: clean |