Commit f165dc25 authored by Julian Kranz's avatar Julian Kranz

orig: Memstream, .gitignore

parent 5099dd8d
......@@ -26,6 +26,7 @@ decoder_cli_LDADD =
semantics_cli_LDADD =
semantics_cli_dynamic_LDADD =
semantics_cif_cli_LDADD =
semantics_opt_LDADD =
sweep_LDADD =
liveness_sweep_LDADD =
x86_test_runner_LDADD = libx86-tester.la libgdwrap.la
......@@ -153,7 +154,8 @@ GDSLFLAGS = --runtime=$(srcdir)/detail/codegen
# the decoders
GDSL_BASIS = \
$(srcdir)/specifications/basis/prelude.ml
$(srcdir)/specifications/basis/prelude.ml \
$(srcdir)/specifications/basis/selectors.ml
GDSL_X86 = \
$(srcdir)/specifications/x86/x86.ml \
......@@ -186,7 +188,8 @@ GDSL_RREIL = \
$(srcdir)/specifications/rreil/rreil-pretty.ml \
$(srcdir)/specifications/rreil/rreil-liveness.ml \
$(srcdir)/specifications/rreil/rreil-cleanup.ml \
$(srcdir)/specifications/basis/selectors.ml
$(srcdir)/specifications/rreil/rreil-opt.ml \
$(srcdir)/specifications/rreil/rreil-translator.ml
if X86_RREIL
lib_LTLIBRARIES += libgdsl-x86-rreil.la
......@@ -196,6 +199,7 @@ decoder_cli_LDADD += libgdsl-x86-rreil.la
semantics_cli_LDADD += libgdsl-x86-rreil.la
semantics_cli_dynamic_LDADD += libgdsl-x86-rreil.la
semantics_cif_cli_LDADD += libgdsl-x86-rreil.la
semantics_opt_LDADD += libgdsl-x86-rreil.la
sweep_LDADD += libgdsl-x86-rreil.la
liveness_sweep_LDADD += libgdsl-x86-rreil.la
x86_test_runner_LDADD += libgdsl-x86-rreil.la
......@@ -232,6 +236,7 @@ decoder_cli_LDADD += libgdsl-avr-rreil.la
semantics_cli_LDADD += libgdsl-avr-rreil.la
semantics_cli_dynamic_LDADD += libgdsl-avr-rreil.la
semantics_cif_cli_LDADD += libgdsl-avr-rreil.la
semantics_opt_LDADD += libgdsl-avr-rreil.la
sweep_LDADD += libgdsl-avr-rreil.la
liveness_sweep_LDADD += libgdsl-avr-rreil.la
x86_test_runner_LDADD += libgdsl-avr-rreil.la
......@@ -373,70 +378,74 @@ clean-local:
-rm -f $(builddir)/gdslc-image.*
if INSTALL_AUXLIBS
lib_LTLIBRARIES += libreadhex.la libutil.la
else
if BUILD_AUXLIBS
noinst_LTLIBRARIES += libreadhex.la libutil.la
if HAVE_RREIL_LIB
lib_LTLIBRARIES += librreil.la
endif
if HAVE_RREIL_SIM
lib_LTLIBRARIES += librreil-sim.la
endif
if HAVE_X86
if INSTALL_AUXLIBS
if HAVE_POSIX200809_C11
lib_LTLIBRARIES += libx86-generator.la
if HAVE_GDWRAP
lib_LTLIBRARIES += libgdwrap.la
endif
else
if BUILD_AUXLIBS
if HAVE_POSIX200809_C11
noinst_LTLIBRARIES += libx86-generator.la
if HAVE_GDSL_MULTIPLEX
lib_LTLIBRARIES += libgdsl-multiplex.la
endif
if HAVE_JRREIL
lib_LTLIBRARIES += libjrreil.la
endif
if HAVE_X86_LIB
lib_LTLIBRARIES += libx86.la
endif
if HAVE_READHEX
lib_LTLIBRARIES += libreadhex.la
endif
if X86_RREIL
if INSTALL_AUXLIBS
if HAVE_POSIX200809_C11
if LINUX
if HAVE_UTIL
lib_LTLIBRARIES += libutil.la
endif
if HAVE_X86_TESTER
lib_LTLIBRARIES += libx86-tester.la
endif
if HAVE_X86_GENERATOR
lib_LTLIBRARIES += libx86-generator.la
endif
lib_LTLIBRARIES += libx86.la libgdwrap.la
else
if BUILD_AUXLIBS
if HAVE_POSIX200809_C11
if LINUX
noinst_LTLIBRARIES += libx86-tester.la
if HAVE_MEMSTREAM
lib_LTLIBRARIES += libmemstream.la
endif
endif
noinst_LTLIBRARIES += libx86.la libgdwrap.la
if BUILD_AUXLIBS
if HAVE_RREIL_LIB
noinst_LTLIBRARIES += librreil.la
endif
if HAVE_RREIL_SIM
noinst_LTLIBRARIES += librreil-sim.la
endif
if HAVE_GDWRAP
noinst_LTLIBRARIES += libgdwrap.la
endif
if HAVE_POSIX200809_C11
if HAVE_RREIL
if INSTALL_AUXLIBS
if LINUX
lib_LTLIBRARIES += librreil-sim.la
if HAVE_GDSL_MULTIPLEX
noinst_LTLIBRARIES += libgdsl-multiplex.la
endif
lib_LTLIBRARIES += librreil.la
if HAVE_JNI_H
lib_LTLIBRARIES += libjrreil.la
if HAVE_JRREIL
noinst_LTLIBRARIES += libjrreil.la
endif
lib_LTLIBRARIES += libgdsl-multiplex.la
else
if BUILD_AUXLIBS
if LINUX
noinst_LTLIBRARIES += librreil-sim.la
if HAVE_X86_LIB
noinst_LTLIBRARIES += libx86.la
endif
noinst_LTLIBRARIES += librreil.la
if HAVE_JNI_H
noinst_LTLIBRARIES += libjrreil.la
if HAVE_READHEX
noinst_LTLIBRARIES += libreadhex.la
endif
noinst_LTLIBRARIES += libgdsl-multiplex.la
if HAVE_UTIL
noinst_LTLIBRARIES += libutil.la
endif
if HAVE_X86_TESTER
noinst_LTLIBRARIES += libx86-tester.la
endif
if HAVE_X86_GENERATOR
noinst_LTLIBRARIES += libx86-generator.la
endif
if HAVE_MEMSTREAM
noinst_LTLIBRARIES += libmemstream.la
endif
endif
......@@ -448,20 +457,20 @@ libutil_la_SOURCES = $(srcdir)/libs/util/src/util.c $(srcdir)/libs/util/src/stac
libutil_la_CFLAGS = -std=c99 -I$(srcdir)/libs/util/include
include_HEADERS += $(srcdir)/libs/util/include/util.h $(srcdir)/libs/util/include/stack.h
if HAVE_X86
if HAVE_X86_LIB
libx86_la_SOURCES = $(srcdir)/libs/x86/src/x86.c $(srcdir)/libs/x86/src/x86_features.c
libx86_la_CFLAGS = -std=c99 -I$(srcdir)/libs/x86/include
include_HEADERS += libs/x86/include/x86.h libs/x86/include/x86_features.h
endif
if HAVE_RREIL
if HAVE_RREIL_LIB
librreil_la_SOURCES = $(srcdir)/libs/rreil/src/rreil/copy.c \
$(srcdir)/libs/rreil/src/rreil/print.c \
$(srcdir)/libs/rreil/src/rreil/gdrr_builder.c \
$(srcdir)/libs/rreil/src/rreil/free.c \
$(srcdir)/libs/rreil/src/rreil/rreil_id.c
librreil_la_CFLAGS = -std=c11 -I$(srcdir)/libs/rreil/include -I$(srcdir)/libs/gdrr/include -I$(srcdir)/libs/util/include
if HAVE_X86
if HAVE_X86_LIB
librreil_la_CFLAGS += -DGDSL_X86 -I$(srcdir)/libs/x86/include
endif
include_HEADERS += $(srcdir)/libs/rreil/include/rreil/rreil.h \
......@@ -543,55 +552,67 @@ libgdsl_multiplex_la_LDFLAGS = -ldl
include_HEADERS += $(srcdir)/libs/gdsl-multiplex/include/gdsl_multiplex.h
endif
if HAVE_RREIL
libmemstream_la_SOURCES = $(srcdir)/libs/memstream/src/memstream.c
libmemstream_la_CFLAGS = -I$(srcdir)/libs/memstream/include
include_HEADERS += $(srcdir)/libs/memstream/include/memstream.h
if INSTALL_AUXBINS
if HAVE_POSIX200809_C11
bin_PROGRAMS += semantics-cli-dynamic
endif
if HAVE_DECODER_CLI
bin_PROGRAMS += decoder-cli
endif
if HAVE_SEMANTICS_CLI
bin_PROGRAMS += semantics-cli
endif
if HAVE_SEMANTICS_CLI_DYNAMIC
bin_PROGRAMS += semantics-cli-dynamic
endif
if HAVE_SEMANTICS_CIF_CLI
bin_PROGRAMS += semantics-cif-cli
if HAVE_ELF
endif
if HAVE_SWEEP
bin_PROGRAMS += sweep
endif
else
if BUILD_AUXBINS
if HAVE_POSIX200809_C11
noinst_PROGRAMS += semantics-cli-dynamic
if HAVE_SEMANTICS_OPT
bin_PROGRAMS += semantics-opt
endif
noinst_PROGRAMS += decoder-cli
noinst_PROGRAMS += semantics-cli
noinst_PROGRAMS += semantics-cif-cli
if HAVE_ELF
noinst_PROGRAMS += sweep
if HAVE_LIVENESS_SWEEP
bin_PROGRAMS += liveness-sweep
endif
if HAVE_X86_TEST_RUNNER
bin_PROGRAMS += x86_test_runner
endif
if HAVE_X86_TEST_STATS_RUNNER
bin_PROGRAMS += x86_test_stats_runner
endif
endif
if X86_RREIL
if INSTALL_AUXBINS
if HAVE_POSIX200809_C11
if LINUX
bin_PROGRAMS += x86_test_runner
bin_PROGRAMS += x86_test_stats_runner
if BUILD_AUXBINS
if HAVE_DECODER_CLI
noinst_PROGRAMS += decoder-cli
endif
if HAVE_SEMANTICS_CLI
noinst_PROGRAMS += semantics-cli
endif
if HAVE_ELF
bin_PROGRAMS += liveness_sweep
if HAVE_SEMANTICS_CLI_DYNAMIC
noinst_PROGRAMS += semantics-cli-dynamic
endif
else
if BUILD_AUXBINS
if HAVE_POSIX200809_C11
if LINUX
noinst_PROGRAMS += x86_test_runner
noinst_PROGRAMS += x86_test_stats_runner
if HAVE_SEMANTICS_CIF_CLI
noinst_PROGRAMS += semantics-cif-cli
endif
if HAVE_SWEEP
noinst_PROGRAMS += sweep
endif
if HAVE_ELF
noinst_PROGRAMS += liveness_sweep
if HAVE_SEMANTICS_OPT
noinst_PROGRAMS += semantics-opt
endif
if HAVE_LIVENESS_SWEEP
noinst_PROGRAMS += liveness-sweep
endif
if HAVE_X86_TEST_RUNNER
noinst_PROGRAMS += x86_test_runner
endif
if HAVE_X86_TEST_STATS_RUNNER
noinst_PROGRAMS += x86_test_stats_runner
endif
endif
......@@ -609,6 +630,10 @@ semantics_cli_CFLAGS += -DGDSL_X86
endif
semantics_cli_LDADD += libreadhex.la
semantics_opt_SOURCES = $(srcdir)/tools/semantics-opt.c
semantics_opt_CFLAGS = -std=gnu99
semantics_opt_LDFLAGS = -lelf
semantics_cli_dynamic_SOURCES = $(srcdir)/tools/semantics-cli-dynamic.c
semantics_cli_dynamic_CFLAGS = -std=c99 -I$(srcdir)/libs/readhex/include -I$(srcdir)/libs/gdsl-multiplex/include
semantics_cli_dynamic_LDADD += libreadhex.la libgdsl-multiplex.la
......
......@@ -92,6 +92,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
has_open_memstream=no)
AC_CHECK_HEADERS([gelf.h], [has_elf=yes], [has_elf=no])
AC_CHECK_HEADERS([jni.h], [has_jni=yes], [has_jni=no])
AM_CONDITIONAL([X86_RREIL],[test x$with_frontend = xx86-rreil])
AM_CONDITIONAL([X86],[test x$with_frontend = xx86])
......@@ -106,6 +107,99 @@ AM_CONDITIONAL([HAVE_OPEN_MEMSTREAM], [test x$has_open_memstream = xyes])
AM_CONDITIONAL([HAVE_POSIX200809_C11], [test x$has_anon_members = xyes && test x$has_open_memstream = xyes])
AM_CONDITIONAL([HAVE_ELF], [test x$has_elf = xyes])
#AM_COND_IF([HAVE_RREIL], [AM_COND_IF([HAVE_POSIX200809_C11], [has_semantics_cli=yes], [has_semantics_cli=yes])])
#AM_COND_IF([HAVE_RREIL], [AM_COND_IF([HAVE_POSIX200809_C11], [AM_CONDITIONAL([HAVE_SEMANTICS_CLI], true)], [AM_CONDITIONAL([HAVE_SEMANTICS_CLI], true)])])
#Library requirements
AM_CONDITIONAL([ENV_RREIL_LIB], false)
AM_CONDITIONAL([ENV_RREIL_SIM], false)
AM_CONDITIONAL([ENV_GDWRAP], false)
AM_CONDITIONAL([ENV_GDSL_MULTIPLEX], false)
AM_CONDITIONAL([ENV_JRREIL], false)
AM_CONDITIONAL([ENV_X86_LIB], false)
AM_CONDITIONAL([ENV_READHEX], false)
AM_CONDITIONAL([ENV_UTIL], false)
AM_CONDITIONAL([ENV_X86_TESTER], false)
AM_CONDITIONAL([ENV_X86_GENERATOR], false)
AM_CONDITIONAL([ENV_UTIL], true)
AM_CONDITIONAL([ENV_GDSL_MULTIPLEX], true)
AM_CONDITIONAL([ENV_GDWRAP], true)
AM_CONDITIONAL([ENV_READHEX], true)
AM_COND_IF([HAVE_RREIL], [AM_COND_IF([HAVE_ANON_MEMBERS], [AM_COND_IF([HAVE_POSIX200809_C11], [AM_CONDITIONAL([ENV_RREIL_LIB], true)], [AM_CONDITIONAL([ENV_RREIL_LIB], false)])])])
AM_CONDITIONAL([ENV_JRREIL], [test x$has_jni = xyes])
AM_COND_IF([HAVE_X86], [AM_CONDITIONAL([ENV_X86_LIB], true)], [AM_CONDITIONAL([ENV_X86_LIB], false)])
AM_COND_IF([X86_RREIL], [AM_COND_IF([HAVE_ANON_MEMBERS], [AM_COND_IF([HAVE_POSIX200809_C11], [AM_CONDITIONAL([ENV_RREIL_SIM], true)], [AM_CONDITIONAL([ENV_RREIL_SIM], false)])])])
AM_COND_IF([X86_RREIL], [AM_COND_IF([HAVE_ANON_MEMBERS], [AM_COND_IF([HAVE_POSIX200809_C11], [AM_CONDITIONAL([ENV_X86_TESTER], true)], [AM_CONDITIONAL([ENV_X86_TESTER], false)])])])
AM_CONDITIONAL([ENV_X86_GENERATOR], true)
#Tool requirements
AM_CONDITIONAL([ENV_DECODER_CLI], false)
AM_CONDITIONAL([ENV_SEMANTICS_CLI], false)
AM_CONDITIONAL([ENV_SEMANTICS_CLI_DYNAMIC], false)
AM_CONDITIONAL([ENV_SEMANTICS_CIF_CLI], false)
AM_CONDITIONAL([ENV_SWEEP], false)
AM_CONDITIONAL([ENV_SEMANTICS_OPT], false)
AM_CONDITIONAL([ENV_LIVENESS_SWEEP], false)
AM_CONDITIONAL([ENV_X86_TEST_RUNNER], false)
AM_CONDITIONAL([ENV_X86_TEST_STATS_RUNNER], false)
AM_CONDITIONAL([ENV_DECODER_CLI], true)
AM_COND_IF([HAVE_RREIL], [AM_CONDITIONAL([ENV_SEMANTICS_CLI], true)], [AM_CONDITIONAL([ENV_SEMANTICS_CLI], false)])
AM_COND_IF([HAVE_RREIL], [AM_CONDITIONAL([ENV_SEMANTICS_CLI_DYNAMIC], true)], [AM_CONDITIONAL([ENV_SEMANTICS_CLI_DYNAMIC], false)])
AM_COND_IF([HAVE_RREIL], [AM_CONDITIONAL([ENV_SEMANTICS_CIF_CLI], true)], [AM_CONDITIONAL([ENV_SEMANTICS_CIF_CLI], false)])
AM_COND_IF([HAVE_RREIL], [AM_COND_IF([HAVE_ELF], [AM_CONDITIONAL([ENV_SWEEP], true)], [AM_CONDITIONAL([ENV_SWEEP], false)])])
AM_COND_IF([HAVE_RREIL], [AM_COND_IF([HAVE_ELF], [AM_CONDITIONAL([ENV_SEMANTICS_OPT], true)], [AM_CONDITIONAL([ENV_SEMANTICS_OPT], false)])])
AM_COND_IF([HAVE_RREIL], [AM_COND_IF([HAVE_ELF], [AM_CONDITIONAL([ENV_LIVENESS_SWEEP], true)], [AM_CONDITIONAL([ENV_LIVENESS_SWEEP], false)])])
AM_COND_IF([X86_RREIL], [AM_CONDITIONAL([ENV_X86_TEST_RUNNER], true)], [AM_CONDITIONAL([ENV_X86_TEST_RUNNER], false)])
AM_COND_IF([X86_RREIL], [AM_CONDITIONAL([ENV_X86_TEST_STATS_RUNNER], true)], [AM_CONDITIONAL([ENV_X86_TEST_STATS_RUNNER], false)])
#Library dependencies
AM_CONDITIONAL([HAVE_RREIL_LIB], false)
AM_CONDITIONAL([HAVE_RREIL_SIM], false)
AM_CONDITIONAL([HAVE_GDWRAP], false)
AM_CONDITIONAL([HAVE_GDSL_MULTIPLEX], false)
AM_CONDITIONAL([HAVE_JRREIL], false)
AM_CONDITIONAL([HAVE_X86_LIB], false)
AM_CONDITIONAL([HAVE_READHEX], false)
AM_CONDITIONAL([HAVE_UTIL], false)
AM_CONDITIONAL([HAVE_X86_TESTER], false)
AM_CONDITIONAL([HAVE_X86_GENERATOR], false)
AM_COND_IF([ENV_RREIL_LIB], [AM_CONDITIONAL([HAVE_RREIL_LIB], true)])
AM_COND_IF([ENV_RREIL_SIM], [AM_COND_IF([HAVE_RREIL_LIB], [AM_CONDITIONAL([HAVE_RREIL_SIM], true)])])
AM_COND_IF([ENV_GDWRAP], [AM_CONDITIONAL([HAVE_GDWRAP], true)])
AM_COND_IF([ENV_GDSL_MULTIPLEX], [AM_CONDITIONAL([HAVE_GDSL_MULTIPLEX], true)])
AM_COND_IF([ENV_JRREIL], [AM_COND_IF([HAVE_GDSL_MULTIPLEX], [AM_CONDITIONAL([HAVE_JRREIL], true)])])
AM_COND_IF([ENV_X86_LIB], [AM_CONDITIONAL([HAVE_X86_LIB], true)])
AM_COND_IF([ENV_READHEX], [AM_CONDITIONAL([HAVE_READHEX], true)])
AM_COND_IF([ENV_UTIL], [AM_CONDITIONAL([HAVE_UTIL], true)])
AM_COND_IF([ENV_X86_TESTER], [AM_COND_IF([HAVE_UTIL], [AM_COND_IF([HAVE_RREIL_LIB], [AM_COND_IF([HAVE_GDWRAP], [AM_COND_IF([HAVE_X86_LIB], [AM_COND_IF([HAVE_RREIL_SIM], [AM_CONDITIONAL([HAVE_X86_TESTER], true)])])])])])])
AM_COND_IF([ENV_X86_GENERATOR], [AM_CONDITIONAL([HAVE_X86_GENERATOR], true)])
#Tool dependencies
AM_CONDITIONAL([HAVE_DECODER_CLI], false)
AM_CONDITIONAL([HAVE_SEMANTICS_CLI], false)
AM_CONDITIONAL([HAVE_SEMANTICS_CLI_DYNAMIC], false)
AM_CONDITIONAL([HAVE_SEMANTICS_CIF_CLI], false)
AM_CONDITIONAL([HAVE_SWEEP], false)
AM_CONDITIONAL([HAVE_SEMANTICS_OPT], false)
AM_CONDITIONAL([HAVE_LIVENESS_SWEEP], false)
AM_CONDITIONAL([HAVE_X86_TEST_RUNNER], false)
AM_CONDITIONAL([HAVE_X86_TEST_STATS_RUNNER], false)
AM_CONDITIONAL([HAVE_MEMSTREAM], true)
AM_COND_IF([ENV_DECODER_CLI], [AM_COND_IF([HAVE_READHEX], [AM_CONDITIONAL([HAVE_DECODER_CLI], true)])])
AM_COND_IF([ENV_SEMANTICS_CLI], [AM_COND_IF([HAVE_READHEX], [AM_CONDITIONAL([HAVE_SEMANTICS_CLI], true)])])
AM_COND_IF([ENV_SEMANTICS_CLI_DYNAMIC], [AM_COND_IF([HAVE_READHEX], [AM_COND_IF([HAVE_GDSL_MULTIPLEX], [AM_CONDITIONAL([HAVE_SEMANTICS_CLI_DYNAMIC], true)])])])
AM_COND_IF([ENV_SEMANTICS_CIF_CLI], [AM_COND_IF([HAVE_READHEX], [AM_CONDITIONAL([HAVE_SEMANTICS_CIF_CLI], true)])])
AM_COND_IF([ENV_SWEEP], [AM_CONDITIONAL([HAVE_SWEEP], true)])
AM_COND_IF([ENV_SEMANTICS_OPT], [AM_CONDITIONAL([HAVE_SEMANTICS_OPT], true)])
AM_COND_IF([ENV_LIVENESS_SWEEP], [AM_CONDITIONAL([HAVE_LIVENESS_SWEEP], true)])
AM_COND_IF([ENV_X86_TEST_RUNNER], [AM_COND_IF([HAVE_READHEX], [AM_COND_IF([HAVE_X86_GENERATOR], [AM_COND_IF([HAVE_X86_TESTER], [AM_CONDITIONAL([HAVE_X86_TEST_RUNNER], true)])])])])
AM_COND_IF([ENV_X86_TEST_STATS_RUNNER], [AM_COND_IF([HAVE_X86_GENERATOR], [AM_COND_IF([HAVE_X86_TESTER], [AM_CONDITIONAL([HAVE_X86_TEST_STATS_RUNNER], true)])])])
AM_COND_IF([HAVE_OPEN_MEMSTREAM], [AM_CONDITIONAL([HAVE_MEMSTREAM], false)])
dnl check if the helper executables should be build and/or installed
AC_ARG_ENABLE([install-auxbins],
[AS_HELP_STRING(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment