#
# Makefile for the GNU LessTif library
#
# 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@
exec_prefix=@exec_prefix@
lib_dir = @libdir@

VPATH = $(srcdir)

x_includes=@x_includes@

major_shared=@major_shared@
minor_shared=@minor_shared@
lib_name=Xm

CC=@CC@
CFLAGS=-I../../include -I$(srcdir)/../../include \
	-I$(srcdir)/../../include/Motif-1.2 ${x_includes} \
	@CFLAGS@
RANLIB=@RANLIB@
AR=@AR@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@

STATIC_LIB = lib${lib_name}.a

SRCS = ArrowB.c \
       ArrowBG.c \
       AtomMgr.c \
       BaseClass.c \
       BulletinBoard.c \
       Cache.c \
       CascadeB.c \
       CascadeBG.c \
       Command.c \
       CutPaste.c \
       DebugUtil.c \
       DefaultProcs.c \
       Desktop.c \
       Dest.c \
       DialogS.c \
       Display.c \
       DragBS.c \
       DragC.c \
       DragDrop.c \
       DragIcon.c \
       DragOverS.c \
       DragUnder.c \
       DrawingArea.c \
       DrawnB.c \
       DropSMgr.c \
       DropTrans.c \
       ExtObject.c \
       FileSB.c \
       FontList.c \
       Form.c \
       Frame.c \
       Gadget.c \
       GadgetUtil.c \
       GeoUtils.c \
       Hash.c \
       ImageCache.c \
       LTEditres.c \
       LTfnmatch.c \
       LTglob.c \
       Label.c \
       LabelG.c \
       List.c \
       MapEvent.c \
       MainW.c \
       Manager.c \
       MenuShell.c \
       MenuUtil.c \
       MessageB.c \
       Messages.c \
       Mwm.c \
       PanedW.c \
       Primitive.c \
       Protocols.c \
       PushB.c \
       PushBG.c \
       ReadImage.c \
       Region.c \
       RepType.c \
       ResConvert.c \
       ResInd.c \
       RowColumn.c \
       Sash.c \
       Scale.c \
       Screen.c \
       ScrollBar.c \
       ScrolledW.c \
       Selection.c \
       SelectionBox.c \
       Separator.c \
       SeparatoG.c \
       Shadow.c \
       ShellExt.c \
       Simple.c \
       TearOff.c \
       TearOffB.c \
       Text.c \
       TextF.c \
       TextIn.c \
       TextOut.c \
       TextStrSo.c \
       ToggleB.c \
       ToggleBG.c \
       TrackLoc.c \
       Traversal.c \
       TravAct.c \
       UniqueEvent.c \
       VaSimple.c \
       Vendor.c \
       VirtKeys.c \
       Visual.c \
       World.c \
       XmString.c \
       XmIm.c \
       XmXpm.c \
       Xmos.c \
       misc.c alloca.c gdb-inline.c

SRCDIR_SRCS=@srcdir_src_pat_subst@
OBJS= @objs_pat_subst@
SH_OBJS= @shobjs_pat_subst@

all::

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

@static_prefix@all:: ${STATIC_LIB}

@static_prefix@install:: ${STATIC_LIB}
@static_prefix@	-mkdir -p ${lib_dir}
@static_prefix@	${INSTALL_DATA} ${STATIC_LIB} ${lib_dir}

@static_prefix@clean::
@static_prefix@	rm -f ${OBJS} ${STATIC_LIB}
clean::
	rm -f *~ core *.bak *.o shared/*.o libXm.* mkinline \
		$(srcdir)/gdb-inline.c

distclean: clean

# Rules for building the static library

@static_prefix@${STATIC_LIB}: ${OBJS}
@static_prefix@	${AR} cr ${STATIC_LIB} ${OBJS}
@static_prefix@	${RANLIB} ${STATIC_LIB}

# Rules for building the shared library

@shared_include@

@shared_rule1@
@shared_rule2@
@shared_rule3@
@shared_rule4@

# for depending

depend: ${SRCDIR_SRCS}
#	makedepend -- ${CFLAGS} -- ${SRCDIR_SRCS} 
	makedepend -a -pshared/ -- ${CFLAGS} -- ${SRCDIR_SRCS}

mkinline:	$(srcdir)/mkinline.c
	${CC} ${CFLAGS} -o $@ $(srcdir)/mkinline.c

$(srcdir)/gdb-inline.c:	inlines.in mkinline
	./mkinline $(srcdir)/inlines.in $(srcdir)/gdb-inline.c
