aboutsummaryrefslogtreecommitdiff
path: root/examples/makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-10-11 14:35:34 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-10-11 14:35:34 +0300
commitb0a358a5f2ee27c052c163606a20135f37761884 (patch)
tree24e18faa3f7691407e5fc5265b5b9a9b340efa4d /examples/makefile
parent7290d88173184079d9e7a6aaf2cab27e1900831d (diff)
downloadmagi-b0a358a5f2ee27c052c163606a20135f37761884.tar
magi-b0a358a5f2ee27c052c163606a20135f37761884.tar.xz
magi-b0a358a5f2ee27c052c163606a20135f37761884.zip
.
Diffstat (limited to 'examples/makefile')
-rw-r--r--examples/makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/makefile b/examples/makefile
new file mode 100644
index 0000000..de6b310
--- /dev/null
+++ b/examples/makefile
@@ -0,0 +1,24 @@
+# Uncomment following to enable debug mode:
+# DEBUG = yes
+
+CC = gcc
+EXAMPLES = append cookie upload
+
+CFLAGS = -xc -ansi -pedantic -Wall
+ifeq '$(DEBUG)' 'yes'
+CFLAGS += -g -O0
+else
+CFLAGS += -O3
+endif
+
+INCLUDE = -I ../src
+LFLAGS = -L.. -lmagi
+
+
+default: $(EXAMPLES)
+
+%: %.c
+ $(CC) $(CFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@
+
+clean:
+ rm -f $(EXAMPLES)