#
#  Makefile for the Gatherer management and configuration software
#
#  Makefile.in,v 1.18 1995/08/21 20:26:51 duane Exp
#
prefix = @prefix@
INSTALL_BINDIR	= $(prefix)/bin
INSTALL_LIBDIR	= $(prefix)/lib
INSTALL_MANDIR 	= $(prefix)/man

CC		= @CC@
INSTALL		= @INSTALL@
INSTALL_BIN 	= @INSTALL_PROGRAM@
INSTALL_FILE 	= @INSTALL_DATA@
RANLIB		= @RANLIB@
XTRA_LIBS	= @XTRA_LIBS@

DEBUG		= $(DEBUG_TOP) #-O #-g #-DDEBUG
DEBUG_LDFLAGS	=
DEBUG_LIBS	= 
INCLUDE		= -I../../common/include 
CFLAGS		= $(DEBUG) $(INCLUDE)
LIBDIR		= ../../common/lib
LDFLAGS		= -L$(LIBDIR) 
LIBS		= -lutil $(DEBUG_LIBS) $(XTRA_LIBS)
PROGS		= prepurls
SCRIPTS		= Gatherer

all:		$(PROGS)

clean:
	-rm -f core *.o $(PROGS) tags

realclean:	clean
	-rm -f Makefile

install:	all install-bin install-script

install-bin:	$(PROGS)
	@for f in $(PROGS); do \
		echo $(INSTALL_BIN) $$f $(INSTALL_LIBDIR)/gatherer; \
		$(INSTALL_BIN) $$f $(INSTALL_LIBDIR)/gatherer; \
	done

install-script:	$(SCRIPTS)
	@for f in $(SCRIPTS); do \
		echo $(INSTALL_BIN) $$f $(INSTALL_BINDIR); \
		$(INSTALL_BIN) $$f $(INSTALL_BINDIR); \
	done

prepurls:   prepurls.o
	$(CC) -o $@ $@.o $(LDFLAGS) $(LIBS)
