asmsh/Makefile.am

80 lines
1.4 KiB
Makefile

bin_PROGRAMS = asmsh child
libcheck_asmsh_a_SOURCES = mmap_parse.c asm_env.c breakpoints.c compile.c logger.c \
completion.c history.c \
shell.c shell_cmds.c shell_sym.c \
shell_cmd_breakpoint.c
asmsh_SOURCES = asmsh.c $(libcheck_asmsh_a_SOURCES)
child_SOURCES = child.s
asmsh_LDADD=child_bin.o
asmsh_LDFLAGS=-g -O2
AM_CFLAGS=-Wall -Werror
AM_CCASFLAGS=-g -O0
child_LDFLAGS=-nostdlib
child$(EXEEXT): $(child_SOURCES:.s=.o)
$(LD) -s -o $@ $^
child_bin.o: child$(EXEEXT)
$(LD) -r -b binary -o $@ $<
ALL_CHECKS=
LINT=
SUBDIRS = . docs
if CHECK
noinst_LIBRARIES = libcheck_asmsh.a
libcheck_asmsh_a_LDDADD=child_bin.o
SUBDIRS += tests
ALL_CHECKS += check
CHECK_STAMP=tests/test-suite.log
$(CHECK_STAMP):
$(MAKE) check
if HAVE_GCOV
libcheck_asmsh_a_CFLAGS = @CFLAGS@ -fprofile-arcs -ftest-coverage
TO_LOCAL_CLEAN=*.gcda *.gcno
if HAVE_LCOV
LCOV_INFO=lcov.info
LCOV_HTML=lcov_html
TO_LOCAL_CLEAN += $(LCOV_INFO) $(LCOV_HTML)
$(LCOV_INFO): $(CHECK_STAMP)
$(LCOV) --base-directory $(top_builddir) --capture --no-recursion --directory . --output-file $@
$(LCOV_HTML): $(LCOV_INFO)
genhtml $< --output-directory $@
endif
clean-local:
-rm -rf $(TO_LOCAL_CLEAN)
endif
ALL_CHECKS += coverage
coverage: $(LCOV_HTML)
endif
if HAVE_CPPCHECK
LINT += cppcheck
cppcheck:
$(CPPCHECK) --enable=all --inline-suppr --check-config --suppress=missingIncludeSystem -q . -I .
endif
checks: $(ALL_CHECKS)
lint: $(LINT)
doxygen:
$(MAKE) -C docs