diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-19 22:39:01 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-19 22:39:01 +0100 |
commit | 414d27fc43dfa824f92b4b7c6f073e251dbe18e2 (patch) | |
tree | 0dce6a5d1da06b409c8dd0670d6bee0d87378ab0 /Makefile | |
download | ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.tar ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.tar.gz ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.tar.bz2 ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.tar.lz ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.tar.xz ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.tar.zst ov-414d27fc43dfa824f92b4b7c6f073e251dbe18e2.zip |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1d860b2 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +DESTDIR=/ +SRCFILE=main.cpp +O=0 +CFLAGS += -Wextra -Wall -g -O$O -I. -oov -finput-charset=UTF-8 -fextended-identifiers +LIBS += +CC=c++ +VGARGS += --leak-check=full --track-origins=yes --verbose --log-file=valgrind-out.txt --suppressions=/usr/lib/i386-linux-gnu/valgrind/default.supp --show-leak-kinds=all --leak-resolution=high + +.NOTPARALLEL: +default: + $(CC) $(CFLAGS) $(SRCFILE) $(LIBS) + +# tests if code compiles under gcc, clang and tcc +cc: + make -e CC=tcc + make -e CC=gcc + make -e CC=clang + +install: + mkdir -p $(DESTDIR)/usr/bin/ + cp ov $(DESTDIR)/usr/bin/ + +distclean: + rm ov -f + +clean: + rm ov -f + +prepare: + apt install build-essential -y + +# developing is to be done on i386. for example the default suppression file is hardcoded for i386 here: +# developing is to be done on bullseye. + +valgrind: + G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind $(VGARGS) ./ov |