From 258c9ef71e45c8e6dff9ee708ce51681dc90ecf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 31 Jan 2023 21:55:33 +0100 Subject: =?UTF-8?q?prve=20ne=20pozabi=C5=A1=20nikoli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..5b5889b --- /dev/null +++ b/makefile @@ -0,0 +1,26 @@ +DESTDIR=/ +CC=cc +MYCFLAGS=-Ofast -march=native -Wall -Wextra -Wformat -pedantic -g -I. # -fsanitize=address +MYLDFLAGS=-lpthread + +default: ebs disass + +ebs: main.c ebs.c + $(CC) $(MYCFLAGS) $(CFLAGS) main.c -o$@ $(MYLDFLAGS) $(LDFLAGS) + +disass: disass + $(CC) $(MYCFLAGS) $(CFLAGS) disass.c -o$@ $(MYLDFLAGS) $(LDFLAGS) + +install: + mkdir -p $(DESTDIR)/usr/bin/ + cp ebs $(DESTDIR)/usr/bin/ + +distclean: clean + +clean: + rm -rf ebs tmp + +valgrind: + valgrind --error-exitcode=59 --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt $(CMD) + +.PHONY: default install distclean clean valgrind ebs disass -- cgit v1.2.3