#
#  Makefile.prog.in - Makerules for bilding programs
#
#  $Id: Makefile.prog.in,v 1.1.1.2.6.1.2.3 2002/01/22 11:57:53 icastle Exp $
#
#  Copyright (C) 1998 Cees A. de Groot
#
CLEANFILES=-r $(PROG) $(OBJS) core .libs Makefile.lt

top_builddir=@TOP@
LINKFLAGS = @LINKFLAGS@

ALL_LIBS = $(XLIBS) $(LIBS)
Makefile.lt:
	echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt

PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')

all: $(PROG)

$(PROG): $(OBJS) $(COBJS) $(LT_LIBS)
	$(LIBTOOL) --mode=link $(CXX) $(LINKFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LT_LIBS)

install: $(PROG)
	-test -d $(DESTDIR)$(bindir) || \
	  (mkdir $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
	-rm -f $(DESTDIR)$(bindir)/$(PROG)
	$(LIBTOOL) --mode=install $(INSTALL) $(PROG) $(DESTDIR)$(bindir)

depend: depend_src
depend.temp: $(GENSRCS)
gen: $(GENSRCS)
