From: Felix Fietkau Date: Mon, 31 Jan 2011 18:32:58 +0000 (+0100) Subject: make libubus a dynamic library X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ea76fb270d40e11f3c4b02671babc47ffe836646;p=oweals%2Fubus.git make libubus a dynamic library --- diff --git a/.gitignore b/.gitignore index 210271d..8bd0afc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ CMakeCache.txt CMakeFiles *.cmake *.a +*.so +*.dylib ubus.sock listener ubusd diff --git a/CMakeLists.txt b/CMakeLists.txt index 3114aa9..e579297 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)