-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTargets.mk
738 lines (614 loc) · 19.6 KB
/
Targets.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
##########################################################################
# This file is part of Binsec. #
# #
# Copyright (C) 2016-2017 #
# CEA (Commissariat à l'énergie atomique et aux énergies #
# alternatives) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1). #
# #
##########################################################################
OPTION_FILES =
GENERATED_FILES =
BINSEC_LICENSE_CEA =
BINSEC_LICENSE_CEA_IMAG =
BINSEC_LICENSE_IMAG =
BINSEC_LICENSE_EXTERNAL_CHLIPALA =
BUILD_FILES = \
_tags Makefile Targets.mk
BINSEC_DISTRIB_FILES += $(BUILD_FILES)
BINSEC_LICENSE_CEA += $(BUILD_FILES)
DBA_DIR = dba
DBA_SRC_FILES = dba_printer dba_types errors dba_utils dba_visitor
DBA_INT_FILES = sigs dba
DBA_ML_FILES = $(DBA_SRC_FILES:%=$(DBA_DIR)/%.ml)
DBA_MLI_FILES = \
$(DBA_SRC_FILES:%=$(DBA_DIR)/%.mli) \
$(DBA_INT_FILES:%=$(DBA_DIR)/%.mli)
DBA_FILES = $(DBA_ML_FILES) $(DBA_MLI_FILES)
BINSEC_DISTRIB_FILES += $(DBA_FILES)
BINSEC_LICENSE_CEA += $(DBA_FILES)
UTILS_DIR = utils
UTILS_SRC_FILES = \
colors \
binsec_utils \
smt_bitvectors region_bitvector \
network_io \
parse_utils instParsing
UTILS_ML_FILES = $(UTILS_SRC_FILES:%=$(UTILS_DIR)/%.ml)
UTILS_MLI_FILES = \
$(UTILS_INT_FILES:%=$(UTILS_DIR)/%.mli) \
$(UTILS_ML_FILES:%.ml=%.mli)
UTILS_BASE_DIR = base
UTILS_BASE_SRC_FILES = \
bigint bitvector string_utils \
logger \
basic_types \
parameters \
list_utils print_utils file_utils \
machine \
worklist \
utils
UTILS_BASE_ML_FILES = $(UTILS_BASE_SRC_FILES:%=$(UTILS_BASE_DIR)/%.ml)
UTILS_BASE_MLI_FILES = $(UTILS_BASE_ML_FILES:%.ml=%.mli)
ALL_UTILS_ML_FILES = \
$(UTILS_BASE_ML_FILES) \
$(UTILS_ML_FILES)
ALL_UTILS_MLI_FILES = $(UTILS_BASE_MLI_FILES) $(UTILS_MLI_FILES)
BINSEC_DISTRIB_FILES += \
$(ALL_UTILS_ML_FILES) $(ALL_UTILS_MLI_FILES)
BINSEC_LICENSE_CEA += \
$(ALL_UTILS_ML_FILES) $(ALL_UTILS_MLI_FILES)
##
# Loader
##
LOADER_DIR = loader
LOADER_SRC_FILES = loader_types loader_buf loader_elf loader_pe loader loader_utils
LOADER_INT_FILES = loader_sigs
LOADER_ML_FILES = $(LOADER_SRC_FILES:%=$(LOADER_DIR)/%.ml)
LOADER_MLI_FILES = \
$(LOADER_INT_FILES:%=$(LOADER_DIR)/%.mli) \
$(LOADER_ML_FILES:%.ml=%.mli)
LOADER_CAML_FILES = $(LOADER_ML_FILES) $(LOADER_MLI_FILES)
BINSEC_DISTRIB_FILES += $(LOADER_CAML_FILES)
BINSEC_LICENSE_CEA += $(LOADER_CAML_FILES)
##
# Disassembly & subdirs
##
DISASM_DIR = disasm
# Disasm_options depends on X86Types ... this should be done better
OPTION_FILES += $(DISASM_DIR)/disasm_options $(DISASM_DIR)/disasm_types
X86_DIR = $(DISASM_DIR)/x86
X86_INT_FILES = x86Types
X86_EXT_SRC_FILES = lreader x86Util x86pp
X86_OWN_SRC_FILES = predba x86Instruction x86decoder x86toDba
X86_SRC_FILES = \
$(X86_EXT_SRC_FILES) \
$(X86_OWN_SRC_FILES)
X86_ML_FILES = $(X86_SRC_FILES:%=$(X86_DIR)/%.ml)
X86_MLI_FILES = \
$(X86_INT_FILES:%=$(X86_DIR)/%.mli) \
$(X86_SRC_FILES:%=$(X86_DIR)/%.mli)
X86_FILES = $(X86_MLI_FILES) $(X86_ML_FILES)
BINSEC_DISTRIB_FILES += $(X86_FILES)
ARM_DIR = $(DISASM_DIR)/arm
ARM_SRC_FILES = armToDba
ARM_MLI_FILES = $(ARM_SRC_FILES:%=$(ARM_DIR)/%.mli)
ARM_ML_FILES = $(ARM_SRC_FILES:%=$(ARM_DIR)/%.ml)
ARM_FILES = $(ARM_MLI_FILES) $(ARM_ML_FILES)
BINSEC_DISTRIB_FILES += $(ARM_FILES)
BINSEC_LICENSE_CEA += \
$(X86_DIR)/lreader.ml $(X86_DIR)/lreader.mli \
$(X86_OWN_SRC_FILES:%=$(X86_DIR)/%.ml) \
$(X86_OWN_SRC_FILES:%=$(X86_DIR)/%.mli) \
$(ARM_FILES)
BINSEC_EXTERNAL = \
$(X86_EXT_SRC_FILES:%=$(X86_DIR)/%.ml) \
$(X86_EXT_SRC_FILES:%=$(X86_DIR)/%.mli)
SIMP_DIR = $(DISASM_DIR)/simplify
SIMP_SRC_FILES = \
simplification_dba_utils \
simplification_dba_block \
simplification_dba_instr \
simplification_dba_prog \
simplification_dba
SIMP_ML_FILES = $(SIMP_SRC_FILES:%=$(SIMP_DIR)/%.ml)
SIMP_MLI_FILES = $(SIMP_INT_FILES) $(SIMP_SRC_FILES:%=$(SIMP_DIR)/%.mli)
SIMP_FILES = $(SIMP_MLI_FILES) $(SIMP_ML_FILES)
BINSEC_LICENSE_CEA += $(SIMP_FILES)
BINSEC_DISTRIB_FILES += $(SIMP_FILES)
DISASM_OWN_SRC_FILES = \
disasm_dyn_infos_callrets \
decode_utils \
disasm_core \
disasm \
disasm_cfg
DISASM_SRC_FILES = \
$(DISASM_EXT_SRC_FILES) \
$(DISASM_OWN_SRC_FILES)
DISASM_ML_FILES = $(DISASM_SRC_FILES:%=$(DISASM_DIR)/%.ml)
DISASM_MLI_FILES = \
$(DISASM_ML_FILES:%.ml=%.mli) \
$(DISASM_INT_FILES:%=$(DISASM_DIR)/%.mli)
DISASM_FILES = $(DISASM_MLI_FILES) $(DISASM_ML_FILES)
BINSEC_DISTRIB_FILES += $(DISASM_FILES)
BINSEC_LICENSE_CEA += $(DISASM_FILES)
##
# LLVM
##
LLVM_DIR = llvm
LLVM_SRC_FILES = \
transfer_functions \
generic_decoder_sig \
generic_decoder llvm_decoder
LLVM_INT_FILES = $(LLVM_SRC_FILES)
LLVM_ML_FILES = $(LLVM_SRC_FILES:%=$(LLVM_DIR)/%.ml)
LLVM_MLI_FILES = $(LLVM_INT_FILES:%=$(LLVM_DIR)/%.mli)
LLVM_FILES = \
$(LLVM_ML_FILES) \
$(LLVM_MLI_FILES)
BINSEC_LICENSE_CEA += $(LLVM_FILES)
BINSEC_DISTRIB_FILES += $(LLVM_FILES)
##
# Formula
##
FORMULA_DIR = formula
FORMULA_SRC_FILES = qed formula_type formula_optim formula formula_utils
FORMULA_INT_FILES = $(FORMULA_SRC_FILES)
FORMULA_ML_FILES = $(FORMULA_SRC_FILES:%=$(FORMULA_DIR)/%.ml)
FORMULA_MLI_FILES = \
$(FORMULA_INT_FILES:%=$(FORMULA_DIR)/%.mli)
FORMULA_FILES = \
$(FORMULA_MLI_FILES) \
$(FORMULA_ML_FILES)
BINSEC_DISTRIB_FILES += $(FORMULA_FILES)
BINSEC_LICENSE_CEA += $(FORMULA_FILES)
##
# SMT
##
SMT_DIR = smtutils
SMT_PRE_SRC_FILES = locations
SMT_PRE_ML_FILES = $(SMT_PRE_SRC_FILES:%=$(SMT_DIR)/%.ml)
SMT_SRC_FILES = \
smtlib2 smtlib2print smtlib2_visitor \
dba_to_smtlib smtlib_pp smt_model solver
SMT_INT_FILES = $(SMT_SRC_FILES) locations smtlib_ast
SMT_PARSER_FILES = smtlib_parser
SMT_LEXER_FILES = smtlib_lexer
SMT_GENERATED_ML_FILES = \
$(SMT_PARSER_FILES:%=$(SMT_DIR)/%.ml) \
$(SMT_LEXER_FILES:%=$(SMT_DIR)/%.ml)
SMT_GENERATED_MLI_FILES = \
$(SMT_PARSER_FILES:%=$(SMT_DIR)/%.mli)
SMT_ML_FILES = \
$(SMT_PRE_ML_FILES) \
$(SMT_GENERATED_ML_FILES) \
$(SMT_SRC_FILES:%=$(SMT_DIR)/%.ml)
SMT_MLI_FILES = \
$(SMT_GENERATED_MLI_FILES) \
$(SMT_INT_FILES:%=$(SMT_DIR)/%.mli)
GENERATED_FILES += \
$(SMT_GENERATED_MLI_FILES) \
$(SMT_GENERATED_ML_FILES)
SMT_FILES = \
$(SMT_PRE_ML_FILES) \
$(SMT_SRC_FILES:%=$(SMT_DIR)/%.ml) \
$(SMT_INT_FILES:%=$(SMT_DIR)/%.mli) \
$(SMT_PARSER_FILES:%=$(SMT_DIR)/%.mly) \
$(SMT_LEXER_FILES:%=$(SMT_DIR)/%.mll)
BINSEC_DISTRIB_FILES += $(SMT_FILES)
BINSEC_LICENSE_CEA += $(SMT_FILES)
##
# Ast
##
AST_DIR = ast
AST_SRC_FILES = cfgraph ast_builder
AST_ML_FILES = $(AST_DIR)/cfg.ml $(AST_SRC_FILES:%=$(AST_DIR)/%.ml)
AST_MLI_FILES = \
$(AST_ML_FILES:%.ml=%.mli) \
$(AST_INT_FILES:%=$(AST_DIR)/%.mli)
AST_FILES = $(AST_ML_FILES) $(AST_MLI_FILES)
BINSEC_DISTRIB_FILES += $(AST_FILES)
BINSEC_LICENSE_CEA += $(AST_FILES)
##
# Static common
##
STATIC_DIR = static
OPTION_FILES += $(STATIC_DIR)/static_options
STATIC_SRC_FILES = static_types static_utils
STATIC_INT_FILES = $(STATIC_SRC_FILES)
STATIC_ML_FILES = $(STATIC_SRC_FILES:%=$(STATIC_DIR)/%.ml)
STATIC_MLI_FILES = $(STATIC_INT_FILES:%=$(STATIC_DIR)/%.mli)
STATIC_FILES = \
$(STATIC_ML_FILES)\
$(STATIC_MLI_FILES)
BINSEC_DISTRIB_FILES += $(STATIC_FILES)
BINSEC_LICENSE_CEA += $(STATIC_FILES)
##
# Simulation
#
SIMULATION_DIR = $(STATIC_DIR)/simulation
OPTION_FILES += $(SIMULATION_DIR)/simulate_options
SIMULATION_SRC_FILES = \
simulate_utils \
concrete_state concrete_eval \
simulate
SIMULATION_ML_FILES = $(SIMULATION_SRC_FILES:%=$(SIMULATION_DIR)/%.ml)
SIMULATION_MLI_FILES = \
$(SIMULATION_ML_FILES:%.ml=%.mli) \
$(SIMULATION_INT_FILES:%=$(SIMULATION_DIR)/%.mli)
SIMULATION_FILES = \
$(SIMULATION_ML_FILES) \
$(SIMULATION_MLI_FILES)
BINSEC_DISTRIB_FILES += $(SIMULATION_FILES)
BINSEC_LICENSE_CEA += $(SIMULATION_FILES)
##
# Abstract interpretation
##
AI_DIR = $(STATIC_DIR)/ai
OPTION_FILES += $(AI_DIR)/ai_options
AI_BASE_SRC_FILES = normalize_instructions
AI_BASE_ML_FILES = $(AI_BASE_SRC_FILES:%=$(AI_DIR)/%.ml)
AI_BASE_MLI_FILES = $(AI_BASE_SRC_FILES:%=$(AI_DIR)/%.mli)
AI_SRC_FILES = \
display ai_utils \
backward_analysis \
normalize_predicate high_level_predicate \
reduced_product nonrelational \
ai_results \
ai
AI_INT_FILES = ai_sigs $(AI_SRC_FILES)
AI_ML_FILES = $(AI_SRC_FILES:%=$(AI_DIR)/%.ml)
AI_MLI_FILES = $(AI_INT_FILES:%=$(AI_DIR)/%.mli)
AI_DOMAINS_DIR = $(AI_DIR)/domains
AI_DOMAINS_SRC_FILES = domain_common \
interval range kset union_find taint
AI_DOMAINS_INT_FILES = $(AI_DOMAINS_SRC_FILES)
AI_DOMAINS_ML_FILES = $(AI_DOMAINS_SRC_FILES:%=$(AI_DOMAINS_DIR)/%.ml)
AI_DOMAINS_MLI_FILES = $(AI_DOMAINS_INT_FILES:%=$(AI_DOMAINS_DIR)/%.mli)
ALL_AI_ML_FILES = \
$(AI_BASE_ML_FILES) \
$(AI_DOMAINS_ML_FILES) \
$(AI_ML_FILES)
ALL_AI_MLI_FILES = \
$(AI_MLI_FILES) $(AI_BASE_MLI_FILES) $(AI_DOMAINS_MLI_FILES)
AI_FILES = \
$(ALL_AI_ML_FILES) \
$(ALL_AI_MLI_FILES)
BINSEC_DISTRIB_FILES += $(AI_FILES)
BINSEC_LICENSE_CEA += $(AI_FILES)
DYNAMIC_DIR = dynamic
##
# TRACE
##
DTRACE_DIR = $(DYNAMIC_DIR)/trace
DTRACE_BASE_SRC_FILES = trace_type
DTRACE_BASE_ML_FILES = $(DTRACE_BASE_SRC_FILES:%=$(DTRACE_DIR)/%.ml)
DTRACE_BASE_MLI_FILES = $(DTRACE_BASE_SRC_FILES:%=$(DTRACE_DIR)/%.mli)
DTRACE_SRC_FILES = trace_postprocessing trace_loader # trace_visitor
DTRACE_INT_FILES = $(DTRACE_SRC_FILES)
DTRACE_ML_FILES = $(DTRACE_SRC_FILES:%=$(DTRACE_DIR)/%.ml)
DTRACE_MLI_FILES = $(DTRACE_INT_FILES:%=$(DTRACE_DIR)/%.mli)
DDSE_DIR = $(DYNAMIC_DIR)/dse
DDSE_SRC_FILES = path_pred_env policy_engine path_predicate
DDSE_INT_FILES = policy_type $(DDSE_SRC_FILES)
DDSE_ML_FILES = $(DDSE_SRC_FILES:%=$(DDSE_DIR)/%.ml)
DDSE_MLI_FILES = \
$(DDSE_INT_FILES:%=$(DDSE_DIR)/%.mli)
DTAINT_DIR = $(DDSE_DIR)/tainting
DTAINT_SRC_FILES = taint_types tainting
DTAINT_INT_FILES = $(DTAINT_SRC_FILES)
DTAINT_ML_FILES = $(DTAINT_SRC_FILES:%=$(DTAINT_DIR)/%.ml)
DTAINT_MLI_FILES = $(DTAINT_INT_FILES:%=$(DTAINT_DIR)/%.mli)
DDSE_SYSCALL_DIR = $(DDSE_DIR)/syscall_stubs
DDSE_SYSCALL_SRC_FILES = syscall_stubs
DDSE_SYSCALL_INT_FILES = $(DDSE_SYSCALL_SRC_FILES)
DDSE_SYSCALL_ML_FILES = $(DDSE_SYSCALL_SRC_FILES:%=$(DDSE_SYSCALL_DIR)/%.ml)
DDSE_SYSCALL_MLI_FILES = $(DDSE_SYSCALL_INT_FILES:%=$(DDSE_SYSCALL_DIR)/%.mli)
DDSE_ISTUBS_DIR = $(DDSE_DIR)/instruction_stubs
DDSE_ISTUBS_SRC_FILES = instruction_stubs
DDSE_ISTUBS_INT_FILES = $(DDSE_ISTUBS_SRC_FILES)
DDSE_ISTUBS_ML_FILES = $(DDSE_ISTUBS_SRC_FILES:%=$(DDSE_ISTUBS_DIR)/%.ml)
DDSE_ISTUBS_MLI_FILES = $(DDSE_ISTUBS_INT_FILES:%=$(DDSE_ISTUBS_DIR)/%.mli)
DDSE_LIBCALL_DIR = $(DDSE_DIR)/libcall_stubs
DDSE_LIBCALL_SRC_FILES_CEA_IMAG = \
libc_stubs libcall_stubs
DDSE_LIBCALL_SRC_FILES_CEA = \
libcall_utils \
windows_stubs \
call_convention
DDSE_LIBCALL_SRC_FILES = \
$(DDSE_LIBCALL_SRC_FILES_CEA) \
$(DDSE_LIBCALL_SRC_FILES_CEA_IMAG)
DDSE_LIBCALL_INT_FILES = libcall_types
DDSE_LIBCALL_ML_FILES = $(DDSE_LIBCALL_SRC_FILES:%=$(DDSE_LIBCALL_DIR)/%.ml)
DDSE_LIBCALL_MLI_FILES = \
$(DDSE_LIBCALL_INT_FILES:%=$(DDSE_LIBCALL_DIR)/%.mli) \
$(DDSE_LIBCALL_ML_FILES:%.ml=%.mli)
DDSE_EXAMPLES_DIR = $(DDSE_DIR)/examples
DDSE_EXAMPLES_SRC_FILES = \
call_ret generic_analyse opaque_predicate
DDSE_EXAMPLES_INT_FILES = $(DDSE_EXAMPLES_SRC_FILES)
DDSE_EXAMPLES_ML_FILES = \
$(DDSE_EXAMPLES_SRC_FILES:%=$(DDSE_EXAMPLES_DIR)/%.ml)
DDSE_EXAMPLES_MLI_FILES = \
$(DDSE_EXAMPLES_INT_FILES:%=$(DDSE_EXAMPLES_DIR)/%.mli)
DPATH_DIR = $(DDSE_DIR)/path_exploration
DPATH_BASE_SRC_FILES = fdInput
DPATH_BASE_ML_FILES = $(DPATH_BASE_SRC_FILES:%=$(DPATH_DIR)/%.ml)
DPATH_BASE_MLI_FILES = $(DPATH_BASE_SRC_FILES:%=$(DPATH_DIR)/%.mli)
DPATH_SRC_FILES = \
dseException \
tracesToTree exploration_type\
conf_exploration historyAsTree \
symbolicInput \
inputFromFiles initMemInput \
invertChild check_trace traceAsFile \
eipRewrite guideAsRandom uaf_detection \
Parsing_gueb \
criteriaAsDefault criteriaEIPRewrite criteriaAsUAF \
guideAsBFS guideAsDFS \
guideAsUAF guideAsStrcmp\
dse
DPATH_INT_FILES = \
dseException \
typeCriteriaDSE typeGuideDSE typeHistoryDSE typeTraceDSE \
guideAsPriority guideAsUAF guideAsShortestPath \
criteriaUAF \
tracesToTree uaf_detection conf_exploration \
historyAsTree \
guideAsRandom \
guideAsBFS guideAsDFS \
criteriaAsDefault \
criteriaEIPRewrite \
traceAsFile
DPATH_ML_FILES = $(DPATH_SRC_FILES:%=$(DPATH_DIR)/%.ml)
DPATH_MLI_FILES = $(DPATH_INT_FILES:%=$(DPATH_DIR)/%.mli)
DPATH_FILES = \
$(DPATH_ML_FILES) $(DPATH_MLI_FILES) \
$(DPATH_BASE_ML_FILES) $(DPATH_BASE_MLI_FILES)
DYNAMIC_ML_FILES = \
$(DTRACE_BASE_ML_FILES) \
$(DPATH_BASE_ML_FILES) \
$(DDSE_LIBCALL_ML_FILES) \
$(DDSE_SYSCALL_ML_FILES) \
$(DDSE_ISTUBS_ML_FILES) \
$(DTRACE_ML_FILES) \
$(DTAINT_ML_FILES) \
$(DDSE_ML_FILES) \
$(DPATH_ML_FILES) \
$(DDSE_EXAMPLES_ML_FILES)
DYNAMIC_MLI_FILES = \
$(DTRACE_BASE_MLI_FILES) \
$(DTAINT_MLI_FILES) \
$(DTRACE_MLI_FILES) \
$(DDSE_LIBCALL_MLI_FILES) \
$(DDSE_SYSCALL_MLI_FILES) \
$(DDSE_ISTUBS_MLI_FILES) \
$(DDSE_MLI_FILES) \
$(DPATH_BASE_MLI_FILES) \
$(DPATH_MLI_FILES) \
$(DDSE_EXAMPLES_MLI_FILES)
DYNAMIC_DIRS = \
$(DDSE_EXAMPLES_DIR) \
$(DDSE_LIBCALL_DIR) \
$(DDSE_SYSCALL_DIR) \
$(DDSE_ISTUBS_DIR) \
$(DTRACE_DIR) \
$(DDSE_DIR) \
$(DTAINT_DIR) \
$(DPATH_DIR)
BINSEC_DISTRIB_FILES += $(DYNAMIC_ML_FILES) $(DYNAMIC_MLI_FILES)
# Licenses
BINSEC_LICENSE_CEA += \
$(DTRACE_BASE_ML_FILES) \
$(DTRACE_BASE_MLI_FILES) \
$(DTRACE_ML_FILES) \
$(DTRACE_MLI_FILES) \
$(DDSE_LIBCALL_SRC_FILES_CEA:%=$(DDSE_LIBCALL_DIR)/%.ml) \
$(DDSE_LIBCALL_SRC_FILES_CEA:%=$(DDSE_LIBCALL_DIR)/%.mli) \
$(DDSE_SYSCALL_ML_FILES) \
$(DDSE_SYSCALL_MLI_FILES) \
$(DDSE_ISTUBS_ML_FILES) \
$(DDSE_ISTUBS_MLI_FILES) \
$(DTAINT_MLI_FILES) \
$(DTAINT_ML_FILES) \
$(DDSE_ML_FILES) \
$(DDSE_MLI_FILES) \
$(DDSE_EXAMPLES_ML_FILES) \
$(DDSE_EXAMPLES_MLI_FILES)
BINSEC_LICENSE_CEA_IMAG += \
$(DDSE_LIBCALL_SRC_FILES_CEA_IMAG:%=$(DDSE_LIBCALL_DIR)/%.ml) \
$(DDSE_LIBCALL_SRC_FILES_CEA_IMAG:%=$(DDSE_LIBCALL_DIR)/%.mli)
BINSEC_LICENSE_IMAG += $(DPATH_FILES)
##
# DSE
#
# Unused files: typeHeuristiDSE guideasDFSUAF invertSAT exploit_analyse
# Server
SERVER_DIR = server
SERVER_SRC_FILES = dba_io server_callback server
SERVER_ML_FILES = $(SERVER_SRC_FILES:%=$(SERVER_DIR)/%.ml)
SERVER_MLI_FILES = $(SERVER_SRC_FILES:%=$(SERVER_DIR)/%.mli)
SERVER_FILES = $(SERVER_MLI_FILES) $(SERVER_ML_FILES)
BINSEC_DISTRIB_FILES += $(SERVER_FILES)
BINSEC_LICENSE_CEA += $(SERVER_FILES)
##
# Parsers
##
PARSER_DIR = parser
PARSER_PARSER_FILES = dbacsl_parser parser parser_infos policy_parser SMTParserWp
PARSER_LEXER_FILES = dbacsl_token lexer lexer_infos policy_token SMTLexerWp
PARSER_SRC_FILES = parse_helpers
PARSER_GENERATED_ML_FILES = \
$(PARSER_PARSER_FILES:%=$(PARSER_DIR)/%.ml) \
$(PARSER_LEXER_FILES:%=$(PARSER_DIR)/%.ml)
PARSER_GENERATED_MLI_FILES = \
$(PARSER_PARSER_FILES:%=$(PARSER_DIR)/%.mli)
PARSER_ML_FILES = \
$(PARSER_SRC_FILES:%=$(PARSER_DIR)/%.ml) \
$(PARSER_GENERATED_ML_FILES)
# Weirdly enough, ocamllex does not generate mli
PARSER_MLI_FILES = \
$(PARSER_GENERATED_MLI_FILES) \
$(PARSER_SRC_FILES:%=$(PARSER_DIR)/%.mli)
GENERATED_FILES += \
$(PARSER_GENERATED_ML_FILES) \
$(PARSER_GENERATED_MLI_FILES)
PARSER_FILES = \
$(PARSER_PARSER_FILES:%=$(PARSER_DIR)/%.mly) \
$(PARSER_LEXER_FILES:%=$(PARSER_DIR)/%.mll) \
$(PARSER_SRC_FILES:%=$(PARSER_DIR)/%.ml) \
$(PARSER_SRC_FILES:%=$(PARSER_DIR)/%.mli)
BINSEC_DISTRIB_FILES += $(PARSER_FILES)
BINSEC_LICENSE_CEA += $(PARSER_FILES)
##
# Examples
##
EXAMPLE_DIR = examples
EXAMPLE_SRC_FILES = flareon sploit1 \
stat_analysis switch branch_coverage \
summary_analysis
EXAMPLE_INT_FILES = $(EXAMPLE_SRC_FILES)
EXAMPLE_ML_FILES = $(EXAMPLE_SRC_FILES:%=$(EXAMPLE_DIR)/%.ml)
EXAMPLE_MLI_FILES = $(EXAMPLE_INT_FILES:%=$(EXAMPLE_DIR)/%.mli)
EXAMPLE_FILES = $(EXAMPLE_ML_FILES) $(EXAMPLE_MLI_FILES)
BINSEC_DISTRIB_FILES += $(EXAMPLE_FILES)
BINSEC_LICENSE_CEA += $(EXAMPLE_FILES)
##
# Protobuf
##
PROTO_DIR = proto
PROTO_SRC_FILES = \
common instruction libcall syscall \
dba trace analysis_config config message
PROTO_FILES = $(PROTO_SRC_FILES:%=$(PROTO_DIR)/%.proto)
BINSEC_DISTRIB_FILES += $(PROTO_FILES)
BINSEC_LICENSE_CEA += $(PROTO_FILES)
# License ?
PIQI_DIR = piqi
PIQI_SRC_FILES = $(PROTO_SRC_FILES)
PIQI_FILES = $(PIQI_SRC_FILES:%=$(PIQI_DIR)/%.piqi)
PIQI_ML_FILES = \
$(PIQI_SRC_FILES:%=$(PIQI_DIR)/%_piqi.ml) \
$(PIQI_SRC_FILES:%=$(PIQI_DIR)/%_piqi_ext.ml)
GENERATED_FILES += \
$(PIQI_FILES) \
$(PIQI_ML_FILES)
BINPATCHER_DIR = binpatcher
OPTION_FILES += $(BINPATCHER_DIR)/binpatcher_options
BINPATCHER_SRC_FILES = binpatcher
BINPATCHER_INT_FILES = $(BINPATCHER_SRC_FILES)
BINPATCHER_ML_FILES = $(BINPATCHER_SRC_FILES:%=$(BINPATCHER_DIR)/%.ml)
BINPATCHER_MLI_FILES = $(BINPATCHER_INT_FILES:%=$(BINPATCHER_DIR)/%.mli)
BINPATCHER_FILES = \
$(BINPATCHER_ML_FILES) \
$(BINPATCHER_MLI_FILES)
BINSEC_DISTRIB_FILES += $(BINPATCHER_FILES)
BINSEC_LICENSE_CEA += $(BINPATCHER_FILES)
ROOT_SRC_FILES = infos
ROOT_INT_FILES = infos
ROOT_ML_FILES = $(ROOT_SRC_FILES:%=%.ml)
ROOT_MLI_FILES = $(ROOT_INT_FILES:%=%.mli)
MAIN_ML_FILES = test.ml main.ml
BINSEC_LICENSE_CEA += \
$(ROOT_MLI_FILES) \
$(ROOT_ML_FILES) $(MAIN_ML_FILES) test.mli
BINSEC_DISTRIB_FILES += $(ROOT_ML_FILES) $(MAIN_ML_FILES)
OPTION_FILES += options
OPTION_ML_FILES = $(OPTION_FILES:%=%.ml)
OPTION_MLI_FILES = $(OPTION_FILES:%=%.mli)
BINSEC_LICENSE_CEA += \
$(OPTION_ML_FILES) \
$(OPTION_MLI_FILES)
SHARE_DIR = share
BINSEC_DISTRIB_FILES += $(SHARE_DIR)
BINSEC_DISTRIB_FILES += $(OPTION_ML_FILES) $(OPTION_MLI_FILES)
ML_FILES = \
$(UTILS_BASE_ML_FILES) \
$(DBA_ML_FILES) \
$(PIQI_ML_FILES) \
config.ml \
$(OPTION_ML_FILES) \
$(LOADER_ML_FILES) \
$(ROOT_ML_FILES) \
$(PARSER_ML_FILES) \
$(SMT_ML_FILES) \
$(UTILS_ML_FILES) \
$(DISASM_BASE_ML_FILES) \
$(AST_ML_FILES) \
$(X86_ML_FILES) \
$(ARM_ML_FILES) \
$(SIMP_ML_FILES) \
$(LLVM_ML_FILES) \
$(DISASM_ML_FILES) \
$(STATIC_ML_FILES) \
$(FORMULA_ML_FILES) \
$(SIMULATION_ML_FILES) \
$(ALL_AI_ML_FILES) \
$(DYNAMIC_ML_FILES) \
$(SERVER_ML_FILES) \
$(EXAMPLE_ML_FILES) \
$(BINPATCHER_ML_FILES) \
$(MAIN_ML_FILES)
MLI_FILES = \
$(ALL_UTILS_MLI_FILES) \
$(STATIC_MLI_FILES) \
$(OPTION_MLI_FILES) \
$(DBA_MLI_FILES) \
$(LOADER_MLI_FILES) \
$(FORMULA_MLI_FILES) \
$(PARSER_MLI_FILES) \
$(SMT_MLI_FILES) \
$(AST_MLI_FILES) \
$(X86_MLI_FILES) \
$(ARM_MLI_FILES) \
$(SIMP_MLI_FILES) \
$(DISASM_MLI_FILES) \
$(ALL_AI_MLI_FILES) \
$(SIMULATION_MLI_FILES) \
$(DYNAMIC_MLI_FILES) \
$(LLVM_MLI_FILES) \
$(SERVER_MLI_FILES) \
$(EXAMPLE_MLI_FILES) \
$(BINPATCHER_MLI_FILES) \
test.mli \
$(ROOT_MLI_FILES)
CMO_FILES = $(ML_FILES:%.ml=%.cmo)
CMX_FILES = $(ML_FILES:%.ml=%.cmx)
CMI_FILES = $(MLI_FILES:%.ml=%.cmi)
DIRS = \
$(UTILS_BASE_DIR) \
$(UTILS_DIR) \
$(DBA_DIR) \
$(FORMULA_DIR) \
$(AST_DIR) \
$(X86_DIR) \
$(SIMP_DIR) \
$(DISASM_DIR) \
$(STATIC_DIR) \
$(PARSER_DIR) \
$(AI_DIR) $(AI_DOMAINS_DIR)\
$(SIMULATION_DIR) \
$(LOADER_DIR) \
$(DYNAMIC_DIRS) \
$(SMT_DIR) $(SMT_PARSER_DIR) \
$(EXAMPLE_DIR) \
$(SERVER_DIR) \
$(PIQI_DIR) \
$(DSE_DIR) \
$(ARM_DIR) \
$(LLVM_DIR) \
$(BINPATCHER_DIR)
CAMLINCLUDES = $(DIRS:%=-I %) -I .
CAMLFILES = $(MLI_FILES) $(ML_FILES)