minimal autotools project with bootstrapbuild.sh launch

This commit is contained in:
philippe lhardy
2018-06-07 22:28:36 +02:00
parent eb6760280f
commit 89d6631f67
7 changed files with 90 additions and 0 deletions

2
Makefile.am Normal file
View File

@@ -0,0 +1,2 @@
SUBDIRS = c
dist_doc_DATA = README

23
bootstrapbuild.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
if [[ ! -f configure.ac ]]
then
echo "[ERROR] Missing configure.ac . Please create one " >&2
exit 1
fi
if which autoreconf
then
echo "bootstrap using automake tools"
echo "from configure.ac will generate configure"
autoreconf --install
echo "lauch ./configure && make"
else
echo "[ERROR] Missing autoreconf script from autotools. Please install autotools ( package autotools-dev and autoreconf" >&2
fi

11
c/Makefile.am Normal file
View File

@@ -0,0 +1,11 @@
# This Makefile.am is REALLY where changes should be done
bin_PROGRAMS = laby
laby_SOURCES = allaby_reader.c allaby_main.c
laby_CPPFLAGS = $(ARTLOG_CPPFLAGS) $(ALEXPANDER_CPPFLAGS)
# in LDADD and not in LDFLAGS to be linked AFTER
laby_LDADD = $(ARTLOG_LDFLAGS) $(ALEXPANDER_LDFLAGS)

6
c/allaby_main.c Normal file
View File

@@ -0,0 +1,6 @@
// NOT YET IMPLEMENTED
int main(int argc, char ** argv)
{
return 1;
}

2
c/allaby_reader.c Normal file
View File

@@ -0,0 +1,2 @@
#include "allaby_reader.h"

9
c/allaby_reader.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef __ALLABY_READER_H__
#define __ALLABY_READER_H__
/** goal : read a labyrinth/maze created
by java laby project
**/
#endif // __ALLABY_READER_H__

37
configure.ac Normal file
View File

@@ -0,0 +1,37 @@
# written manually, this is root entry files for automake together with Makefile.am
# inspired from
# http://www.gnu.org/software/automake/manual/html_node/Creating-amhello.html#Creating-amhello
AC_INIT([allaby], [0.1], [pl@artisanlogiciel.net])
# set ARTLOG_TOOLBOX where artlog_toolbox is to use it.
[ARTLOG_TOOLBOX=`pwd`/`./locate_artlog_toolbox.sh`]
# non need to propagate it in .h ...
# AC_DEFINE_UNQUOTED([ARTLOG_TOOLBOX],["$ARTLOG_TOOLBOX"],[where artog toolbox is])
ARTLOG_CPPFLAGS="-I${ARTLOG_TOOLBOX}/build/include"
ARTLOG_LDFLAGS="-Wl,-Bstatic -L${ARTLOG_TOOLBOX}/build/lib -lalsave -laltest -laljson -lalstack -lalhash -laldev -Wl,-Bdynamic"
AC_SUBST(ARTLOG_CPPFLAGS)
AC_SUBST(ARTLOG_LDFLAGS)
[if [ "$ALEXPANDER_DIR" = "" ]]
[then]
[ALEXPANDER_DIR=`pwd`/../sharedrawweb]
[fi]
ALEXPANDER_CPPFLAGS="-I${ALEXPANDER_DIR}/build/include -D CHARSPERRECORD=80"
ALEXPANDER_LDFLAGS="-Wl,-Bstatic -L${ALEXPANDER_DIR}/build/lib -lalima -lalcommon -Wl,-Bdynamic"
AC_SUBST(ALEXPANDER_CPPFLAGS)
AC_SUBST(ALEXPANDER_LDFLAGS)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_DEFINE([MAX_FLAT_VIEWS],[20],[maximum number of view])
AC_CONFIG_FILES([
Makefile
c/Makefile
])
AC_OUTPUT