
# This is the master makefile for the database project

# For best results, edit the following to taste.  They are passed down
# to the lower makefiles.

# binary directory
ROOTDIR ?= /usr/local/vbdb
BINDIR ?= $(ROOTDIR)/bin
PRODIR ?= $(ROOTDIR)/pros
FFDIR ?= $(ROOTDIR)/etc/fileformats

# the c++ compiler of choice
CC ?= g++

# export stuff
# export CC BINDIR ROOTDIR

# Here are our targets

MAKEDIRS=lib vbwidgets vbview client server brainBrowser db_import db_network db_print util
INSTALLDIRS=client server
OUT=

# PHONY declaration makes life easier
.PHONY: clean install subdirs $(MAKEDIRS)

subdirs: $(MAKEDIRS)

$(MAKEDIRS):
	make -C $@

install:
	mkdir -p $(BINDIR)
	for dir in $(INSTALLDIRS) ; do make -C $$dir install ; done

clean:
	for dir in $(MAKEDIRS) ; do make -C $$dir clean ; done
	rm -f core *~ */*~ */core */*.o

client: lib

server: lib
