From e7b6017449709bef714a272dc3e6dd93f68eb5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Tue, 31 Mar 2020 15:27:13 +0800 Subject: Use libtool to build shared library too and also installation setttings. --- .gitignore | 14 +++++++++----- Makefile.am | 36 +++++++++++++++++++----------------- configure.ac | 12 +++++++++--- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 0ba0b66..7d259d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,27 @@ *~ -*.a +*.la +*.lo *.o *.swp .deps +.libs Makefile Makefile.am.user Makefile.in aclocal.m4 ar-lib autom4te.cache +autoscan-2.69.log compile -config.h -config.h.in -config.log -config.status +config.* configure +configure.scan depcomp html icclienttest install-sh +libtool +ltmain.sh +m4 missing stamp-h1 diff --git a/Makefile.am b/Makefile.am index f5961a7..d22e5ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,23 @@ -noinst_LIBRARIES = libicclient.a -libicclient_a_SOURCES = \ - icclient/product.h \ - icclient/catalog.h \ - icclient/ord.h \ - icclient/member.h \ - icclient/admin.h \ - icclient/client.h \ - request.h \ - request.c \ - login.h \ - login.c \ - ord.c \ - member.c \ - admin.c \ - client.c +ACLOCAL_AMFLAGS = -I m4 +lib_LTLIBRARIES = libicclient.la +libicclient_la_SOURCES = \ + request.h \ + request.c \ + login.h \ + login.c \ + ord.c \ + member.c \ + admin.c \ + client.c +pkginclude_HEADERS = \ + icclient/product.h \ + icclient/catalog.h \ + icclient/ord.h \ + icclient/member.h \ + icclient/admin.h \ + icclient/client.h #bin_PROGRAMS = icclienttest #icclienttest_SOURCES = main.c -#icclienttest_LDADD = libicclient.a +#icclienttest_LDADD = libicclient.la #icclienttest_LDFLAGS = -lcurl diff --git a/configure.ac b/configure.ac index 6398220..ce29659 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,15 @@ -AC_INIT([libicclient], [0.0], [pt@darapsa.co.id]) +AC_INIT([icclient], [0.0], [pt@darapsa.co.id]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC -AC_PROG_RANLIB AM_PROG_AR +LT_INIT AC_CONFIG_HEADERS([config.h]) -AC_CHECK_HEADER_STDBOOL AC_CONFIG_FILES([Makefile]) +AC_CONFIG_MACRO_DIRS([m4]) +AC_CHECK_HEADER_STDBOOL +AC_C_INLINE +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T AC_OUTPUT -- cgit v1.2.3