-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (38 loc) · 1.05 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
CC=gcc
CFLAGS=-Wall -std=c99 -g -O2 -I./include
LDFLAGS=
OBJDIR=./obj
BINDIR=./bin
SRCDIR=./src
TESTDIR=./tests
INCDIR=./include
OBJS=$(OBJDIR)/hight_core.o $(OBJDIR)/hight_utils.o \
$(OBJDIR)/main.o
TARGET=$(BINDIR)/a.out
.PHONY: all clean dir rebuild
all: dir $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -MMD -MP -c $< -o $@
# $(OBJDIR)/main.o: main.c
# $(CC) $(CFLAGS) -MMD -MP -c main.c -o $@
-include $(OBJS:.o=.d)
# $(OBJDIR)/hight_core.o: $(SRCDIR)/hight_core.c $(INCDIR)/hight.h
# $(OBJDIR)/hight_utils.o: $(SRCDIR)/hight_utils.c $(INCDIR)/hight_utils.h
clean:
rm -f $(OBJS) $(TARGET) $(OBJDIR)/*.d
# @echo "Removing AESAVS files ..."
# rm -rf $(KATFILES_TO_DELETE)
# @echo "AESAVS files removal completed successfully."
dir:
@mkdir -p $(OBJDIR) $(BINDIR)
rebuild: clean all
run:
(cd bin && ./a.out)
leak:
(cd bin && valgrind --leak-check=full --show-leak-kinds=all ./a.out)
comp:
(cd bin && ./a.out > speed.txt)
(cd bin && mv speed.txt ../view/)
(cd view && python3 compare_cycle.py)