aboutsummaryrefslogtreecommitdiff
path: root/examples/Makefile
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-02-21 18:09:22 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-02-21 18:09:22 +0300
commita93c561921b79e5f27b986292fe70dce1879f91e (patch)
treee28853c5196344ac80f5ad04d16bab673733f499 /examples/Makefile
parent83cd2267b309fa7411acaed356f88101196bb2ad (diff)
downloadmagi-a93c561921b79e5f27b986292fe70dce1879f91e.tar
magi-a93c561921b79e5f27b986292fe70dce1879f91e.tar.xz
magi-a93c561921b79e5f27b986292fe70dce1879f91e.zip
[magi]
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile11
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 8f5282c..28e9bed 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -2,14 +2,14 @@
# Compilation Options
# Debug mode (allowing to debug the examples via gdb):
# DEBUG = yes
+# Examples to build by default:
+EXAMPLES = append cookie upload echo
# Specify your favourite C compiler here (e.g. tcc):
CC = gcc
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Preparations
-EXAMPLES = append cookie upload echo
-
# Compile under the most strict conditions:
CFLAGS = -xc -ansi -pedantic -Wall
# Debug and optimisation are not compatible:
@@ -22,8 +22,7 @@ endif
# Including magi library headers and setting linker to use it:
INCLUDE = -I ../include
LFLAGS = -L.. -lmagi
-
-# Specification of library file to produce it, if not provided:
+# Specify library file to set it as a prerequisite for compilation:
MAGI = ../libmagi.a
@@ -42,7 +41,3 @@ clean:
# Compile executables from corresponding sources and library:
%: %.c $(MAGI)
$(CC) $(CFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@
-
-# Run make for library to produce it:
-$(MAGI):
- cd ..; $(MAKE)