From f50c6dcb90616636d79c5f18f16f9d45e71fb568 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 19 Jan 2023 15:20:17 +0100 Subject: Switch from meson to plain make. --- Makefile | 23 +++++++++++++++++++++++ README | 4 ++-- meson.build | 16 ---------------- 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 Makefile delete mode 100644 meson.build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0eb3a7a --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +TARGET = libthreadpool.so + +CFLAGS = -std=c99 -D_XOPEN_SOURCE=700 -fPIC -fopenmp -O3 -g -I. +LDFLAGS = -Wl,--version-script=libthreadpool.v -shared -fopenmp +CC = cc + +OBJS = \ + threadpool.o + +all: $(TARGET) + +$(TARGET): $(OBJS) + $(CC) -o $@ $(OBJS) ${LDFLAGS} + +%.o: %.c + $(CC) $(CFLAGS) -MMD -MF $(@:.o=.d) -MT $@ -c -o $@ $< + +clean: + -rm -f *.o *.d $(TARGET) + +-include $(OBJS:.o=.d) + +.PHONY: clean diff --git a/README b/README index 358cf7d..7b57e59 100644 --- a/README +++ b/README @@ -10,8 +10,8 @@ via email). Building and installation ========================= -The library uses the meson build system. A C11-compliant compiler and a POSIX -environment are expected. +A C11-compliant compiler and a POSIX environment are expected. Run 'make' to +build the shared object. Usage ===== diff --git a/meson.build b/meson.build deleted file mode 100644 index c2f6c76..0000000 --- a/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('libthreadpool', 'c', - default_options : ['c_std=c11']) - -add_project_arguments('-D_XOPEN_SOURCE=700', language : 'c') - -lib_src = [ - 'threadpool.c', -] - -verscript = 'libthreadpool.v' -ver_flag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), verscript) - -dep_omp = dependency('openmp') -deps = [dep_omp] - -library('threadpool', lib_src, link_args : ver_flag, dependencies : deps) -- cgit v1.2.3