fix: added header guards, and some testing purpose autotools rules
This commit is contained in:
parent
269f50a367
commit
919ea7b1ba
9 changed files with 88 additions and 14 deletions
|
|
@ -5,12 +5,12 @@ SUBDIRS = \
|
|||
lexer \
|
||||
io_backend \
|
||||
execution \
|
||||
expansion
|
||||
# + utils if needed
|
||||
expansin \
|
||||
utils
|
||||
|
||||
bin_PROGRAMS = 42sh
|
||||
|
||||
42sh_SOURCES = 42sh.c
|
||||
42sh_SOURCES = main.c
|
||||
|
||||
42sh_CPPFLAGS = -I%D%
|
||||
|
||||
|
|
@ -22,4 +22,25 @@ bin_PROGRAMS = 42sh
|
|||
lexer/liblexer.a \
|
||||
io_backend/libio_backend.a \
|
||||
expansion/libexpansion.a \
|
||||
execution/libexecution.a
|
||||
execution/libexecution.a \
|
||||
utils/libutils.a
|
||||
|
||||
|
||||
################################################# Test
|
||||
|
||||
bin_PROGRAMS = 42sh_asan
|
||||
|
||||
42sh_asan_SOURCES = main.c
|
||||
|
||||
42sh_asan_CPPFLAGS = -I%D%
|
||||
|
||||
42sh_asan_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla -g -fsanitize=address
|
||||
|
||||
42sh_asan_LDADD = \
|
||||
ast/libast.a \
|
||||
parser/libparser.a \
|
||||
lexer/liblexer.a \
|
||||
io_backend/libio_backend.a \
|
||||
expansion/libexpansion.a \
|
||||
execution/libexecution.a \
|
||||
utils/libutils.a
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef AST_H
|
||||
#define AST_H
|
||||
|
||||
|
||||
enum ast_type
|
||||
{
|
||||
AST_NULL = 0,
|
||||
ATS_IF,
|
||||
AST_CMD
|
||||
};
|
||||
|
||||
union ast_union
|
||||
{
|
||||
};
|
||||
|
||||
struct ast
|
||||
{
|
||||
enum ast_type type;
|
||||
union ast_union data;
|
||||
};
|
||||
|
||||
#endif /* ! AST_H */
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef EXECUTION_H
|
||||
#define EXECUTION_H
|
||||
|
||||
#endif /* ! EXECUTION_H */
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef EXPANSION_H
|
||||
#define EXPANSION_H
|
||||
|
||||
#endif /* ! EXPANSION_H */
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef IO_BACKEND_H
|
||||
#define IO_BACKEND_H
|
||||
|
||||
#endif /* ! IO_BACKEND_H */
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef LEXER_H
|
||||
#define LEXER_H
|
||||
|
||||
#endif /* ! LEXER_H */
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef PARSER_H
|
||||
#define PARSER_H
|
||||
|
||||
#endif /* ! PARSER_H */
|
||||
11
src/utils/Makefile.am
Normal file
11
src/utils/Makefile.am
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
lib_LIBRARIES = libutils.a
|
||||
|
||||
# libutils_a_SOURCES = \
|
||||
# utils.c \
|
||||
# utils.h
|
||||
|
||||
# libutils_a_CPPFLAGS = -I$(top_srcdir)/src
|
||||
|
||||
# libutils_a_CFLAGS = -std=c99 -pedantic -Werror -Wall -Wextra -Wvla
|
||||
|
||||
# noinst_LIBRARIES = libutils.a
|
||||
Loading…
Add table
Add a link
Reference in a new issue