#
# Toplevel makefile for base-level release 0.9.2 of Linux pthreads
#
include ./Make.defs

all: prerequisite penultimate

prerequisite:
ifeq (${TOPDIR},not_set)
	@echo ""
	@echo "  **********************************************************"
	@echo "  You seem to have forgotton to set the TOPDIR variable in"
	@echo "  in the Make.defs file.  See either the 0-README or the"
	@echo "  Make.defs file for instructions."
	@echo "  **********************************************************"
	@echo ""
	@exit 1
else
	@echo ""
	@echo "  ***********************"
	@echo "  Building Linux pthreads
	@echo "  ***********************"
	@echo ""
endif

penultimate:
	@for dir in ${APPDIRS}; do \
	(cd $$dir; $(MAKE) all); done

clobber: clean
	@for dir in ${APPDIRS}; do \
	(cd $$dir; $(MAKE) clobber); done;

clean:
	@for dir in ${APPDIRS}; do \
	(cd $$dir; $(MAKE) clean); done;
	@rm -f *.bak *~ *.rem

dist.clean: clobber
	@rm -f *.bak *~ *.rem;
	.remove.sh;

install:
ifeq (${TOPDIR},not_set)
	@echo ""
	@echo "  **********************************************************"
	@echo "  You seem to have forgotton to set the TOPDIR variable in"
	@echo "  in the Make.defs file.  See either the 0-README or the"
	@echo "  Make.defs file for instructions."
	@echo "  **********************************************************"
	@echo ""
	@exit 1
else
	@chmod 755 .*
	.install.sh
endif

install.man:
	.install_man.sh
        
