# File: 	Makefile
#
# Description:  The makefile for treeps directory
#		decends into subdirectories and builds libraries,
#		and eventually a treeps executable. The final build
#		directory is platform specific.
#
# Author:	George MacDonald
#
# Copyright:	Copyright (c) 1993, Pulsar Software Inc.
#		All Rights Reserved, Unpublished rights reserved.
#
# History:	George MacDonald	10/10/93	Created
# 		George MacDonald	10/17/98	New Dir Structure
#


SUBDIRS= lib Xpsi list tree Res sysInfoLaunchPad

all clean: config
	@echo "Starting to Build the Program"
	@echo 
	@for i in $(SUBDIRS); do cd $$i; echo Descending into $$i ; make $@ ; cd .. ; done
	@cd `uname`; make $@    		  # Make platform specific files

	@cd `uname`; make -f treeps.mkf $@ # Make the platform specific prog
	touch shiplist

config: 
	@./scripts/localize/buildTimeLocalizations

clobber: rootInstall
	@for i in $(SUBDIRS); do cd $$i; echo Descending into $$i ; make $@ ; cd .. ; done
	@cd `uname`; make $@
	@cd `uname`; make -f treeps.mkf $@ 
	cp makeConfig OmakeConfig
	rm -f makeConfig

# Build for install in /usr/local and X Resources in $HOME

local: localInstall all

personal: homeInstall all 	# Build for install in $HOME

root: rootInstall all 		# Build for root install

localInstall: 
	rm -f scripts/Local/Install
	cd  scripts/Local; ln -s usrLocalInstall Install

homeInstall:
	rm -f scripts/Local/Install
	cd  scripts/Local; ln -s homeInstall Install

rootInstall:
	rm -f scripts/Local/Install

install::
	./Setup
	

manifest: shiplist 
	for i in `cat shiplist`; do ls -l $$i ; done > MANIFEST

# Manually add to shiplist - change later

icon_flist:
	find ./icons -type f | sort > icon_flist

release:: treeps.tar

treeps.tar: manifest
	echo > Install.defaults
	echo > Install.params
	tar cvTf shiplist treeps.tar 


