#
# Makefile for the GNU LessTif library (include/Xm-2.0 directory)
#
# Copyright (C) 1995 Free Software Foundation, Inc.
#
# This file is part of the GNU LessTif Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

srcdir=@srcdir@
prefix=@prefix@
includedir = @exec_prefix@/include
header_dir=$(includedir)/Xm

INSTALL=	@INSTALL@
INSTALL_DATA=	@INSTALL_DATA@

all::	links

install:
	-mkdir -p ${header_dir}
	@for i in ${SRCS12} ${EXTRA12} ${SRCS_2_0}; do \
		@INSTALL_DATA@ $(srcdir)/$$i ${header_dir} ; \
        done

install-list:
	@for i in ${SRCS12} ${EXTRA12} ${SRCS_2_0}; do \
		echo ${header_dir}/$$i ; \
        done

clean::	cleanlinks

distclean: clean
	rm -f LTconfig.h

#
# These files from the 1.2 compliant version of LessTif can be used for the
# 2.0 compliant version as well.
#
SRCS12 = \
	ArrowB.h \
	ArrowBG.h \
	ArrowBGP.h \
	ArrowBP.h \
	AtomMgr.h \
	BaseClassP.h \
	BulletinB.h \
	BulletinBP.h \
	CacheP.h \
	CascadeB.h \
	CascadeBG.h \
	CascadeBGP.h \
	CascadeBP.h \
	Command.h \
	CommandP.h \
	CutPaste.h \
	CutPasteP.h \
	DesktopP.h \
	DialogS.h \
	DialogSEP.h \
	DialogSP.h \
	Display.h \
	DisplayP.h \
	DragC.h \
	DragCP.h \
	DragDrop.h \
	DragIcon.h \
	DragIconP.h \
	DragOverS.h \
	DragOverSP.h \
	DrawP.h \
	DrawingA.h \
	DrawingAP.h \
	DrawnB.h \
	DrawnBP.h \
	DropSMgr.h \
	DropSMgrP.h \
	DropTrans.h \
	DropTransP.h \
	ExtObjectP.h \
	FileSB.h \
	FileSBP.h \
	Form.h \
	FormP.h \
	Frame.h \
	FrameP.h \
	GadgetP.h \
	Label.h \
	LabelG.h \
	LabelGP.h \
	LabelP.h \
	List.h \
	ListP.h \
	MainW.h \
	MainWP.h \
	ManagerP.h \
	MenuShell.h \
	MenuShellP.h \
	MenuUtilP.h \
	MessageB.h \
	MessageBP.h \
	MwmUtil.h \
	PanedW.h \
	PanedWP.h \
	PrimitiveP.h \
	Protocols.h \
	ProtocolsP.h \
	PushB.h \
	PushBG.h \
	PushBGP.h \
	PushBP.h \
	RCUtilsP.h \
	RepType.h \
	RowColumn.h \
	RowColumnP.h \
	SashP.h \
	Scale.h \
	ScaleP.h \
	Screen.h \
	ScreenP.h \
	ScrollBar.h \
	ScrollBarP.h \
	ScrolledW.h \
	ScrolledWP.h \
	SelectioB.h \
	SelectioBP.h \
	SeparatoG.h \
	SeparatoGP.h \
	Separator.h \
	SeparatorP.h \
	ShellEP.h \
	TearOffBP.h \
	TearOffP.h \
	Text.h \
	TextF.h \
	TextFP.h \
	TextFSelP.h \
	TextInP.h \
	TextOutP.h \
	TextP.h \
	TextSelP.h \
	TextStrSoP.h \
	ToggleB.h \
	ToggleBG.h \
	ToggleBGP.h \
	ToggleBP.h \
	VaSimpleP.h \
	VendorS.h \
	VendorSEP.h \
	VendorSP.h \
	VirtKeys.h \
	VirtKeysP.h \
	WorldP.h \
	XmAll.h \
	XmosP.h

EXTRA12 =

#
# These are the files specific to the 2.0 compliant version of LessTif.
#
SRCS_2_0 = \
	AccTextT.h \
	ComboBox.h \
	ComboBoxP.h \
	Container.h \
	CSText.h \
	Gadget.h \
	GrabShell.h \
	GrabShellP.h \
	IconG.h \
	LTconfig.h \
	Manager.h \
	Notebook.h \
	Primitive.h \
	SpinB.h \
	SpinBP.h \
	TraitP.h \
	Transfer.h \
	TransltnsP.h \
	XmStrDefs.h \
	Xm.h \
	XmP.h

SRCS   = ${SRCS12} ${SRCS_2_0}

OSRCS12= ${SRCS12:%=$(srcdir)/../../Motif-1.2/Xm/%}

links:
	@for i in ${SRCS12} ${EXTRA12}; do \
	  if [ ! -r $(srcdir)/$$i ]; then \
	    ln -s $(srcdir)/../../Motif-1.2/Xm/$$i $(srcdir) ;\
	  fi ;\
        done

cleanlinks::
	@for i in ${SRCS12} ${EXTRA12}; do \
	  rm -f $(srcdir)/$$i ;\
        done
