aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-08-16 10:43:50 +0200
committerNRK <nrk@disroot.org>2022-08-16 10:43:50 +0200
commit216f312578be5c959527c03ccc70d27eebcc76aa (patch)
tree0dac281db909a1d27cc248c63f3c939f2632863d /Makefile
parentd9f20a41224265573395381fbbdea40ac9891d84 (diff)
downloadnsxiv-216f312578be5c959527c03ccc70d27eebcc76aa.tar.zst
add support for long-opts (#332)
Uses [optparse] to add support for long-opts. optparse is posix compliant with getopt(3) and thus would be backwards compatible. It does not have any dependency (not even the c standard library!) and is C89 compatible and thus fits our current code-style. [optparse]: https://github.com/skeeto/optparse Note that we're using a couple `pragma`-s to silence some harmless warnings. This should be portable because these pragma-s don't change the behavior of the program. Furthermore, C standard mandates that unknown pragma's should be ignored by the compiler and thus would not result in build failure on compilers which do not recognize them. Closes: https://codeberg.org/nsxiv/nsxiv/issues/328 Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/332 Reviewed-by: eylles <eylles@noreply.codeberg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 04d2ed7..3527741 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ nsxiv: $(objs)
$(CC) $(CFLAGS) $(nsxiv_cppflags) -c -o $@ $<
$(objs): Makefile config.mk nsxiv.h config.h commands.h
-options.o: version.h
+options.o: version.h optparse.h
window.o: icon/data.h utf8.h
config.h: