aboutsummaryrefslogtreecommitdiff
path: root/vendor/optparse-master/examples/Makefile
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-25 15:50:13 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-25 15:50:21 +0200
commitff415f69a93812418cc60a33dd14452fc6b2901a (patch)
tree1578ef579b958927e64e0835c81339a00fce65fb /vendor/optparse-master/examples/Makefile
parent0d28ae797b89f05b08b1051f0d2dd72d2416d409 (diff)
Support generation of asm/obj files
Diffstat (limited to 'vendor/optparse-master/examples/Makefile')
-rw-r--r--vendor/optparse-master/examples/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/optparse-master/examples/Makefile b/vendor/optparse-master/examples/Makefile
new file mode 100644
index 0000000..11ae2d0
--- /dev/null
+++ b/vendor/optparse-master/examples/Makefile
@@ -0,0 +1,18 @@
+CC = cc
+CFLAGS = -ansi -pedantic -Wall -Wextra -Wno-unused-function -Wno-unused-but-set-variable -g3
+LDFLAGS =
+LDLIBS =
+
+all: short$(EXE) long$(EXE) subcommands$(EXE)
+
+short$(EXE): short.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ short.c ../optparse.h $(LDLIBS)
+
+long$(EXE): long.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ long.c ../optparse.h $(LDLIBS)
+
+subcommands$(EXE): subcommands.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ subcommands.c ../optparse.h $(LDLIBS)
+
+clean:
+ rm -f short$(EXE) long$(EXE) subcommands$(EXE)