build: add inital autotools setup
This commit is contained in:
commit
b08dacf3c0
15
Makefile.am
Normal file
15
Makefile.am
Normal file
|
@ -0,0 +1,15 @@
|
|||
NULL =
|
||||
# Program and sources
|
||||
bin_PROGRAMS = jitters
|
||||
jitters_SOURCES = \
|
||||
src/jitters.c \
|
||||
$(NULL)
|
||||
|
||||
# Add warnings
|
||||
jitters_CFLAGS = $(WARN_CFLAGS)
|
||||
jitters_LDFLAGS = $(WARN_LDFLAGS)
|
||||
|
||||
# Extra files to include in 'make dist'
|
||||
EXTRA_DIST = \
|
||||
bootstrap \
|
||||
$(NULL)
|
19
bootstrap
Executable file
19
bootstrap
Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
# Find where the sources are
|
||||
src_dir="$(dirname "$0")"
|
||||
test -z "$src_dir" && src_dir=.
|
||||
|
||||
# Bootstrap in a subshell
|
||||
(
|
||||
cd "$src_dir"
|
||||
autoreconf -fvi
|
||||
)
|
||||
|
||||
# Call configure, unless NOCONFIGURE is set
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
"$src_dir"/configure "$@"
|
||||
fi
|
35
configure.ac
Normal file
35
configure.ac
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Disallow unexpanded macros
|
||||
m4_pattern_forbid([^(AM|AC|AX|LT)_])
|
||||
|
||||
# Initialize the project name, version, and maitainer address
|
||||
AC_INIT([jitters], [0.1-dev], [bruno@belanyi.fr])
|
||||
# Only use C for this project
|
||||
AC_LANG([C])
|
||||
|
||||
# Auxiliary files
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([build-aux/m4])
|
||||
|
||||
# Non-recursive Make build system
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects
|
||||
dist-bzip2 no-dist-gzip
|
||||
silent-rules
|
||||
-Wall -Werror])
|
||||
# Use silent rules unless `make V=1` is used
|
||||
AM_SILENT_RULES([yes])
|
||||
AC_CONFIG_SRCDIR([src/jitters.c])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
# Activate release-mode when there is no dash in version
|
||||
AX_IS_RELEASE([dash-version])
|
||||
# Build in debug-mode by default, except when in release
|
||||
AX_CHECK_ENABLE_DEBUG([yes])
|
||||
|
||||
# Standard C99 setup
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_CC_STDC
|
||||
|
||||
# Warnings
|
||||
AX_COMPILER_FLAGS([], [], [], [-Wall -Wextra -pedantic])
|
||||
|
||||
AC_OUTPUT
|
8
src/jitters.c
Normal file
8
src/jitters.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
puts("Hello World!");
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue