# ----------------------------------------------------------------------------
# - Makefile                                                                 -
# - acme client : aleph interpreter 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-2000 amaury darsch                                    -
# ----------------------------------------------------------------------------

TOPDIR		= ../../..
CNFDIR		= $(TOPDIR)/cnf
SITEFILE	= $(CNFDIR)/site.mak
RULEFILE	= $(CNFDIR)/rule.mak
include		  $(SITEFILE)

# ----------------------------------------------------------------------------
# source file generation                                                     -
# ----------------------------------------------------------------------------

INCLUDE		= -I. -I$(AENGINC) -I$(ASTDINC)

CPPSRCS		= Main.cpp    \
		  Options.cpp

CLIENTS		= aleph

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

# rule: all
# this rule is the default rule which builds the clients

all: build
.PHONY: all

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

include $(RULEFILE)

# rule: build
# build the clients

build: $(CLIENTS)
	@$(MKDIR) $(BINREL)
	@$(CP) $(CLIENTS) $(BINREL)
.PHONY: build

# rule: clients
# build the client executable

$(CLIENTS) : $(OBJECTS)
	$(LD) $(CPPFLAGS) -o $@  $(OBJECTS) $(LIBAENG) $(STDLIBS)

# rule: install
# install this client

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

# rule: clean
# clean only the test file and depends file

clean::
	@$(RM) $(CLIENTS)
.PHONY: clean
