# This is no longer generated by Imake
# $Header: /build/srclib/X11/RCS/Makefile,v 1.13 91/01/27 23:21:19 afuller Exp [Makefile,v 1.1.1.3 92/10/15 11:12:31 rspinney Exp ]$
#
# Warning: the cpp used on this machine replaces
# all newlines and multiple tabs/spaces in a macro
# expansion with a single space.  Imake tries to
# compensate for this, but is not always
# successful.
#

#
#                         WARNING to imake users
#
# This makefile is generated automatically by the imake program.  Do not
# modify it or you will lose your changes the next time imake is run.  Read
# the INSTALLATION GUIDE and look at the Imake.tmpl and *.macros files in
# the directory ./util/imake.includes/ if you need to change any of the
# configuration parameters.
#
# You may ignore this message if you are not using imake.
#

            TOP = ../.
BOOTSTRAPCFLAGS =
             AS = as
             CC = cc
            CPP = /lib/cpp
             LD = ld
           LINT = lint
        INSTALL = install
           TAGS = ctags
             RM = rm -f
             MV = mv
             LN = ln -s
         RANLIB = ranlib
             AR = ar clq
             LS = ls
       LINTOPTS = -axz
    LINTLIBFLAG = -C
           MAKE = make
    STD_DEFINES =
    CDEBUGFLAGS = -O
        DESTDIR =

        PATHSEP = /
         DEPEND = $(DEPENDSRC)/makedepend
          IMAKE = $(IMAKESRC)/imake
            RGB = $(RGBSRC)/rgb
         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
      LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
   INSTUIDFLAGS = -m 4755
   INSTLIBFLAGS = -m 0664
   INSTINCFLAGS = -m 0444
   INSTMANFLAGS = -m 0444
   INSTAPPFLAGS = -m 0444

      USRLIBDIR = $(DESTDIR)/usr/lib
         BINDIR = $(DESTDIR)$(INSTALLDIR)
         LIBDIR = $(USRLIBDIR)/X11
     LINTLIBDIR = $(USRLIBDIR)/lint
         INCDIR = $(DESTDIR)/usr/include/X11
        FONTDIR = $(LIBDIR)/fonts
         UWMDIR = $(LIBDIR)/uwm
         AWMDIR = $(LIBDIR)/awm
        MANPATH = $(DESTDIR)/usr/man
         MANDIR = $(MANPATH)/mann
      LIBMANDIR = $(MANPATH)/man3
    XAPPLOADDIR = $(LIBDIR)/app-defaults
         ADMDIR = $(DESTDIR)/usr/adm

      CLIENTSRC = $(TOP)/clients
        DEMOSRC = $(TOP)/demos
         LIBSRC = $(TOP)/lib
        FONTSRC = $(TOP)/fonts
     INCLUDESRC = $(TOP)/X11
      SERVERSRC = $(TOP)/server
        UTILSRC = $(TOP)/util
     EXAMPLESRC = $(TOP)/examples
     CONTRIBSRC = $(TOP)/contrib
         DOCSRC = $(TOP)/doc
      DEPENDSRC = $(UTILSRC)/makedepend
       IMAKESRC = $(UTILSRC)/imake
       IRULESRC = $(UTILSRC)/imake.includes
         RGBSRC = $(UTILSRC)/rgb
        XLIBSRC = $(LIBSRC)/X
         XMUSRC = $(LIBSRC)/Xmu
     TOOLKITSRC = $(LIBSRC)/Xt
     AWIDGETSRC = $(LIBSRC)/Xaw
     OLDXLIBSRC = $(LIBSRC)/oldX
   EXTENSIONSRC = $(TOP)/extensions
        XMANSRC = $(DOCSRC)/Xlib/Xman
   EXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a
           XLIB = $(XLIBSRC)/libX11.a
         XMULIB = $(XMUSRC)/libXmu.a
        OLDXLIB = $(OLDXLIBSRC)/liboldX.a
       XTOOLLIB = $(TOOLKITSRC)/libXt.a
         XAWLIB = $(AWIDGETSRC)/libXaw.a
       LINTXLIB = $(XLIBSRC)/llib-lX11.ln
        LINTXMU = $(XMUSRC)/llib-lXmu.ln
      LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln
        LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln
       INCLUDES = -I$(TOP)
      MACROFILE = Sun.macros
      IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl \
			-I$(NEWTOP)$(IRULESRC) \
			-s Makefile
         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			.emacs_* tags TAGS make.log MakeOut

EXPORTS = \
	decwcursor.h \
	X.h \
	XWDFile.h \
	Xatom.h \
	Xmd.h \
	Xlib.h \
	Xos.h \
	Xproto.h \
	Xprotostr.h \
	Xutil.h \
	copyright.h \
	descrip.h \
	keysym.h \
	keysymdef.h \
	DECkeysym.h \
	JUSkeysym.h \
	DwtXlatArg.uil \
	DwtXlatText.uil \
	cursorfont.h


IMPORTS1 = \
	$(OLDXLIBSRC)/X10.h \
	$(XLIBSRC)/Xlib.h \
	$(XLIBSRC)/Xlibos.h \
	$(XLIBSRC)/X.h \
	$(XLIBSRC)/Xresource.h \
	$(XLIBSRC)/Xutil.h \
	$(XMUSRC)/Xmu.h \
	$(FONTSRC)/include/cursorfont.h \
	$(TOOLKITSRC)/CompObjP.h \
	$(TOOLKITSRC)/CompObj.h \
	$(TOOLKITSRC)/Composite.h \
	$(TOOLKITSRC)/CompositeP.h \
	$(TOOLKITSRC)/Constraint.h \
	$(TOOLKITSRC)/ConstrainP.h \
	$(TOOLKITSRC)/Core.h \
	$(TOOLKITSRC)/CoreP.h \
	$(TOOLKITSRC)/Intrinsic.h \
	$(TOOLKITSRC)/IntrinsicP.h \
	$(TOOLKITSRC)/Object.h \
	$(TOOLKITSRC)/ObjectP.h \
	$(TOOLKITSRC)/Quarks.h \
	$(TOOLKITSRC)/RectObj.h \
	$(TOOLKITSRC)/RectObjP.h \
	$(TOOLKITSRC)/Selection.h \
	$(TOOLKITSRC)/Shell.h \
	$(TOOLKITSRC)/ShellP.h \
	$(TOOLKITSRC)/StringDefs.h \
	$(TOOLKITSRC)/Vendor.h \
	$(TOOLKITSRC)/VendorP.h \
	$(TOOLKITSRC)/WindowObj.h \
	$(TOOLKITSRC)/WindowObjP.h

IMPORTS2 = \
	$(AWIDGETSRC)/AsciiText.h \
	$(AWIDGETSRC)/AsciiTextP.h \
	$(AWIDGETSRC)/Box.h \
	$(AWIDGETSRC)/BoxP.h \
	$(AWIDGETSRC)/Cardinals.h \
	$(AWIDGETSRC)/Clock.h \
	$(AWIDGETSRC)/ClockP.h \
	$(AWIDGETSRC)/Command.h \
	$(AWIDGETSRC)/CommandP.h \
	$(AWIDGETSRC)/Dialog.h \
	$(AWIDGETSRC)/DialogP.h \
	$(AWIDGETSRC)/Form.h \
	$(AWIDGETSRC)/FormP.h \
	$(AWIDGETSRC)/Grip.h \
	$(AWIDGETSRC)/GripP.h \
	$(AWIDGETSRC)/Label.h \
	$(AWIDGETSRC)/LabelP.h \
	$(AWIDGETSRC)/List.h \
	$(AWIDGETSRC)/ListP.h \
	$(AWIDGETSRC)/Load.h \
	$(AWIDGETSRC)/LoadP.h \
	$(AWIDGETSRC)/Logo.h \
	$(AWIDGETSRC)/LogoP.h \
	$(AWIDGETSRC)/Mailbox.h \
	$(AWIDGETSRC)/MailboxP.h \
	$(AWIDGETSRC)/Scroll.h \
	$(AWIDGETSRC)/ScrollP.h \
	$(AWIDGETSRC)/Simple.h \
	$(AWIDGETSRC)/SimpleP.h \
	$(AWIDGETSRC)/Text.h \
	$(AWIDGETSRC)/TextP.h \
	$(AWIDGETSRC)/VPaned.h \
	$(AWIDGETSRC)/VPanedP.h \
	$(AWIDGETSRC)/Viewport.h \
	$(AWIDGETSRC)/ViewportP.h \
	$(AWIDGETSRC)/XawMisc.h

IMPORTS = $(IMPORTS1) $(IMPORTS2)

SUBIMPORTS = \
	$(EXTENSIONSRC)/include/zoid.h \
	$(EXTENSIONSRC)/include/bezier.h \
	$(EXTENSIONSRC)/include/plxvideo.h \
	$(EXTENSIONSRC)/include/xtestext1.h


MIT_HEADERS = \
	AsciiText.h \
	AsciiTextP.h \
	Box.h \
	BoxP.h \
	Cardinals.h \
	Clock.h \
	ClockP.h \
	Command.h \
	CommandP.h \
	CompObj.h \
	CompObjP.h \
	Composite.h \
	CompositeP.h \
	ConstrainP.h \
	Constraint.h \
	Core.h \
	CoreP.h \
	DECkeysym.h \
	Dialog.h \
	DialogP.h \
	Form.h \
	FormP.h \
	Grip.h \
	GripP.h \
	Intrinsic.h \
	IntrinsicP.h \
	Label.h \
	LabelP.h \
	List.h \
	ListP.h \
	Load.h \
	LoadP.h \
	Logo.h \
	LogoP.h \
	Mailbox.h \
	MailboxP.h \
	Object.h \
	ObjectP.h \
	Quarks.h \
	RectObj.h \
	RectObjP.h \
	Scroll.h \
	ScrollP.h \
	Selection.h \
	Shell.h \
	ShellP.h \
	Simple.h \
	SimpleP.h \
	StringDefs.h \
	Text.h \
	TextP.h \
	VPaned.h \
	VPanedP.h \
	Vendor.h \
	VendorP.h \
	Viewport.h \
	ViewportP.h \
	WindowObj.h \
	WindowObjP.h \
	X.h \
	XWDFile.h \
	Xatom.h \
	Xmd.h \
	Xos.h \
	Xproto.h \
	Xprotostr.h \
	copyright.h \
	keysym.h 

INSTALLFLAGS = $(INSTINCFLAGS)

all: $(IMPORTS1) $(IMPORTS2) $(SUBIMPORTS) extensions
	@-(list=`echo $(IMPORTS1) | sed -e 's/[^ ]*\///g'`; $(RM) $$list)
	$(LN) $(IMPORTS1) .
	@-(list=`echo $(IMPORTS2) | sed -e 's/[^ ]*\///g'`; $(RM) $$list)
	$(LN) $(IMPORTS2) .
	@-(list=`echo $(SUBIMPORTS) | sed -e 's/[^ ]*\///g'`; \
		cd extensions; $(RM) $$list)
	@for i in $(SUBIMPORTS); do \
		(cd extensions; $(LN) ../$$i .); \
	done

extensions:
	-mkdir $@

install:: all
	@-( cd .. ; ln -s X11 include )

# this is done here only because we don't control lib/dwt
install:: kit_links

kit_links:
	-(cd $(INCDIR); $(RM) DECwDwtApplProg.h; ln -s DwtAppl.h DECwDwtApplProg.h)
	-(cd $(INCDIR); $(RM) DECwDwtWidgetProg.h; ln -s DwtWidget.h DECwDwtWidgetProg.h)

install:: $(EXPORTS)
	@case '${MFLAGS}' in *[i]*) set +e;; esac; \
	for i in $(EXPORTS); do \
	(set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(INCDIR)); \
	done

install:: $(MIT_HEADERS)
	(for i in $(MIT_HEADERS) ; do \
	$(INSTALL) -c $(INSTALLFLAGS) $$i $(DESTDIR)/usr/include/mit/X11; \
	done)

clean::
	@-(list=`echo $(IMPORTS1) | sed -e 's/[^ ]*\///g'`; set -x; $(RM) $$list)
	@-(list=`echo $(IMPORTS2) | sed -e 's/[^ ]*\///g'`; set -x; $(RM) $$list)
	@-(list=`echo $(SUBIMPORTS) | sed -e 's/[^ ]*\///g'`; \
		set -x; cd extensions; $(RM) $$list)

depend:
	@echo "depend: skipping X11"

clean::
	$(RM_CMD) \#*

Makefile:: $(IMAKE)

Makefile:: Imakefile \
	$(IRULESRC)/Imake.tmpl \
	$(IRULESRC)/Imake.rules \
	$(IRULESRC)/$(MACROFILE)
	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
	$(IMAKE_CMD) -DTOPDIR=$(TOP)

$(IMAKE):
	@echo "making $(IMAKESRC)"; \
	cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

install::
	@echo "install done"

Makefiles::

