Initial import from http://www.droids-corp.org/hg/libcmdline/rev/db316e4289a1
[libcmdline.git] / Makefile
1 BUILDDIR = $(PWD)/build
2 SRCDIR = $(PWD)/src
3
4 SUBDIRS  = lib
5 SUBDIRS += extension_example
6 SUBDIRS += calculator_standalone
7 SUBDIRS += calculator_server
8 SUBDIRS += client
9 SUBDIRS += genconf
10
11 # configuration for lib, not adviced to modify it except for
12 # really small devices, because it changes the API.
13 # CFLAGS += -DNO_RDLINE_HISTORY
14 # CFLAGS += -DNO_RDLINE_KILL_BUF
15 # CFLAGS += -DNO_PARSE_FLOAT
16
17 CFLAGS += -Wall -Werror
18 CFLAGS += -O0 -g
19
20 CFLAGS += -I$(SRCDIR)/lib
21
22 # needed if you want to parse float
23 LDFLAGS += -lm
24
25
26 export CFLAGS LDFLAGS
27
28 _all: all
29
30 all clean:
31         for i in $(SUBDIRS) ; do \
32                 make -C ${BUILDDIR}/$$i \
33                         VPATH=${SRCDIR}/$$i $@ || exit $$? ; \
34         done