summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoruntir_l <87096069+untir-l@users.noreply.github.com>2022-02-18 13:01:12 +0000
committeruntir-l <87096069+untir-l@users.noreply.github.com>2022-02-25 09:56:49 +0000
commit1bc2a436583b0e898decf13e695a1908a894a38c (patch)
treec2a984a4b7bfef841e44792cbabae360390485aa /Makefile
parentcde12d91839f2db46711edb5946b03ea2704bcb6 (diff)
downloadhitomezashi-1bc2a436583b0e898decf13e695a1908a894a38c.tar
hitomezashi-1bc2a436583b0e898decf13e695a1908a894a38c.tar.gz
hitomezashi-1bc2a436583b0e898decf13e695a1908a894a38c.zip
Change argument parsing to use optparse, fix bugs in it, misc. changes
- Change argument parsing library from xgetopt to optparse (pretty close to a drop-in replacement). - Fix bugs in the argument parsing. There were several. - Remove an extraneous printf added for debugging purposes. - Add more bounds checks for numeric arguments to avoid passing garbage to the library code and hitting assertions when the input is bad. - Change the clang-format invocation in the Makefile to have --verbose. - Change -Wpedantic to --pedantic-errors in CFLAGS, add -Wno-unused-function so it doesn't complain about the ones from optparse (such are the perils of single-header libraries).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e632760..41323c3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
.POSIX:
CC = gcc
-CFLAGS = -std=c11 -Wall -Wpedantic -O3 `sdl2-config --cflags`
+CFLAGS = -std=c11 -Wall -Wno-unused-function --pedantic-errors -O3 `sdl2-config --cflags`
LDLIBS = `sdl2-config --libs`
AR = ar
ARFLAGS = rcs
@@ -18,7 +18,7 @@ hitomezashi_cli: hitomezashi_cli.o libhitomezashi.a
hitomezashi_cli.o: hitomezashi_cli.c hitomezashi_cli.h
format-code:
- clang-format -i *.c *.h
+ clang-format -i --verbose *.c *.h
clean:
rm -f *.a *.o hitomezashi_cli