-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 760 Bytes
/
Makefile
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
TARGET = vm_riskxvii
CC = gcc
CFLAGS = -c -Wall -Wvla -Oz -s -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants -fno-ident
# -mno-riscv-attribute
# -m32
# -fno-math-errno -fno-unroll-loops -fno-exceptions
# -nostartfiles -nodefaultlibs
# -Wall -Wvla
# -Wall -Wvla -Werror -O0 -g -std=c11
# ASAN_FLAGS = -fsanitize=address
SRC = vm_riskxvii.c
OBJ = $(SRC:.c=.o)
all:$(TARGET)
$(TARGET):$(OBJ)
$(CC) $(ASAN_FLAGS) -o $@ $(OBJ)
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) $(ASAN_FLAGS) $<
strip --strip-debug --strip-unneeded --remove-section=.comment --remove-section=.note $(TARGET).o
# --strip-all
run:
./$(TARGET)
run_test:
echo what are we testing?!
# bash run_tests.sh
clean:
rm -f *.o *.obj $(TARGET)