automake build system

This commit is contained in:
Matthieu Herrb 2015-09-30 11:31:37 +02:00
parent 703bab20ca
commit 558bea9993
5 changed files with 41 additions and 20 deletions

25
.gitignore vendored
View file

@ -1,3 +1,26 @@
echoc
*.la
*.lo
*.o
*~
.deps
.libs
m4/*.m4
Makefile
Makefile.in
aclocal.m4
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
stamp-*
obj*

View file

@ -1,19 +0,0 @@
#
PROG= echoc
SRCS= echoc.c
OBJS= $(SRCS:%.c=%.o)
LIBS= -lbsd
all: $(PROG)
$(PROG): $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
.c.o:
$(CC) -c $(CFLAGS) -o $@ $<

5
Makefile.am Normal file
View file

@ -0,0 +1,5 @@
bin_PROGRAMS = echoc
AM_CFLAGS = -g -Wall
dist_man_MANS = echoc.1

10
configure.ac Normal file
View file

@ -0,0 +1,10 @@
AC_PREREQ([2.65])
AC_INIT([echoc], 0.3.99, [https://chiliproject.tetaneutral.net/projects/git-tetaneutral-net/repository/echoc], echoc)
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_CHECK_HEADERS([bsd/stdlib.h])
AC_SEARCH_LIBS(strtonum, [bsd])
AC_OUTPUT([Makefile])

View file

@ -19,7 +19,9 @@
#include <sys/time.h>
#include <limits.h>
#ifdef HAVE_BSD_STDLIB_H
#include <bsd/stdlib.h>
#endif
#include <err.h>
#include <errno.h>