From a5ec437e91f90f25711c7e1b47b8238fdae6b103 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Wed, 16 Oct 2019 18:37:32 +0300 Subject: [magi] Cosmetic fixes. --- examples/Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 examples/Makefile (limited to 'examples/Makefile') diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..d93176b --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,29 @@ +# Uncomment following to enable debug mode: +# DEBUG = yes + +CC = gcc +EXAMPLES = append cookie upload echo + +CFLAGS = -xc -ansi -pedantic -Wall +ifeq '$(DEBUG)' 'yes' +CFLAGS += -g -O0 +else +CFLAGS += -O3 +endif + +INCLUDE = -I ../src +LFLAGS = -L.. -lmagi + +MAGI = ../libmagi.a + + +default: $(EXAMPLES) + +$(MAGI): + cd ..; $(MAKE) + +%: %.c $(MAGI) + $(CC) $(CFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@ + +clean: + rm -f $(EXAMPLES) -- cgit v1.2.3