# ----------------------------------------------------------------------------
# - Makefile                                                                 -
# - aleph object database client makefile                                    -
# ----------------------------------------------------------------------------
# - This program is  free software;  you can  redistribute it and/or  modify -
# - it provided that this copyright notice is kept intact.                   -
# -                                                                          -
# - This  program  is  distributed in the hope  that it  will be useful, but -
# - without  any   warranty;  without  even   the   implied    warranty   of -
# - merchantability  or fitness for a particular purpose. In not event shall -
# - the copyright holder be  liable for  any direct, indirect, incidental or -
# - special damages arising in any way out of the use of this software.      -
# ----------------------------------------------------------------------------
# - copyright (c) 1999-2003 amaury darsch                                    -
# ----------------------------------------------------------------------------

TOPDIR		= ../../../..
MAKDIR		= $(TOPDIR)/cnf/mak
CONFFILE	= $(MAKDIR)/aleph-conf.mak
RULEFILE	= $(MAKDIR)/aleph-rule.mak
include		  $(CONFFILE)

# ----------------------------------------------------------------------------
# project configurationn                                                     -
# ----------------------------------------------------------------------------

DSTDIR		= $(BLDDST)/src/clt/aod/exe
INCLUDE		= -I. -I$(BLDHDR)/odb -I$(BLDHDR)/txt -I$(BLDHDR)/eng \
	              -I$(BLDHDR)/std -I$(BLDHDR)/plt
EXELIBS		= -L $(BLDLIB) -laleph-odb -laleph-txt \
		               -laleph-eng -laleph-std -laleph-plt $(STDLIBS)
STALIBS		= $(BLDLIB)/libaleph-odb.a $(BLDLIB)/libaleph-txt.a   \
	          $(BLDLIB)/libaleph-eng.a $(BLDLIB)/libaleph-std.a   \
		  $(BLDLIB)/libaleph-plt.a $(STDLIBS)
TARGETS		= aod

# ----------------------------------------------------------------------------
# - project rules                                                            -
# ----------------------------------------------------------------------------

# rule: all
# this rule is the default rule which call the target rule

all: targets
.PHONY: all

# include: rule.mak
# this rule includes the platform dependant rules

include $(RULEFILE)

# rule: distri
# this rule install the exe distribution files

distri:
	@$(MKDIR) $(DSTDIR)
	@$(CP)    Makefile $(DSTDIR)
	@$(CP)    *.cpp    $(DSTDIR)
	@$(CP)    *.hpp    $(DSTDIR)
.PHONY: distri

# rule: install
# this rule install the distribution

install:
	@$(MKDIR) $(BINDIR)
	@$(CP)    $(TARGETS) $(BINDIR)
.PHONY: install

# rule: clean
# local clean rule

clean::
	@$(RM) $(TARGETS)
