#  The Haskell Ports Library: Tests makefile
#
#  Author : Manuel M T Chakravarty
#  Created: 11 February 2001
#
#  Version $Revision: 1.6 $ from $Date: 2002/09/15 09:34:02 $
#
#  Copyright (c) [2001..2002] Manuel M T Chakravarty
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Library General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library 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.  See the GNU
#  Library General Public License for more details.
#
#  = DOCU =====================================================================
#

#  ***************************************
#  !!! This makefile requires GNU make !!!
#  ***************************************

include ../mk/config.mk ../mk/common.mk

# The files making up this library
#
SRCS    = Simple.hs SimpleProc.hs ProcPipe.hs
OBJS    = $(patsubst %.hs,%.o,$(filter %.hs,$(SRCS)))

# Auxilliary targets
# ------------------

EXTRAHCFLAGS=-i../lib
EXTRALDFLAGS=-L../lib -lportsHS

PROGS=Simple SimpleProc ProcPipe TestProcesses

.PHONY: default prep depend all clean spotless

prep: $(GENSRCS) depend

depend: $(GENSRCS) gendepend

all: $(PROGS)
default: all

# the tests depend on the HPL
#
$(PROGS): ../lib/libportsHS.a

# admin targets
#

clean: genclean
	-$(RM) $(PROGS)

spotless: genspotless
