mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-03 22:33:02 +02:00
src/net: convert to GNU Configure & Build system
- Simplify build process, including cross compilation - Add basic test framework, available as `make check` Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
da56f8d653
commit
f180bcae24
@@ -1,2 +1,13 @@
|
||||
*.o
|
||||
*.log
|
||||
*.trs
|
||||
net
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
aux/
|
||||
config.*
|
||||
configure
|
||||
src/.deps/
|
||||
stamp-h1
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
LDLIBS = -lite
|
||||
EXEC = net
|
||||
|
||||
net: main.o
|
||||
$(CC) -o $@ $^ $(LDLIBS)
|
||||
|
||||
check: $(EXEC)
|
||||
./test.sh
|
||||
|
||||
clean:
|
||||
$(RM) net
|
||||
|
||||
distclean: clean
|
||||
$(RM) *.o *~
|
||||
@@ -0,0 +1,4 @@
|
||||
SUBDIRS = src test
|
||||
DISTCLEANFILES = *~ *.d
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
autoreconf -W portability -vifm
|
||||
@@ -0,0 +1,40 @@
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT([net], [1.0], [https://github.com/kernelkit/infix/issues])
|
||||
AC_CONFIG_AUX_DIR(aux)
|
||||
AM_INIT_AUTOMAKE([1.11 foreign])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/main.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Check for pkg-config first, warn if it's not installed
|
||||
PKG_PROG_PKG_CONFIG
|
||||
PKG_CHECK_MODULES([libite], [libite >= 2.5.0])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
SYSCONFDIR=`eval echo $sysconfdir`
|
||||
RUNSTATEDIR=`eval echo $runstatedir`
|
||||
RUNSTATEDIR=`eval echo $RUNSTATEDIR`
|
||||
cat <<EOF
|
||||
|
||||
------------------ Summary ------------------
|
||||
$PACKAGE_NAME version $PACKAGE_VERSION
|
||||
Prefix.........: $prefix
|
||||
Sysconfdir.....: $SYSCONFDIR
|
||||
Runstatedir....: $RUNSTATEDIR
|
||||
C Compiler.....: $CC $CFLAGS $CPPFLAGS $LDFLAGS $LIBS
|
||||
|
||||
------------- Compiler version --------------
|
||||
$($CC --version || true)
|
||||
---------------------------------------------
|
||||
|
||||
Check the above options and compile with:
|
||||
${MAKE-make}
|
||||
|
||||
EOF
|
||||
@@ -0,0 +1,5 @@
|
||||
sbin_PROGRAMS = net
|
||||
|
||||
net_SOURCES = main.c
|
||||
net_CFLAGS = $(libite_CFLAGS) -Wall -Wextra -Werror -Wno-unused-parameter
|
||||
net_LDADD = $(libite_LIBS)
|
||||
@@ -0,0 +1,6 @@
|
||||
EXTRA_DIST = three-independent.sh
|
||||
CLEANFILES = *~ *.trs *.log
|
||||
|
||||
TEST_EXTENSIONS = .sh
|
||||
TESTS_ENVIRONMENT = unshare -mrun
|
||||
TESTS = three-independent.sh
|
||||
Reference in New Issue
Block a user