aboutsummaryrefslogtreecommitdiff
path: root/examples/Makefile
diff options
context:
space:
mode:
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)