aboutsummaryrefslogtreecommitdiff
path: root/examples/Makefile
blob: d93176b8d11259bb4e13fc19cf612ea302c38204 (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
25
26
27
28
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)