aboutsummaryrefslogtreecommitdiff
path: root/example/makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-09-22 11:03:31 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-09-22 11:03:31 +0300
commitf3f9c925687d262547d0e203ad3216fa6f46fd5d (patch)
tree2a66d8fc2a443f6406fd06161faf930086400995 /example/makefile
parent3d27a4f8f8de8d5ec1d59b24ea8607f7ce450fe4 (diff)
downloadmagi-f3f9c925687d262547d0e203ad3216fa6f46fd5d.tar
magi-f3f9c925687d262547d0e203ad3216fa6f46fd5d.tar.xz
magi-f3f9c925687d262547d0e203ad3216fa6f46fd5d.zip
.
Diffstat (limited to 'example/makefile')
-rw-r--r--example/makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/example/makefile b/example/makefile
new file mode 100644
index 0000000..de6b310
--- /dev/null
+++ b/example/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)