#
# Makefile for the GNU LessTif clients
#
# 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.
#

.SUFFIXES: .motif

MRM_LIBRARY=-lMrm
XM_LIBRARY=-lXm
XT_LIBRARY=-lXt
X_LIBRARY=-lX11
R6_LIBS=@R6libs@

prefix=@prefix@
exec_prefix=@exec_prefix@
bin_dir=@bindir@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@

x_libraries=		@x_libraries@ ${XT_LIBRARY} ${X_LIBRARY} ${R6_LIBS}
xm_library=	@build_lesstif_xm@
mrm_library=	@build_lesstif_mrm@
motif_xm_library=	@motif_libraries@ ${XM_LIBRARY}
motif_mrm_library=	@motif_libraries@ ${MRM_LIBRARY}

SRCDIR_SRCS=@srcdir_src_pat_subst@

all:: $(CLIENTS)

@obj_rule1@
@obj_rule2@
@obj_rule3@
@obj_rule4@

motif-clients: $(MOTIFCLIENTS)

install: $(CLIENTS)
	-mkdir -p ${bin_dir}
	for i in ${CLIENTS} ; do \
	  ${INSTALL_PROGRAM} $$i ${bin_dir} ; \
	done

depend: ${SRCDIR_SRCS}
	makedepend -- ${CFLAGS} -- ${SRCDIR_SRCS}

${CLIENTS}: ../libltc.a

@client_depend_xm@
@client_depend_mrm@

../libltc.a:
	(cd ../lib && ${MAKE}) || exit 1

@depend_xm_shared@ ../../../lib/Xm/libXm.a::
	(cd ../../../lib/Xm && ${MAKE} $(@:../../../lib/Xm/%=%)) || exit 1

@depend_mrm_shared@ ../../../lib/Mrm/libMrm.a::
	(cd ../../../lib/Mrm && ${MAKE} $(@:../../../lib/Mrm/%=%)) || exit 1

