aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-02-03 14:58:23 +0530
committerArun Isaac2021-02-03 14:58:23 +0530
commit707afdfe66dd9c931af77e4ff73186fd89ed27fd (patch)
treea30f0592da7b91c17e1a7ce4716c7a02cfc5dbaa
parentac33f97e8bc2262939339de704e267a29aa1f7a3 (diff)
downloadnsmc-707afdfe66dd9c931af77e4ff73186fd89ed27fd.tar.gz
nsmc-707afdfe66dd9c931af77e4ff73186fd89ed27fd.tar.lz
nsmc-707afdfe66dd9c931af77e4ff73186fd89ed27fd.zip
Set up a cmake build system.
* Makefile: Delete file. * CMakeLists.txt: New file.
-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