#
# Makefile for the GNU LessTif lib/Xm tests
#
# 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

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

x_includes=             @x_includes@
x_libraries=		@x_libraries@ ${XT_LIBRARY} ${X_LIBRARY} ${R6_LIBS}
lesstif_libraries=	@build_lesstif_xm@ ${AUX_LIBS}
motif_libraries=	@motif_libraries@ ${XM_LIBRARY} ${AUX_LIBS}

CC=@CC@ ${EXTRA_DEFINES}
CFLAGS=-I../../../include -I$(srcdir)/../../../include/Motif@include_version_suffix@ \
	${x_includes} @test_cflags@

SRCDIR_SRCS=@srcdir_src_pat_subst@

start::	@depend_xm_shared@

start::	all

all:: ${TESTS}

motif-tests: ${MOTIFTESTS}

install:

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

clean:
	rm -f $(OBJS) $(AUX_OBJS) $(TESTS) $(MOTIFTESTS) *~ core *.bak *.BAK

.o:
	${CC} -o ${@} ${AUX_OBJS} $< ${lesstif_libraries} ${x_libraries} ${AUX_LIBS} -lm

.o.motif:
	${CC} -o ${@} ${AUX_OBJS} $< ${motif_libraries} ${x_libraries} ${AUX_LIBS} -lm

@test_depend_xm@

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

.NO_TESTS_YET:
	@touch .NO_TESTS_YET

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

@freebsd20_testhack1@
@freebsd20_testhack2@
@freebsd20_testhack3@
@freebsd20_testhack4@
@freebsd20_testhack5@
@freebsd20_testhack6@
@freebsd20_testhack7@
@freebsd20_testhack8@

