feat(autotools): fucking autotools meme aurelien galere
This commit is contained in:
parent
919ea7b1ba
commit
65a033c5f6
4 changed files with 19 additions and 16 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
# Init the 42sh project
|
# Init the 42sh project
|
||||||
AC_INIT([42sh], [1.0], [matteo.flebus@epita.fr])
|
AC_INIT([42sh], [1.0], [matteo.flebus@epita.fr])
|
||||||
|
|
||||||
|
FLAGS="-std=c99 -pedantic -Werror -Wall -Wextra -Wvla"
|
||||||
|
AC_SUBST([FLAGS])
|
||||||
|
|
||||||
# Setup Automake
|
# Setup Automake
|
||||||
AM_INIT_AUTOMAKE([subdir-objects] [foreign])
|
AM_INIT_AUTOMAKE([subdir-objects] [foreign])
|
||||||
|
|
||||||
|
|
@ -21,10 +24,14 @@ AC_PROG_CC
|
||||||
|
|
||||||
# List Makefiles in subdirectories
|
# List Makefiles in subdirectories
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/ast/Makefile
|
src/ast/Makefile
|
||||||
src/parser/Makefile
|
src/parser/Makefile
|
||||||
src/lexer/Makefile
|
src/lexer/Makefile
|
||||||
|
src/io_backend/Makefile
|
||||||
|
src/execution/Makefile
|
||||||
|
src/expansion/Makefile
|
||||||
|
src/utils/Makefile
|
||||||
])
|
])
|
||||||
|
# TODO add tests Makefile here
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
# define the subdirectories
|
# define the subdirectories
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
ast \
|
|
||||||
parser \
|
parser \
|
||||||
lexer \
|
lexer \
|
||||||
io_backend \
|
io_backend \
|
||||||
execution \
|
execution \
|
||||||
expansin \
|
expansion \
|
||||||
utils
|
utils
|
||||||
|
|
||||||
bin_PROGRAMS = 42sh
|
bin_PROGRAMS = 42sh 42sh_asan
|
||||||
|
|
||||||
42sh_SOURCES = main.c
|
42sh_SOURCES = main.c
|
||||||
|
|
||||||
|
|
@ -17,7 +16,6 @@ bin_PROGRAMS = 42sh
|
||||||
42sh_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla
|
42sh_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla
|
||||||
|
|
||||||
42sh_LDADD = \
|
42sh_LDADD = \
|
||||||
ast/libast.a \
|
|
||||||
parser/libparser.a \
|
parser/libparser.a \
|
||||||
lexer/liblexer.a \
|
lexer/liblexer.a \
|
||||||
io_backend/libio_backend.a \
|
io_backend/libio_backend.a \
|
||||||
|
|
@ -28,8 +26,6 @@ bin_PROGRAMS = 42sh
|
||||||
|
|
||||||
################################################# Test
|
################################################# Test
|
||||||
|
|
||||||
bin_PROGRAMS = 42sh_asan
|
|
||||||
|
|
||||||
42sh_asan_SOURCES = main.c
|
42sh_asan_SOURCES = main.c
|
||||||
|
|
||||||
42sh_asan_CPPFLAGS = -I%D%
|
42sh_asan_CPPFLAGS = -I%D%
|
||||||
|
|
@ -37,10 +33,10 @@ bin_PROGRAMS = 42sh_asan
|
||||||
42sh_asan_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla -g -fsanitize=address
|
42sh_asan_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla -g -fsanitize=address
|
||||||
|
|
||||||
42sh_asan_LDADD = \
|
42sh_asan_LDADD = \
|
||||||
ast/libast.a \
|
ast/lib_asan_ast.a \
|
||||||
parser/libparser.a \
|
parser/lib_asan_parser.a \
|
||||||
lexer/liblexer.a \
|
lexer/lib_asan_lexer.a \
|
||||||
io_backend/libio_backend.a \
|
io_backend/lib_asan_io_backend.a \
|
||||||
expansion/libexpansion.a \
|
expansion/lib_asan_expansion.a \
|
||||||
execution/libexecution.a \
|
execution/lib_asan_execution.a \
|
||||||
utils/libutils.a
|
utils/lib_asan_utils.a
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
lib_LIBRARIES = liblexer.a
|
lib_LIBRARIES = liblexer.a lib_asan_lexer.a
|
||||||
|
|
||||||
liblexer_a_SOURCES = \
|
liblexer_a_SOURCES = \
|
||||||
lexer.c \
|
lexer.c \
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,6 @@ libparser_a_SOURCES = \
|
||||||
|
|
||||||
libparser_a_CPPFLAGS = -I$(top_srcdir)/src
|
libparser_a_CPPFLAGS = -I$(top_srcdir)/src
|
||||||
|
|
||||||
libparser_a_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla
|
libparser_a_CFLAGS = $(FLAGS)
|
||||||
|
|
||||||
noinst_LIBRARIES = libparser.a
|
noinst_LIBRARIES = libparser.a
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue