# $Id: PTMakefile,v 1.1 1999/03/11 15:00:22 carlo Exp $
#
# ProtoType Base Makefile
#
# Copyright (C) 1999
#
# 1024/624ACAD5 1997/01/26 Carlo Wood, Run on IRC <carlo@runaway.xs4all.nl>
# Key fingerprint = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
#
# All rights reserved.
#
# See the file LICENSE for copyright information.
#
# This file may be distributed under the terms of the Q Public License 1.0
# as defined by Troll Tech AS of Norway and appearing in the file LICENSE.QPL
# included in the packaging of this file.
#
#-----------------------------------------------------------------------------
#
# Edit $PROTODIR/Makedefs.h to get it working for your system
#

BASEDIR=.
include ${PROTODIR}/Makedefs.h

.PHONY: all build clean depend real-clean
.SUFFIXES:

all: build

build::
	@for i in ${SUBDIRS}; do ${MAKE} -r -C $$i build || exit; done

clean::
	${RM} -f *.orig lib/*.a lib/lib*.so*
	@for i in ${SUBDIRS}; do ${MAKE} -r -C $$i clean; done

depend::
	@for i in ${SUBDIRS}; do ${MAKE} -r -C $$i depend || exit; done

real-clean:: clean
	@for i in ${SUBDIRS}; do ${MAKE} -r -C $$i real-clean || exit; done
	find . -name '*.orig' -print | xargs rm -f
	find . -name '*.o' -print | xargs rm -f
	find . -name core -print | xargs rm -f
	find . -name '.*' ! -name '.' ! -name '..' ! -name '.*.version*' -print | xargs rm -rf
	find . -type f -perm +111 -print | xargs rm -f
	find . -name troep -print | xargs rm -f
