summaryrefslogtreecommitdiff
path: root/examples/Makefile
blob: 7d9937c52f13c60f04e0570411f4c57ea5ae39c7 (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
30
31
32
33
34
# Uncomment following to enable debug mode:
DEBUG    = yes

CC        = g++
EXAMPLES  = plain lines markdown

CPPFLAGS  = -Wall -ansi
ifeq '$(DEBUG)' 'yes'
CPPFLAGS += -g -O0
else
CPPFLAGS += -O3
endif

INCLUDE   = -I../src -I$(SCRIPTDIR)
LFLAGS    = -L.. -ltexo -L$(SCRIPTDIR) -lscriptpp

TEXO      = ../libtexo.a
SCRIPTDIR = ../../lib/scriptpp
SCRIPTPP  = $(SCRIPTDIR)/libscriptpp.a


default: $(EXAMPLES)

$(TEXO):
	cd ..; $(MAKE)

$(SCRIPTPP):
	cd $(SCRIPTDIR); $(MAKE)

%: %.cpp $(SCRIPTPP) $(TEXO)
	$(CC) $(CPPFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@

clean:
	rm -f $(EXAMPLES)