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
# Generate the testable executable inc
#
# This Makefile uses a bunch of magic variables, as explained here in the
# manual.
# https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html#Automatic-Variables
#
# $@ : The file name of the target of the rule.
# $< : The first prerequisite; usually the input file
#
# The C compiler flags used are,
#
# `-m64` forces to compile for 64bit target, this prevents accidental surprises.
#
# `-g3 -ggdb3` generates as much debug symbols as possible, notably the latter
# allows the use of macros in gdb prompt. As of now, only GCC seems to support
# this option.
#
# Omitting the frame pointer with `-fomit-frame-pointer` removes the standard
# function preamble and post when not needed. This makes the assembly slightly
# easier to read and harder to debug.
#
# `-fno-asynchronous-unwind-tables` gets rid of all the '.cfi' directives from
# the generated asm.
#
CFLAGS = .DEFAULT_GOAL :=
: # cargo install --force cbindgen
: : :
: :
: :
# Test inside the container
: :