# Makefile to build libraries. 
# Makefile,v 1.15 1994/08/17 20:41:13 fxmlk Exp
# 

# 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_LIBDLD		- have the dld library (for objc-load and NXBundle)
# HAVE_LIBTIFF		- use Sam Leffler's tiff library
#				(for NXBitmapImageRep)
# HAVE_LIBTIFF_3_0	- have older 3.0a version of Sam Leffler's tiff library
#				(with patches for streams)
#				requires HAVE_LIBTIFF as well
# MOTIF12		- have Motif version 1.2
# ALWAYS_MWM		- Skip check for IsMotifWMRunning() since co-Xist fails
#
DEFINES = -DX11R5 -DMOTIF12
#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.
 

