# Makefile
############################################################################

# use same configuration parameters as in parent directory
include Config.common
include Config.site

POOLSDIR = POOLS

############################################################################
# No need to change anything below here
############################################################################
# the source files in this directory
CXXSOURCES = 
CSOURCES = 
SOURCES = $(CXXSOURCES) $(CSOURCES)
OBJECTS = ${CXXSOURCES:.C=.o} ${CSOURCES:.c=.o}


THISDIRFLAGS = -DPhBRML -Iinclude -I$(POOLSDIR)


# subdirectories
PROGSDIR = ./PROGS

SUBDIRS = XRML FILTERS $(PROGSDIR) ${POOLSDIR} NODEGEN TEST TOOLS

#default target: compile
all: progs

# generate source file dependencies
depend: 
	for i in $(SUBDIRS) ; do { $(MAKE) -C $$i depend || exit 1 ; } ; done

.phony: libxrml filters progs pools

progs: libxrml filters pools
	$(MAKE) -C $(PROGSDIR) all

here: $(OBJECTS)

libxrml:
	$(MAKE) -C XRML all

pools:
	$(MAKE) -C $(POOLSDIR) all

filters:
	$(MAKE) -C FILTERS all

# make a clean source tree again
cleanhere: cleangen

clean:
	for i in $(SUBDIRS) ; do { $(MAKE) -C $$i clean || exit 1 ; } ; done

distclean: cleanhere
	for i in $(SUBDIRS) ; do { $(MAKE) -C $$i distclean || exit 1 ; } ; done
	-rm -r include/* lib/* bin/*

install-make-dirs:
	-mkdir $(INSTALLDIR)
	-mkdir $(BINDIR)
	-mkdir $(INCDIR)
	-mkdir $(LIBDIR)
	-mkdir $(DATADIR)

install-includes:
	$(INSTALL) -r include/* $(INCDIR)

install-libs:
	$(INSTALL_LIB) lib/* $(LIBDIR)

install-bins:
	$(INSTALL_BIN) bin/* $(BINDIR)

install: install-make-dirs install-includes install-libs install-bins

###############################################################################
# dependencies --- automatically generated with make depend !!
###############################################################################
-include deps


