Use autoconf, automake & libtool

This commit is contained in:
Petri Lehtinen 2009-05-12 22:21:50 +03:00
parent 0b58486ec4
commit 6e160c146c
5 changed files with 93 additions and 14 deletions

1
Makefile.am Normal file
View File

@ -0,0 +1 @@
SUBDIRS = src

59
config.h.in Normal file
View File

@ -0,0 +1,59 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

26
configure.ac Normal file
View File

@ -0,0 +1,26 @@
AC_PREREQ([2.63])
AC_INIT([jansson], [0.1], [petri@digip.org])
AM_INIT_AUTOMAKE([1.10 foreign])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/value.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT

View File

@ -1,14 +0,0 @@
CFLAGS = -I../include -std=c99 -Wall -Wextra -Werror -g -O0
OBJS = dump.o load.o value.o hashtable.o
LIB = libjansson.a
all: $(LIB)
$(LIB): $(OBJS)
ar crsv $@ $^
clean:
rm -f -- $(OBJS)
rm -f -- $(LIB)

7
src/Makefile.am Normal file
View File

@ -0,0 +1,7 @@
include_HEADERS = jansson.h
lib_LTLIBRARIES = libjansson.la
libjansson_la_SOURCES = dump.c hashtable.h hashtable.c load.c value.c
libjansson_la_LDFLAGS = -version-info 0:0:0
AM_CFLAGS = -Wall -Wextra -std=c99