summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-02-28 16:00:51 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-02-28 16:00:51 +0100
commit511a0a0273276a41b73c45a2470ad872fdde1381 (patch)
tree541c13f8c204abea02d604d97c0e68957d30dcb2
parent00eb456826d3e76cc22505f21e9ad5cdd95d1e62 (diff)
downloadfastd-511a0a0273276a41b73c45a2470ad872fdde1381.tar
fastd-511a0a0273276a41b73c45a2470ad872fdde1381.zip
Migrate to CMake
-rw-r--r--.gitignore3
-rw-r--r--CMakeLists.txt8
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile13
4 files changed, 11 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index c344a07..bdc5af0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
*~
-*.o
-fastd
+build
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..c17b742
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 2.6)
+project(FASTD)
+
+set(CMAKE_MODULE_PATH ${FASTD_SOURCE_DIR})
+
+#configure_file(${FAST_SOURCE_DIR}/config.h.in ${FAST_BINARY_DIR}/config.h)
+
+add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..3af62b3
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_executable(fastd fastd.c handshake.c method_null.c queue.c task.c)
+target_link_libraries(fastd rt)
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index e36757e..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all : fastd
-
-fastd : fastd.o method_null.o task.o handshake.o queue.o
- $(CC) -o $@ $^ -lrt
-
-fastd.o : fastd.c fastd.h task.h queue.h handshake.h
-handshake.o : handshake.c packet.h handshake.h queue.h
-method_null.o : method_null.c fastd.h task.h queue.h
-task.o : task.c task.h queue.h
-queue.o : queue.c queue.h
-
-clean :
- rm -f fastd fastd.o handshake.o method_null.o task.o queue.o