Use Libtool

This commit is contained in:
Alex Kotov 2022-06-11 13:53:45 +03:00
parent 9af1ffb653
commit f81280cb69
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
4 changed files with 55 additions and 10 deletions

8
.gitignore vendored
View File

@ -4,10 +4,13 @@
*.a *.a
*.c.d *.c.d
*.la
*.lo
*.o *.o
.deps/ .deps/
.dirstamp .dirstamp
.libs/
############################ ############################
# Always generated in root # # Always generated in root #
@ -28,9 +31,13 @@
/configure~ /configure~
/depcomp /depcomp
/install-sh /install-sh
/ltmain.sh
/missing /missing
/test-driver /test-driver
/m4/*
!/m4/.keep
# Custom # Custom
/Makefile.in /Makefile.in
@ -43,6 +50,7 @@
/config.h /config.h
/config.log /config.log
/config.status /config.status
/libtool
/stamp-h1 /stamp-h1
/test-suite.log /test-suite.log

View File

@ -1,3 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include SUBDIRS = include
AM_CFLAGS = \ AM_CFLAGS = \
@ -9,10 +11,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/include -I$(top_srcdir)/include
bin_PROGRAMS = autotools-project bin_PROGRAMS = autotools-project
lib_LIBRARIES = libautotools-project.a lib_LTLIBRARIES = libautotools-project.la
autotools_project_SOURCES = \ autotools_project_SOURCES = \
src/main.c src/main.c
libautotools_project_a_SOURCES = \ libautotools_project_la_SOURCES = \
src/lib.c src/lib.c

View File

@ -1,34 +1,69 @@
############################
# Specify program versions #
############################
AC_PREREQ([2.68]) AC_PREREQ([2.68])
LT_PREREQ([2.4.6])
#######################
# Initialize Autoconf #
#######################
AC_INIT([autotools-project], AC_INIT([autotools-project],
[0.0.0], [0.0.0],
[https://github.com/tailix/autotools-project/issues], [https://github.com/tailix/autotools-project/issues],
[autotools-project], [autotools-project],
[https://github.com/tailix/autotools-project]) [https://github.com/tailix/autotools-project])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/main.c])
AC_CANONICAL_BUILD AC_CANONICAL_BUILD
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 subdir-objects]) AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
include/Makefile include/Makefile
]) ])
#######################
# Initialize Automake #
#######################
AM_INIT_AUTOMAKE([1.16 subdir-objects])
##############
# Run checks #
##############
AC_LANG([C]) AC_LANG([C])
AM_PROG_AR AM_PROG_AR
AM_PROG_AS AM_PROG_AS
AC_PROG_CC AC_PROG_CC
AC_PROG_CC_C99 AC_PROG_CC_C99
AC_PROG_RANLIB
AC_C_INLINE AC_C_INLINE
AC_CHECK_HEADER_STDBOOL AC_CHECK_HEADER_STDBOOL
AC_CHECK_HEADERS([stdarg.h stddef.h stdint.h]) AC_CHECK_HEADERS([stdarg.h stddef.h stdint.h])
######################
# Initialize Libtool #
######################
LT_INIT([disable-shared])
##########
# Finish #
##########
AC_OUTPUT AC_OUTPUT

0
m4/.keep Normal file
View File