#
# 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

UIL_LIBRARY=-lUil
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@
uil_library=	@build_lesstif_uil@
motif_xm_library=	@motif_libraries@ ${XM_LIBRARY}
motif_mrm_library=	@motif_libraries@ ${MRM_LIBRARY}
motif_uil_library=	@motif_libraries@ ${UIL_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

install-list::
	for i in ${CLIENTS} ; do \
	  echo ${bin_dir}/$$i ; \
	done

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

${CLIENTS}: ../lib/libltc.a

@client_depend_xm@
@client_depend_mrm@

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

@depend_xm_shared@ ../../../@build_lesstif_xmdir/libXm.a:
	(cd ../../../@build_lesstif_xmdir@ && ${MAKE} all) || exit 1

@depend_mrm_shared@ ../../../@build_lesstif_mrmdir@/libMrm.a:
	(cd ../../../@build_lesstif_mrmdir@ && ${MAKE} all) || exit 1

