include ../Makefile.defs

# variables to change

CFLAGS   += -g -Wall
DEFS     += -DSER
ser      = $(CURDIR)/..

INCLUDES += -I$(CURDIR) -I$(ser)
LIBS     += -L$(CURDIR)/cds -L$(CURDIR)/qsa

####################################
# make rules


# exports needed by libraries (this exports here allow to run make
# in libraries independently on make in main ser directory)
export INSTALL INSTALL-CFG INSTALL-BIN INSTALL-MODULES INSTALL-DOC INSTALL-MAN 
export INSTALL-TOUCH
export modules-prefix 

lib-dir     = lib/ser
INSTALL-LIB = $(INSTALL-BIN)
LIBDIR      = $(modules-prefix)/$(lib-dir)

export INSTALL-LIB
export LIBDIR
export INCLUDES
export LIBS
export CFLAGS
export DEFS

SUBDIRS=cds xcap presence

.PHONY: subdirs $(SUBDIRS) 

# clean install tags proper

subdirs:	$(SUBDIRS)

$(SUBDIRS):	
			-@echo "Making $(MAKECMDGOALS) in $@" ; $(MAKE) -f Makefile.ser $(MAKECMDGOALS) -C $@

all:	subdirs

proper:	clean

clean:	subdirs

install:	subdirs