#
# Makefile for the GNU LessTif support 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 = @exec_prefix@/lib

x_includes=@x_includes@

major_shared=@major_shared@
minor_shared=@minor_shared@
lib_name=ltc

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

STATIC_LIB = lib${lib_name}.a

SRCS = getopt.c getopt1.c

SRCDIR_SRCS=@srcdir_src_pat_subst@
OBJS= getopt.o getopt1.o @LIBOBJS@
SH_OBJS= @shobjs_pat_subst@

all:: $(STATIC_LIB)

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

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

clean::
	rm -f ${OBJS} ${STATIC_LIB} *~ core *.bak 

distclean: clean

# Rules for building the static library

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

# for depending

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

