A shell that runs x86_64 assembly
c
x86-64
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

regen.sh 760B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. cd $(dirname "$0")
  3. echo "Generating $(pwd)/Makefile.am"
  4. progs="$(echo *.c | sed -e 's/\.c / /g' -e 's/\.c$//')"
  5. cat << __EOF__ > Makefile.am
  6. TESTS = $progs
  7. check_PROGRAMS = $progs
  8. noinst_HEADERS = asmsh_check.h
  9. EXTRA_DIST = samples
  10. SUBDIRS = samples
  11. TESTLIB_NAME=libcheck_asmsh.a
  12. TESTLIB=\$(top_builddir)/\$(TESTLIB_NAME)
  13. CHILD_NAME=child
  14. CHILD=\$(top_builddir)/\$(CHILD_NAME)
  15. CHILD_OBJNAME=child_bin.o
  16. CHILD_OBJ=\$(top_builddir)/\$(CHILD_OBJNAME)
  17. BUILT_SOURCES = \$(CHILD)
  18. clean-local:
  19. -rm -rf *.gcov *.gcda *.gcno
  20. __EOF__
  21. for p in $progs
  22. do
  23. cat << __EOF__ >> Makefile.am
  24. ${p}_SOURCES = ${p}.c
  25. ${p}_CFLAGS = @CHECK_CFLAGS@ --coverage
  26. ${p}_LDFLAGS = @LDFLAGS@
  27. ${p}_LDADD = \$(TESTLIB) \$(CHILD_OBJ) @CHECK_LIBS@ -ldl -lgcov
  28. __EOF__
  29. done