make libubus a dynamic library
authorFelix Fietkau <nbd@openwrt.org>
Mon, 31 Jan 2011 18:32:58 +0000 (19:32 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 31 Jan 2011 18:32:58 +0000 (19:32 +0100)
.gitignore
CMakeLists.txt

index 210271d9711549ba9bceadfe73ec5664bcced825..8bd0afc5e870abec0b34b7eee72c876e254a5e48 100644 (file)
@@ -3,6 +3,8 @@ CMakeCache.txt
 CMakeFiles
 *.cmake
 *.a
+*.so
+*.dylib
 ubus.sock
 listener
 ubusd
index 3114aa9c111553f328475eef1af4a08373dda47f..e579297ef9401c21e25af58b0b6beba1feb98019 100644 (file)
@@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 2.8)
 
 PROJECT(ubus C)
 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3)
-ADD_LIBRARY(ubus STATIC libubus.c)
+
+ADD_LIBRARY(ubus SHARED libubus.c)
+TARGET_LINK_LIBRARIES(ubus ubox)
 
 ADD_EXECUTABLE(ubusd ubusd.c ubusd_id.c ubusd_obj.c ubusd_proto.c)
 TARGET_LINK_LIBRARIES(ubusd ubox)