#
# Makefile for the GNU LessTif libMrm 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@

x_includes=@x_includes@

major_shared=@major_shared@
minor_shared=@minor_shared@
lib_name=Mrm

CC=@CC@
CFLAGS=-I../../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 = Mrm.c lookup.c misc.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 

distclean: clean

# Rules for building the static library

${STATIC_LIB}: ${OBJS}
	${AR} cr ${STATIC_LIB} ${OBJS}
	${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}
