aboutsummaryrefslogtreecommitdiff
path: root/examples/makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-09-13 18:50:34 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-09-13 18:50:34 +0300
commitad6188f911af896c9c77e9215bea3c5c2a4e6cc3 (patch)
tree158b4015ff302f72fe2bb8a0ee3d5441ffb66719 /examples/makefile
downloadmagi-ad6188f911af896c9c77e9215bea3c5c2a4e6cc3.tar
magi-ad6188f911af896c9c77e9215bea3c5c2a4e6cc3.tar.xz
magi-ad6188f911af896c9c77e9215bea3c5c2a4e6cc3.zip
Project name and license are added. Minor changes.
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..e951b47
--- /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 = ../src
+LFLAGS = -L.. -lcgi
+
+
+default: $(EXAMPLES)
+
+%: %.c
+ $(CC) $(CFLAGS) -I $(INCLUDE) $< $(LFLAGS) -o $@
+
+clean:
+ rm -f $(EXAMPLES)