aboutsummaryrefslogtreecommitdiff
path: root/examples/makefile
blob: e3205aade71d348156cb5b91796922be6eb215d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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


default: $(EXAMPLES)

%: %.c
	$(CC) $(CFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@

clean:
	rm -f $(EXAMPLES)