X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=Makefile;h=c79f93cff0bce1013d800ff83164a077a319e795;hb=HEAD;hp=45a51f8e58737af488fd2dd4882838bcdcc893a9;hpb=820675afa07d25cbd53d98e92fc174021033daa2;p=libcmdline.git diff --git a/Makefile b/Makefile index 45a51f8..c79f93c 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,26 @@ -BUILDDIR = $(PWD)/build -SRCDIR = $(PWD)/src +MAKEFLAGS += --no-print-directory + +TOPDIR = $(shell pwd) +BUILDDIR = $(TOPDIR)/build +SRCDIR = $(TOPDIR)/src +PREFIX = /usr/local + +include $(TOPDIR)/libcmdline.vars.mk + +export TOPDIR +export BUILDDIR +export SRCDIR +export PREFIX SUBDIRS = lib +SUBDIRS += calculator_server SUBDIRS += trivial_rdline SUBDIRS += extension_example SUBDIRS += calculator_standalone -SUBDIRS += calculator_server SUBDIRS += client -SUBDIRS += event_server SUBDIRS += genconf +ifeq ($(HAVE_EVENT_LIB),y) +SUBDIRS += event_server +endif -# configuration for lib, not adviced to modify it except for -# really small devices, because it changes the API. -# CFLAGS += -DNO_RDLINE_HISTORY -# CFLAGS += -DNO_RDLINE_KILL_BUF -CFLAGS += -DCMDLINE_HAVE_FLOAT -CFLAGS += -DCMDLINE_HAVE_SOCKET - -CFLAGS += -Wall -Werror -CFLAGS += -O0 -g - -CFLAGS += -I$(SRCDIR)/lib - -# needed if you want to parse float -LDFLAGS += -lm - - -export CFLAGS LDFLAGS - -_all: all - -all clean: - for i in $(SUBDIRS) ; do \ - make -C ${BUILDDIR}/$$i \ - VPATH=${SRCDIR}/$$i $@ || exit $$? ; \ - done +include $(TOPDIR)/libcmdline.subdir.mk