summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-01-10 16:49:13 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-01-10 17:07:02 +0100
commit616c49a5053830a5e0a31c71fd6114926e43235f (patch)
tree8a21f60862a86d5fb2faf5ed7fd70aa7a2ce69d5
parent63b36a2b5b8e04f5d96fa9aa8d212a01c73aad49 (diff)
downloadlogdiag-616c49a5053830a5e0a31c71fd6114926e43235f.tar.gz
logdiag-616c49a5053830a5e0a31c71fd6114926e43235f.tar.xz
logdiag-616c49a5053830a5e0a31c71fd6114926e43235f.zip
Make a separate library.
This is required for gtkdoc-scangobj. So far it's much like it's been before, the main differences are that source files are in two directories from now on and the build process has two stages.
-rw-r--r--CMakeLists.txt74
-rw-r--r--liblogdiag/ld-canvas.c (renamed from src/ld-canvas.c)0
-rw-r--r--liblogdiag/ld-canvas.h (renamed from src/ld-canvas.h)0
-rw-r--r--liblogdiag/ld-diagram-object.c (renamed from src/ld-diagram-object.c)0
-rw-r--r--liblogdiag/ld-diagram-object.h (renamed from src/ld-diagram-object.h)0
-rw-r--r--liblogdiag/ld-diagram-symbol.c (renamed from src/ld-diagram-symbol.c)0
-rw-r--r--liblogdiag/ld-diagram-symbol.h (renamed from src/ld-diagram-symbol.h)0
-rw-r--r--liblogdiag/ld-diagram.c (renamed from src/ld-diagram.c)0
-rw-r--r--liblogdiag/ld-diagram.h (renamed from src/ld-diagram.h)0
-rw-r--r--liblogdiag/ld-library.c (renamed from src/ld-library.c)0
-rw-r--r--liblogdiag/ld-library.h (renamed from src/ld-library.h)0
-rw-r--r--liblogdiag/ld-lua-private.h (renamed from src/ld-lua-private.h)0
-rw-r--r--liblogdiag/ld-lua-symbol-private.h (renamed from src/ld-lua-symbol-private.h)0
-rw-r--r--liblogdiag/ld-lua-symbol.c (renamed from src/ld-lua-symbol.c)0
-rw-r--r--liblogdiag/ld-lua-symbol.h (renamed from src/ld-lua-symbol.h)0
-rw-r--r--liblogdiag/ld-lua.c (renamed from src/ld-lua.c)0
-rw-r--r--liblogdiag/ld-lua.h (renamed from src/ld-lua.h)0
-rw-r--r--liblogdiag/ld-marshal.c (renamed from src/ld-marshal.c)0
-rw-r--r--liblogdiag/ld-marshal.h (renamed from src/ld-marshal.h)0
-rw-r--r--liblogdiag/ld-marshal.list (renamed from src/ld-marshal.list)0
-rw-r--r--liblogdiag/ld-symbol-category.c (renamed from src/ld-symbol-category.c)0
-rw-r--r--liblogdiag/ld-symbol-category.h (renamed from src/ld-symbol-category.h)0
-rw-r--r--liblogdiag/ld-symbol.c (renamed from src/ld-symbol.c)0
-rw-r--r--liblogdiag/ld-symbol.h (renamed from src/ld-symbol.h)0
-rw-r--r--liblogdiag/ld-types.c (renamed from src/ld-types.c)0
-rw-r--r--liblogdiag/ld-types.h (renamed from src/ld-types.h)0
-rw-r--r--liblogdiag/liblogdiag.h (renamed from src/liblogdiag.h)0
-rwxr-xr-xpo/make-template.sh5
-rw-r--r--src/ld-window-main.c3
29 files changed, 46 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75eb11a..762a9ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,37 +79,41 @@ find_package (GtkDoc)
set (project_DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/docs/reference")
# Project source files
+set (liblogdiag_SOURCES
+ liblogdiag/ld-marshal.c
+ liblogdiag/ld-types.c
+ liblogdiag/ld-diagram.c
+ liblogdiag/ld-diagram-object.c
+ liblogdiag/ld-diagram-symbol.c
+ liblogdiag/ld-canvas.c
+ liblogdiag/ld-library.c
+ liblogdiag/ld-symbol-category.c
+ liblogdiag/ld-symbol.c
+ liblogdiag/ld-lua.c
+ liblogdiag/ld-lua-symbol.c)
+set (liblogdiag_HEADERS
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ liblogdiag/liblogdiag.h
+ liblogdiag/ld-marshal.h
+ liblogdiag/ld-types.h
+ liblogdiag/ld-diagram.h
+ liblogdiag/ld-diagram-object.h
+ liblogdiag/ld-diagram-symbol.h
+ liblogdiag/ld-canvas.h
+ liblogdiag/ld-library.h
+ liblogdiag/ld-symbol-category.h
+ liblogdiag/ld-symbol.h
+ liblogdiag/ld-lua.h
+ liblogdiag/ld-lua-private.h
+ liblogdiag/ld-lua-symbol.h
+ liblogdiag/ld-lua-symbol-private.h)
+
set (logdiag_SOURCES
- src/logdiag.c
- src/ld-marshal.c
- src/ld-types.c
src/ld-window-main.c
- src/ld-diagram.c
- src/ld-diagram-object.c
- src/ld-diagram-symbol.c
- src/ld-canvas.c
- src/ld-library.c
- src/ld-symbol-category.c
- src/ld-symbol.c
- src/ld-lua.c
- src/ld-lua-symbol.c)
+ src/logdiag.c)
set (logdiag_HEADERS
- ${CMAKE_CURRENT_BINARY_DIR}/config.h
- src/liblogdiag.h
- src/ld-marshal.h
- src/ld-types.h
- src/ld-window-main.h
- src/ld-diagram.h
- src/ld-diagram-object.h
- src/ld-diagram-symbol.h
- src/ld-canvas.h
- src/ld-library.h
- src/ld-symbol-category.h
- src/ld-symbol.h
- src/ld-lua.h
- src/ld-lua-private.h
- src/ld-lua-symbol.h
- src/ld-lua-symbol-private.h)
+ ${liblogdiag_HEADERS}
+ src/ld-window-main.h)
# Generate a configure file
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
@@ -151,18 +155,24 @@ function (glib_genmarshal base prefix)
endif (GLIB_GENMARSHAL_EXECUTABLE)
endfunction (glib_genmarshal)
-glib_genmarshal (${CMAKE_CURRENT_SOURCE_DIR}/src/ld-marshal
+glib_genmarshal (${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag/ld-marshal
g_cclosure_user_marshal)
-# Build the executable
+include_directories (${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag)
include_directories (${GTK2_INCLUDE_DIRS} ${JSON_GLIB_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
+
+# Build the library
+add_library (liblogdiag STATIC ${liblogdiag_SOURCES} ${liblogdiag_HEADERS})
+set_target_properties (liblogdiag PROPERTIES OUTPUT_NAME logdiag)
+
+# Build the executable
add_executable (logdiag ${logdiag_SOURCES} ${logdiag_HEADERS})
-target_link_libraries (logdiag ${GTK2_LIBRARIES} ${JSON_GLIB_LIBRARIES} ${LUA_LIBRARIES})
+target_link_libraries (logdiag liblogdiag ${GTK2_LIBRARIES} ${JSON_GLIB_LIBRARIES} ${LUA_LIBRARIES})
# Generate documentation
if (GTK_DOC_FOUND)
GTK_DOC_RUN (WORKING_DIR ${project_DOC_DIR}
- SOURCE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src
+ SOURCE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag
XML ${project_DOC_DIR}/xml --sgml-mode
HTML ${project_DOC_DIR}/html)
endif (GTK_DOC_FOUND)
diff --git a/src/ld-canvas.c b/liblogdiag/ld-canvas.c
index 9523d9d..9523d9d 100644
--- a/src/ld-canvas.c
+++ b/liblogdiag/ld-canvas.c
diff --git a/src/ld-canvas.h b/liblogdiag/ld-canvas.h
index 702f2fe..702f2fe 100644
--- a/src/ld-canvas.h
+++ b/liblogdiag/ld-canvas.h
diff --git a/src/ld-diagram-object.c b/liblogdiag/ld-diagram-object.c
index f43e620..f43e620 100644
--- a/src/ld-diagram-object.c
+++ b/liblogdiag/ld-diagram-object.c
diff --git a/src/ld-diagram-object.h b/liblogdiag/ld-diagram-object.h
index c727602..c727602 100644
--- a/src/ld-diagram-object.h
+++ b/liblogdiag/ld-diagram-object.h
diff --git a/src/ld-diagram-symbol.c b/liblogdiag/ld-diagram-symbol.c
index 3308dbb..3308dbb 100644
--- a/src/ld-diagram-symbol.c
+++ b/liblogdiag/ld-diagram-symbol.c
diff --git a/src/ld-diagram-symbol.h b/liblogdiag/ld-diagram-symbol.h
index 09d8739..09d8739 100644
--- a/src/ld-diagram-symbol.h
+++ b/liblogdiag/ld-diagram-symbol.h
diff --git a/src/ld-diagram.c b/liblogdiag/ld-diagram.c
index 0129e2b..0129e2b 100644
--- a/src/ld-diagram.c
+++ b/liblogdiag/ld-diagram.c
diff --git a/src/ld-diagram.h b/liblogdiag/ld-diagram.h
index f364189..f364189 100644
--- a/src/ld-diagram.h
+++ b/liblogdiag/ld-diagram.h
diff --git a/src/ld-library.c b/liblogdiag/ld-library.c
index 37e2bc9..37e2bc9 100644
--- a/src/ld-library.c
+++ b/liblogdiag/ld-library.c
diff --git a/src/ld-library.h b/liblogdiag/ld-library.h
index 26521ed..26521ed 100644
--- a/src/ld-library.h
+++ b/liblogdiag/ld-library.h
diff --git a/src/ld-lua-private.h b/liblogdiag/ld-lua-private.h
index 7d6943a..7d6943a 100644
--- a/src/ld-lua-private.h
+++ b/liblogdiag/ld-lua-private.h
diff --git a/src/ld-lua-symbol-private.h b/liblogdiag/ld-lua-symbol-private.h
index 83bc646..83bc646 100644
--- a/src/ld-lua-symbol-private.h
+++ b/liblogdiag/ld-lua-symbol-private.h
diff --git a/src/ld-lua-symbol.c b/liblogdiag/ld-lua-symbol.c
index 27a6279..27a6279 100644
--- a/src/ld-lua-symbol.c
+++ b/liblogdiag/ld-lua-symbol.c
diff --git a/src/ld-lua-symbol.h b/liblogdiag/ld-lua-symbol.h
index 5f68b59..5f68b59 100644
--- a/src/ld-lua-symbol.h
+++ b/liblogdiag/ld-lua-symbol.h
diff --git a/src/ld-lua.c b/liblogdiag/ld-lua.c
index 47a41b5..47a41b5 100644
--- a/src/ld-lua.c
+++ b/liblogdiag/ld-lua.c
diff --git a/src/ld-lua.h b/liblogdiag/ld-lua.h
index b207d66..b207d66 100644
--- a/src/ld-lua.h
+++ b/liblogdiag/ld-lua.h
diff --git a/src/ld-marshal.c b/liblogdiag/ld-marshal.c
index ac88836..ac88836 100644
--- a/src/ld-marshal.c
+++ b/liblogdiag/ld-marshal.c
diff --git a/src/ld-marshal.h b/liblogdiag/ld-marshal.h
index 545735a..545735a 100644
--- a/src/ld-marshal.h
+++ b/liblogdiag/ld-marshal.h
diff --git a/src/ld-marshal.list b/liblogdiag/ld-marshal.list
index 38076d6..38076d6 100644
--- a/src/ld-marshal.list
+++ b/liblogdiag/ld-marshal.list
diff --git a/src/ld-symbol-category.c b/liblogdiag/ld-symbol-category.c
index e4b86a9..e4b86a9 100644
--- a/src/ld-symbol-category.c
+++ b/liblogdiag/ld-symbol-category.c
diff --git a/src/ld-symbol-category.h b/liblogdiag/ld-symbol-category.h
index 3b1f05b..3b1f05b 100644
--- a/src/ld-symbol-category.h
+++ b/liblogdiag/ld-symbol-category.h
diff --git a/src/ld-symbol.c b/liblogdiag/ld-symbol.c
index fafa9ab..fafa9ab 100644
--- a/src/ld-symbol.c
+++ b/liblogdiag/ld-symbol.c
diff --git a/src/ld-symbol.h b/liblogdiag/ld-symbol.h
index 409eba5..409eba5 100644
--- a/src/ld-symbol.h
+++ b/liblogdiag/ld-symbol.h
diff --git a/src/ld-types.c b/liblogdiag/ld-types.c
index cde3da6..cde3da6 100644
--- a/src/ld-types.c
+++ b/liblogdiag/ld-types.c
diff --git a/src/ld-types.h b/liblogdiag/ld-types.h
index 61a1a7d..61a1a7d 100644
--- a/src/ld-types.h
+++ b/liblogdiag/ld-types.h
diff --git a/src/liblogdiag.h b/liblogdiag/liblogdiag.h
index 800826f..800826f 100644
--- a/src/liblogdiag.h
+++ b/liblogdiag/liblogdiag.h
diff --git a/po/make-template.sh b/po/make-template.sh
index e688847..f76a620 100755
--- a/po/make-template.sh
+++ b/po/make-template.sh
@@ -4,6 +4,9 @@
# is that the translator should not need to run
# the whole configure process to get this single stupid file.
+# Source files
+SOURCES=$(echo ../{src,liblogdiag}/*.c)
+
# Get the package name from CMakeLists.txt
PACKAGE=$(sed -n '/^[ \t]*[pP][rR][oO][jJ][eE][cC][tT][ \t]*([ \t]*\([^ \t)]\{1,\}\).*).*/{s//\1/p;q}' \
../CMakeLists.txt)
@@ -27,7 +30,7 @@ if [ "$MAJOR" != "" ]; then
fi
# Finally make the template
-xgettext -LC -k_ -kN_:1,2 -kG_ ../src/*.c -o "$PACKAGE".pot \
+xgettext -LC -k_ -kN_:1,2 -kG_ $SOURCES -o "$PACKAGE".pot \
--package-name="$PACKAGE" --package-version="$VERSION" \
--copyright-holder="Přemysl Janouch"
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index 6cea286..56ab59a 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -22,9 +22,6 @@
*
* #LdWindowMain is the main window of the application.
*/
-/* NOTE: The main window should not maybe be included in either
- * the documentation or the static library.
- */
/*
* SymbolMenuItem: