Debian Codegraph @

check/internal-tests/Makefile.am

raw
1 #
2 # Builds unit tests for checking internal library code that is not
3 # exported. The tested source files are compiled directly into the
4 # test application instead of relying on the symbols exported by
5 # shared/static fcml-lib by default, as this technique is not portable
6 # (for instance Windows does not export all symbols by default).
7 # The build system uses "subdir-objects" to reference needed files directly
8 # from the main src directory where library source files are placed.
9 #
10 # Unfortunately `ylwrap` does not respect it and generates flex/yacc
11 # source and headers files into the current directory not into the
12 # directory where *.l/*.y files are located. It's why instead of
13 # referencing these files directly in the list of sources in
14 # 'fcml_internal_check_SOURCES' we have to generate these files
15 # by calling make for them (see yl task) and then reference the
16 # generated source files directly as if they were standard source
17 # files just like all others.
18 #
19 # This is not the best way to generate those files, as the generated
20 # source and header files should not ge referenced directly, so if you
21 # know a better way to handle it just let me know. Until then I have
22 # no choice but to leave it as it is.
23 #
24
25 AUTOMAKE_OPTIONS = subdir-objects
26
27 BUILT_SOURCES = yl
28
29 noinst_PROGRAMS = fcml_internal_check
30
31 fcml_internal_check_SOURCES = main.c \
32 coll_t.c \
33 coll_t.h \
34 gas_parser_t.c \
35 gas_parser_t.h \
36 intel_parser_t.c \
37 intel_parser_t.h \
38 mnemonic_parser_t.c \
39 mnemonic_parser_t.h \
40 modrm_decoder_t.c \
41 modrm_decoder_t.h \
42 modrm_encoder_t.c \
43 modrm_encoder_t.h \
44 instruction_chooser_t.c \
45 instruction_chooser_t.h \
46 stream_t.c \
47 stream_t.h \
48 utils_t.c \
49 utils_t.h \
50 lag_assembler_t.c \
51 lag_assembler_t.h \
52 env_t.c \
53 env_t.h \
54 ceh_t.c \
55 ceh_t.h \
56 common_utils_t.c \
57 common_utils_t.h \
58 symbols_t.h \
59 symbols_t.c \
60 $(top_srcdir)/src/fcml_intel_lexer.h \
61 $(top_srcdir)/src/fcml_intel_lexer.c \
62 $(top_srcdir)/src/fcml_gas_lexer.h \
63 $(top_srcdir)/src/fcml_gas_lexer.c \
64 $(top_srcdir)/src/fcml_intel_parser_def.h \
65 $(top_srcdir)/src/fcml_intel_parser_def.c \
66 $(top_srcdir)/src/fcml_gas_parser_def.h \
67 $(top_srcdir)/src/fcml_gas_parser_def.c \
68 $(top_srcdir)/src/fcml_apc_ast.c \
69 $(top_srcdir)/src/fcml_apc_ast.h \
70 $(top_srcdir)/src/fcml_assembler.c \
71 $(top_srcdir)/src/fcml_assembler_int.h \
72 $(top_srcdir)/src/fcml_ceh.c \
73 $(top_srcdir)/src/fcml_ceh.h \
74 $(top_srcdir)/src/fcml_choosers.c \
75 $(top_srcdir)/src/fcml_coll.c \
76 $(top_srcdir)/src/fcml_coll.h \
77 $(top_srcdir)/src/fcml_common_dialect.c \
78 $(top_srcdir)/src/fcml_common_dialect.h \
79 $(top_srcdir)/src/fcml_common_lex.h \
80 $(top_srcdir)/src/fcml_common_utils.c \
81 $(top_srcdir)/src/fcml_decoding_tree.c \
82 $(top_srcdir)/src/fcml_decoding_tree.h \
83 $(top_srcdir)/src/fcml_def.c \
84 $(top_srcdir)/src/fcml_def_enc.c \
85 $(top_srcdir)/src/fcml_def.h \
86 $(top_srcdir)/src/fcml_dialect.c \
87 $(top_srcdir)/src/fcml_dialect_int.c \
88 $(top_srcdir)/src/fcml_dialect_int.h \
89 $(top_srcdir)/src/fcml_disassembler.c \
90 $(top_srcdir)/src/fcml_encoding.c \
91 $(top_srcdir)/src/fcml_encoding.h \
92 $(top_srcdir)/src/fcml_env_int.c \
93 $(top_srcdir)/src/fcml_env_int.h \
94 $(top_srcdir)/src/fcml_gas_dialect.c \
95 $(top_srcdir)/src/fcml_gas_parser.c \
96 $(top_srcdir)/src/fcml_gas_parser.h \
97 $(top_srcdir)/src/fcml_gas_rend.c \
98 $(top_srcdir)/src/fcml_gas_rend.h \
99 $(top_srcdir)/src/fcml_hints.c \
100 $(top_srcdir)/src/fcml_hints.h \
101 $(top_srcdir)/src/fcml_intel_dialect.c \
102 $(top_srcdir)/src/fcml_intel_parser.c \
103 $(top_srcdir)/src/fcml_intel_parser.h \
104 $(top_srcdir)/src/fcml_intel_rend.c \
105 $(top_srcdir)/src/fcml_intel_rend.h \
106 $(top_srcdir)/src/fcml_messages.c \
107 $(top_srcdir)/src/fcml_messages.h \
108 $(top_srcdir)/src/fcml_mnemonic_parser.c \
109 $(top_srcdir)/src/fcml_mnemonic_parser.h \
110 $(top_srcdir)/src/fcml_modrm_decoder.c \
111 $(top_srcdir)/src/fcml_modrm_decoder.h \
112 $(top_srcdir)/src/fcml_modrm_encoder.c \
113 $(top_srcdir)/src/fcml_modrm_encoder.h \
114 $(top_srcdir)/src/fcml_modrm.h \
115 $(top_srcdir)/src/fcml_optimizers.c \
116 $(top_srcdir)/src/fcml_parser.c \
117 $(top_srcdir)/src/fcml_parser_int.c \
118 $(top_srcdir)/src/fcml_parser_int.h \
119 $(top_srcdir)/src/fcml_parser_utils.c \
120 $(top_srcdir)/src/fcml_parser_utils.h \
121 $(top_srcdir)/src/fcml_renderer.c \
122 $(top_srcdir)/src/fcml_rend_utils.c \
123 $(top_srcdir)/src/fcml_rend_utils.h \
124 $(top_srcdir)/src/fcml_stream.c \
125 $(top_srcdir)/src/fcml_trace.h \
126 $(top_srcdir)/src/fcml_utils.c \
127 $(top_srcdir)/src/fcml_utils.h \
128 $(top_srcdir)/src/fcml_stream.h \
129 $(top_srcdir)/src/fcml_lag_assembler.c \
130 $(top_srcdir)/src/fcml_symbols.c \
131 $(top_srcdir)/src/fcml_disp8_n.h \
132 $(top_srcdir)/src/fcml_disp8_n.c \
133 $(top_srcdir)/src/fcml_operand_decorators.h \
134 $(top_srcdir)/src/fcml_operand_decorators.c
135
136 fcml_internal_check_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/check/stf
137
138 fcml_internal_check_LDADD = $(top_srcdir)/check/stf/libstf.la
139
140 check_SCRIPTS = fcml_internal_check
141
142 TESTS = $(check_SCRIPTS)
143
144 yl:
145 $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_intel_lexer.c
146 $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_gas_lexer.c
147 $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_intel_parser_def.c
148 $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_gas_parser_def.c