From 6d44c0d89dbf6459516066719914a998c824e88b Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Tue, 27 Nov 2012 15:44:11 +0100 Subject: [PATCH] Compilazione come libreria (closes #103). --- .gitignore | 10 ++++- Makefile.am | 7 +++- configure.ac | 8 ++++ liborganigramma.pc.in | 11 ++++++ libreria/Makefile.am | 89 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 liborganigramma.pc.in create mode 100644 libreria/Makefile.am diff --git a/.gitignore b/.gitignore index 5fbe730..b433143 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.o *~ -*.in +config.h.in +liborganigramma.pc src/organigramma COPYING INSTALL @@ -17,7 +18,12 @@ configure depcomp install-sh missing -src/.deps/ +.deps +.libs +*.la +*.lo +libtool +ltmain.sh stamp-h1 .anjuta* *exe diff --git a/Makefile.am b/Makefile.am index db05b3f..7563e9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,15 @@ -SUBDIRS = src data docs +SUBDIRS = src libreria data docs distclean-local: if test "$(srcdir)" = "."; then :; else \ rm -f ChangeLog; \ fi +EXTRA_DIST = liborganigramma.pc.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = liborganigramma.pc + ChangeLog: @echo Creating $@ @if test -d "$(srcdir)/.git"; then \ diff --git a/configure.ac b/configure.ac index 7a5d435..65bd891 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(ORGANIGRAMMA, [gio-2.0 >= 2.20 @@ -33,8 +39,10 @@ AC_SUBST(ORGANIGRAMMA_LIBS) # Checks for library functions. AC_CONFIG_FILES([ + liborganigramma.pc Makefile src/Makefile + libreria/Makefile data/Makefile data/organigramma/Makefile data/organigramma/form/Makefile diff --git a/liborganigramma.pc.in b/liborganigramma.pc.in new file mode 100644 index 0000000..4da5e93 --- /dev/null +++ b/liborganigramma.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_NAME@ +Description: Libreria con l'interfaccia per la gestione dell'organigramma. +Version: @PACKAGE_VERSION@ +Requires: glib-2.0 gtk+-2.0 libgda-ui-4.0 libgdaex libgtkform libgtkformui libaute libautoz libsolipa +Libs: -L${libdir} -lorganigramma +Cflags: -I${includedir} diff --git a/libreria/Makefile.am b/libreria/Makefile.am new file mode 100644 index 0000000..5e81ca0 --- /dev/null +++ b/libreria/Makefile.am @@ -0,0 +1,89 @@ +guidir = $(datadir)/$(PACKAGE)/gui +formdir = $(datadir)/$(PACKAGE)/form + +AM_CPPFLAGS = $(ORGANIGRAMMA_CFLAGS) \ + -DGUIDIR=\""$(guidir)"\" \ + -DFORMDIR=\""$(formdir)"\" \ + -DG_LOG_DOMAIN=\"Organigramma\" + +LIBS = $(ORGANIGRAMMA_LIBS) \ + -export-dynamic + +lib_LTLIBRARIES = liborganigramma.la + +liborganigramma_la_SOURCES = \ + ../src/nodi.c \ + ../src/nodo.c \ + ../src/persona.c \ + ../src/persone.c \ + ../src/personaincarico.c \ + ../src/personanodo.c \ + ../src/personanodorecapito.c \ + ../src/personarecapito.c \ + ../src/personaufficio.c \ + ../src/personaufficiorecapito.c \ + ../src/posizioneeconomica.c \ + ../src/posizionieconomiche.c \ + ../src/profiliprofessionali.c \ + ../src/profiloprofessionale.c \ + ../src/struttura.c \ + ../src/strutturaindirizzo.c \ + ../src/strutture.c \ + ../src/tipinodo.c \ + ../src/tipiprestazione.c \ + ../src/tipirapportolavoro.c \ + ../src/tipirecapito.c \ + ../src/tiponodo.c \ + ../src/tipoprestazione.c \ + ../src/tiporapportolavoro.c \ + ../src/tiporecapito.c \ + ../src/titoli.c \ + ../src/titolo.c \ + ../src/uffici.c \ + ../src/ufficio.c \ + ../src/ufficionodo.c \ + ../src/ufficioorario.c \ + ../src/ufficiorecapito.c \ + ../src/ufficiostanza.c \ + ../src/vie.c + +liborganigramma_la_LDFLAGS = -no-undefined + +liborganigramma_include_HEADERS = \ + ../src/commons.h \ + ../src/nodi.h \ + ../src/nodo.h \ + ../src/persona.h \ + ../src/persone.h \ + ../src/personaincarico.h \ + ../src/personanodo.h \ + ../src/personanodorecapito.h \ + ../src/personarecapito.h \ + ../src/personaufficio.h \ + ../src/personaufficiorecapito.h \ + ../src/posizioneeconomica.h \ + ../src/posizionieconomiche.h \ + ../src/profiliprofessionali.h \ + ../src/profiloprofessionale.h \ + ../src/struttura.h \ + ../src/strutturaindirizzo.h \ + ../src/strutture.h \ + ../src/tipinodo.h \ + ../src/tipiprestazione.h \ + ../src/tipirapportolavoro.h \ + ../src/tipirecapito.h \ + ../src/tiponodo.h \ + ../src/tipoprestazione.h \ + ../src/tiporapportolavoro.h \ + ../src/tiporecapito.h \ + ../src/titoli.h \ + ../src/titolo.h \ + ../src/uffici.h \ + ../src/ufficio.h \ + ../src/ufficionodo.h \ + ../src/ufficioorario.h \ + ../src/ufficiorecapito.h \ + ../src/ufficiostanza.h \ + ../src/vie.h + +liborganigramma_includedir = $(includedir)/liborganigramma -- 2.49.0