#// Copyright Brian McNamara and Yannis Smaragdakis 2000-2003.
#// Use, modification and distribution is subject to the
#// Boost Software License, Version 1.0.  (See accompanying file
#// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

# Sample gnu makefile. Nothing really important.

######################################################################
# Modify the stuff in this section to match your local configuration.

# The C++ compiler
CC = g++

# The FC++ directory
FCPP  = ../fcpp

# The Boost directory
BOOST = /net/hc282/lorgon/FC++/Boost/boost/

CFLAGS = -W -Wall                  \
         -I$(FCPP) -I$(BOOST)      \
         -ansi -pedantic           \
         -ftemplate-depth-255      \
   		-Wno-long-long            \
         -o $*

######################################################################

PROGSA= apply atree callback2 callback3 callback \
        compose2 compose_ex \
        conv_fun crry2 cute_compose_syntax \
        ecoop1a ecoop1b ecoop2a ecoop2b ecoop3a ecoop3b ecoop3c 

PROGSB= ecoop4a ecoop4b ecoop4c even_odd example \
        foox fooy isort iter2 iter lazy_example \
        mem_fun 

PROGSC= monad0 monad2 monad3 mono new_features \
        no_def_cons notices1 notices2 notices3 notices4 notices5 notices6 \
        ord_test poly2 polytest primes2 ptr_to_fun 

PROGSD= rctest root sctest short_example stl strictlist \
        test_debug test_ptr_mem_fun tw_hamming tw_primes tw_tree y

# L uses lambda
PROGSL= by_need_monad lam2 monad monad_0 monad_2 monad_3 operator \
        parser rep_min 

PROGS= $(PROGSA) $(PROGSB) $(PROGSC) $(PROGSD) $(PROGSL)
# PROGSNL is PROGS no lambda
PROGSNL= $(PROGSA) $(PROGSB) $(PROGSC) $(PROGSD)

######################################################################

.cpp:
	echo ; echo ; $(CC) $(CFLAGS) $*.cpp

all: $(PROGS)
allnl: $(PROGSNL)
progsa: $(PROGSA)
progsb: $(PROGSB)
progsc: $(PROGSC)
progsd: $(PROGSD)
progsl: $(PROGSL)

clean: 
	\rm -f ${PROGS} core

run_all: $(PROGS)
	for i in $(PROGS) ; do ./$$i > /dev/null ; done

show_progs:
	@echo $(PROGS)

show_progsa:
	@echo $(PROGSA)

show_progsb:
	@echo $(PROGSB)

show_progsc:
	@echo $(PROGSC)

show_progsd:
	@echo $(PROGSD)

show_progsl:
	@echo $(PROGSL)

