# Makefile for ORT
# Created by AE @ ICST 14-11-90
VERSION = 2.3

# May need to modify these:
# Uncomment these two lines to use gcc (NOT version 1.39 of gcc which has a BUG)
#CC	= gcc
#CFLAGS = -traditional -finline-functions

# May need to modify these:
# If you decided to use gcc comment these two lines out
CC	= cc
CFLAGS= 
# If you trust the Dec optimiser
#CFLAGS= -O -Olimit 2000
# If you trust the Sun,HP, or SGI optimiser
#CFLAGS= -O

# May need to modify these:
# Only if your C libraries are not all in /usr/lib
#OTHERLIB=/usr/lang/SC1.0
OTHERLIB=.

# You will most likely NEED to modify this:
# This is the root of your X11 tree where the lib and include directories are.
X11DIR= /usr/pd/X11R5

#--------------------- NO NEED TO MODIFY BELOW THIS LINE----------------------#

LSTDIR  = Liste
CHNDIR  = Chain
FEXDIR  = FEX
LPGDIR  = LPEG
IPGDIR  = IPEG
DSPDIR  = DisplayGrps
BINDIR  = Bins
LIBDIR	 = Libs

all:
	(cd $(LSTDIR)/src ; make -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)")
	(cd $(LPGDIR) ; make -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" OTHERLIB="$(OTHERLIB)")
	(cd $(FEXDIR) ; make -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" OTHERLIB="$(OTHERLIB)")
	(cd $(IPGDIR) ; make -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" OTHERLIB="$(OTHERLIB)")
	(cd $(CHNDIR) ; make -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" OTHERLIB="$(OTHERLIB)")
	(cd $(DSPDIR)/exe ; make -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" OTHERLIB="$(OTHERLIB)" X11DIR="$(X11DIR)")

clean:
	-(find . -name '*~*' -print -exec /bin/rm -fr {} \;)

superclean:
	-(find . -name '*~*' -print -exec /bin/rm -fr {} \;)
	-(find . -name '*.o' -print -exec /bin/rm -fr {} \;)

ultraclean:
	-(find . -name '*~*' -print -exec /bin/rm -fr {} \;)
	-(find . -name '*.o' -print -exec /bin/rm -fr {} \;)
	-(cd $(BINDIR) ; /bin/rm *)
	-(cd $(LIBDIR) ; /bin/rm *)

tar:
	(cd ..; tar -cvf ORT-$(VERSION).tar ORT)

uue:
	(cd ..; tar -cvf ORT-$(VERSION).tar ORT; \
	compress ORT-$(VERSION).tar; \
	uuencode ORT-$(VERSION).tar.Z ORT-$(VERSION).tar.Z > ORT-$(VERSION).uue)


manifest:
	ls -R > MANIFEST
