From 571120f86d90cf4ac4ce16978a5c6392b85c07eb Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Tue, 11 Dec 2012 08:53:07 +0100 Subject: [PATCH] Generated the library. --- .gitignore | 9 ++++++++- Makefile.am | 7 ++++++- configure.ac | 8 ++++++++ libautozgui.pc.in | 11 +++++++++++ library/Makefile.am | 31 +++++++++++++++++++++++++++++++ src/main.c | 3 ++- 6 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 libautozgui.pc.in create mode 100644 library/Makefile.am diff --git a/.gitignore b/.gitignore index aee532a..a29474a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.o *~ -*.in src/autoz-gui COPYING INSTALL @@ -21,3 +20,11 @@ src/.deps/ stamp-h1 .anjuta* *.exe +libautozgui.pc +config.h.in +libtool +ltmain.sh +.libs +*.lo +*.la +.deps diff --git a/Makefile.am b/Makefile.am index 00158e2..af29139 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,15 @@ -SUBDIRS = src data tests +SUBDIRS = src library data tests distclean-local: if test "$(srcdir)" = "."; then :; else \ rm -f ChangeLog; \ fi +EXTRA_DIST = libautozgui.pc.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libautozgui.pc + ChangeLog: @echo Creating $@ @if test -d "$(srcdir)/.git"; then \ diff --git a/configure.ac b/configure.ac index 9465154..6f015e0 100644 --- a/configure.ac +++ b/configure.ac @@ -14,8 +14,14 @@ AM_MAINTAINER_MODE AC_CANONICAL_SYSTEM +LT_INIT + +AC_LIBTOOL_WIN32_DLL + # Checks for programs. AC_PROG_CC +AC_PROG_LIBTOOL +AC_PROG_RANLIB # Checks for libraries. PKG_CHECK_MODULES(AUTOZGUI, [libgda-ui-4.0 >= 4.1.0]) @@ -30,8 +36,10 @@ AC_SUBST(AUTOZGUI_LIBS) # Checks for library functions. AC_CONFIG_FILES([ + libautozgui.pc Makefile src/Makefile + library/Makefile data/Makefile data/autoz-gui/Makefile data/autoz-gui/gui/Makefile diff --git a/libautozgui.pc.in b/libautozgui.pc.in new file mode 100644 index 0000000..4fcee4e --- /dev/null +++ b/libautozgui.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_NAME@ +Description: Library with auto-gui interface. +Version: @PACKAGE_VERSION@ +Requires: libgda-ui-4.0 +Libs: -L${libdir} -lautozgui +Cflags: -I${includedir} diff --git a/library/Makefile.am b/library/Makefile.am new file mode 100644 index 0000000..46a44ee --- /dev/null +++ b/library/Makefile.am @@ -0,0 +1,31 @@ +guidir = $(datadir)/$(PACKAGE)/gui + +AM_CPPFLAGS = $(AUTOZGUI_CFLAGS) \ + -DGUIDIR=\""$(guidir)"\" \ + -DG_LOG_DOMAIN=\"AutozGui\" + +LIBS = $(AUTOZGUI_LIBS) \ + -export-dynamic + +lib_LTLIBRARIES = libautozgui.la + +libautozgui_la_SOURCES = \ + ../src/authorization.c \ + ../src/authorizations.c \ + ../src/resource.c \ + ../src/resources.c \ + ../src/role.c \ + ../src/roles.c + +libautozgui_la_LDFLAGS = -no-undefined + +libautozgui_include_HEADERS = \ + ../src/authorization.h \ + ../src/authorizations.h \ + ../src/commons.h \ + ../src/resource.h \ + ../src/resource.h \ + ../src/role.h \ + ../src/roles.h + +libautozgui_includedir = $(includedir)/libautozgui diff --git a/src/main.c b/src/main.c index 80b4b0d..4d3f9f9 100644 --- a/src/main.c +++ b/src/main.c @@ -233,7 +233,8 @@ main (int argc, char *argv[]) p = strrchr (moddir, G_DIR_SEPARATOR); if (p != NULL - && g_ascii_strcasecmp (p + 1, "src") == 0) + && (g_ascii_strcasecmp (p + 1, "src") == 0 + || g_ascii_strcasecmp (p + 1, ".libs") == 0)) { commons->guidir = g_strdup (GUIDIR); } -- 2.49.0