aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-24 08:59:48 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-24 08:59:48 +0200
commit03fcfd1ba1627f5af84a84a8e0876d19ed88eefa (patch)
treeea41e3b2a00525faa7a65d2c19146ded4a05c050 /Makefile
parentm readme (diff)
downloadhungarian-algorithm-n3-03fcfd1ba1627f5af84a84a8e0876d19ed88eefa.tar.gz
hungarian-algorithm-n3-03fcfd1ba1627f5af84a84a8e0876d19ed88eefa.tar.bz2
hungarian-algorithm-n3-03fcfd1ba1627f5af84a84a8e0876d19ed88eefa.tar.xz
m + enable more warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 19 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 75eade0..514127a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,21 @@
-all:
- gcc -g -o "hungarian"{,.c}
+OPTIMISE = -Og -g
+WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs \
+ -Wtrampolines -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs -Winline -Wno-variadic-macros -Wsync-nand \
+ -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow \
+ -Wundef -Wbad-function-cast -Wcast-qual -Wwrite-strings -Wlogical-op -Waggregate-return \
+ -Wstrict-prototypes -Wold-style-definition -Wpacked -Wvector-operation-performance \
+ -Wunsuffixed-float-constants -Wsuggest-attribute=const -Wsuggest-attribute=noreturn \
+ -Wsuggest-attribute=pure -Wsuggest-attribute=format -Wnormalized=nfkc -Wconversion \
+ -fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp -fstack-usage \
+ -funsafe-loop-optimizations
+# excluded: -Wdeclaration-after-statement
-nodebug:
- gcc -o "hungarian"{,.c}
+
+all: hungarian
+
+hungarian: hungarian.c
+ gcc -std=c99 $(OPTIMISE) $(WARN) -o $@ $<
test:
./"hungarian"
@@ -11,8 +24,8 @@ valgrind:
valgrind --tool=memcheck --leak-check=full ./"hungarian"
clean:
- if [ -f "hungarian" ]; then unlink "hungarian"; fi
+ -rm - hungarian
-.PHONY: test valgrind clean
+.PHONY: all test valgrind clean