# Makefile to build libraries. 
# 

# Location of this directory (relative to our subdirectory)
OSDIR = ..

#
# Define the following if desired.  These should override the definitions
# in any of the subdirectories compiled using this makefile.
#
# X11R5         - have release 5 version of the header files
# HAVE_LIBTIFF  - have Sam Leffler's tiff library (with patches for streams)
# HAVE_LIBDLD   - have the dld library (for objc-load and NXBundle)
#
DEFINES = -DX11R5
#DEFINES = -DHAVE_LIBTIFF

#
# You might have to insert some extra stuff for the compiler to find
# include files for the above libraries if they are not in a standard
# path (like /usr/local/include)
#
DLD_INCLUDE = -I$(OSDIR)/.. 
TIFF_INCLUDE = -I$(OSDIR)/../tiff/libtiff
#OTHER_CFLAGS =  $(DLD_INCLUDE) $(TIFF_INCLUDE)

#--------------------------- end of configuration ----------------------------

all: onetime alllibs

onetime: 
	cd coll; $(MAKE) copy-headers;

lib:
	cd appkit; $(MAKE) all

alllibs: onetime
	cd coll; $(MAKE) all
	cd objc; $(MAKE) all
	cd objc2; $(MAKE) all DEFINES=${DEFINES}
	cd streams; $(MAKE) all DEFINES=${DEFINES}
	cd appkit; $(MAKE) all DEFINES=${DEFINES}

clean:
	rm -f libcoll.a libobjc.a libobjcX.a
	cd appkit; $(MAKE) clean
	cd coll; $(MAKE) clean
	cd objc; $(MAKE) clean
# no clean target in objc2
	
# DO NOT DELETE THIS LINE -- make depend depends on it.
