SUBDIRS = \ parser \ lexer \ io_backend \ execution \ expansion \ utils bin_PROGRAMS = 42sh 42sh_CFLAGS = -std=c99 -Werror -Wall -Wextra -Wvla 42sh_SOURCES = main.c 42sh_CPPFLAGS = -I%D% 42sh_LDADD = \ parser/libparser.a \ lexer/liblexer.a \ io_backend/libio_backend.a \ execution/libexecution.a \ expansion/libexpansion.a \ utils/libutils.a # ================ TESTS ================ check: ../tests/wrap.sh # "$(COVERAGE)" "$(OUTPUT_FILE)" # ------------- Unit tests -------------- check_PROGRAMS = testsuite #testsuite_CFLAGS = $(42sh_CFLAGS) #testsuite_CFLAGS += $(CRITERION_CFLAGS) testsuite_SOURCES = ../tests/unit/lexer/lexer_tests.c \ ../tests/unit/utils/utils_tests.c \ ../tests/unit/expansion/expand.c \ ../tests/unit/expansion/parse_var.c \ #../tests/unit/io_backend/io_backend.c \ ../tests/unit/utils/args.c \ ../tests/unit/utils/hash_map.c \ ../tests/unit/utils/insert_into.c testsuite_CPPFLAGS = $(42sh_CPPFLAGS) testsuite_LDADD = $(42sh_LDADD) -lcriterion # ------------- asan debug -------------- # check_PROGRAMS += debug #debug_CFLAGS = $(42sh_CFLAGS) #debug_CFLAGS += -fsanitize=address -g # debug_SOURCES = $(42sh_SOURCES) # # debug_CPPFLAGS = $(42sh_CPPFLAGS) # # debug_LDADD = $(42sh_LDADD)