aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--Makefile15
2 files changed, 7 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..01639b2
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 3.10)
+project(extent-sampling VERSION 0.1)
+
+find_package(GSL REQUIRED)
+
+file(GLOB SOURCES "*.c")
+add_library(extentsampling SHARED ${SOURCES})
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 81c9d98..0000000
--- a/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-CC = gcc
-CFLAGS = -Wall -D_GNU_SOURCE -g -fPIC -Werror
-LDFLAGS = -lm -lgsl -lgslcblas
-
-libextentsampling.so: extent-sampling.o nd-random.o gaussian-nd-random.o oracles.o utils.o
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
-
-depends: $(wildcard *.c)
- $(CC) $(CFLAGS) -MM $^ > depends
-
-include depends
-
-.PHONY: clean
-clean:
- rm -vf *.o *.so depends