XCOMM
XCOMM $XConsortium: Imakefile,v 5.25 94/04/17 20:40:34 rws Exp $
XCOMM
XCOMM 
XCOMM Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium
XCOMM 
XCOMM			 All Rights Reserved
XCOMM 
XCOMM Permission to use, copy, modify, and distribute this software and its 
XCOMM documentation for any purpose and without fee is hereby granted, 
XCOMM provided that the above copyright notice appear in all copies and that
XCOMM both that copyright notice and this permission notice appear in 
XCOMM supporting documentation, and that the names of Sun Microsystems
XCOMM and the X Consortium not be used in advertising or publicity 
XCOMM pertaining to distribution of the software without specific, written 
XCOMM prior permission.  
XCOMM 
XCOMM SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
XCOMM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
XCOMM EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
XCOMM CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
XCOMM USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
XCOMM OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
XCOMM PERFORMANCE OF THIS SOFTWARE.

#include <Library.tmpl>

#define IHaveSubdirs
#define PassCDebugFlags

#ifndef PexPhigsCDebugFlags
#define PexPhigsCDebugFlags LibraryCDebugFlags
#endif

  CCOPTIONS = PexCCOptions
CDEBUGFLAGS = PexPhigsCDebugFlags
    DEFINES = PexPhigsDefines

.SUFFIXES: .o

     ARADD = ArAddCmd
     AREXT = ArExtCmd
     LIBDIRS = archive c_binding css cp error input pex util ws ws_type
     SUBDIRS = include $(LIBDIRS) lib

     ALL_OBJ = archive/ar*.o c_binding/cb*.o \
		cp/cp*.o cp/psl.o css/css*.o \
		error/er*.o input/sin*.o pex/pex*.o  util/ut*.o \
		ws/ws*.o ws_type/wstx*.o
     ALL_DONE = archive/DONE c_binding/DONE cp/DONE css/DONE \
		error/DONE input/DONE pex/DONE util/DONE \
		ws/DONE ws_type/DONE

    SWAPDIR = $(SERVERSRC)/PEX5/dipex/swap
    SWAPLIB  = $(SWAPDIR)/libdiswapex.a
   SWAPOBJS  = OCTables.o Convert.o floatconv.o OCattr.o OCcolour.o   \
		cOCprim.o uOCprim.o

    LINTLIBS =

all:: include libphigs.a lib

libphigs.a: $(LIBDIRS) $(ALL_DONE) $(SWAPDIR) $(SWAPLIB)
	$(RM) $@
	$(AREXT) $(SWAPLIB) $(SWAPOBJS)
	$(AR) $@ $(SWAPOBJS)
	$(RM) $(SWAPOBJS)
	$(ARADD) $@ $(ALL_OBJ)
	RanLibrary($@)

MakeLintLibSubdirs(c_binding)
MakeLintSubdirs(c_binding,install.ln,install.ln)

lintlibs:
	-for i in ${SUBDIRS}; do \
	    ( 	echo in $$i; cd $$i; \
		$(MAKE) $(MFLAGS) lintlib  \
	    ); done

lint lint-x: lintlibs
	-for i in ${SUBDIRS}; do \
	    ( 	echo in $$i; cd $$i; \
		$(MAKE) $(MFLAGS) $@  \
	    ); done

ForceSubdirs($(SUBDIRS) $(SWAPDIR))

InstallLibrary(phigs,$(USRLIBDIR))

DependSubdirs($(SUBDIRS))
