# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.


SHELL = @SHELL@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
datadir = @datadir@
exec_prefix = @exec_prefix@
includedir = @includedir@
infodir = @infodir@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

@SET_MAKE@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
EXTRACPPFLAGS = -I$(top_srcdir)
DEFS = @DEFS@ -DDEF_LOGFILE=\"$(logfile)\" -DDEF_CONFFILE=\"$(conffile)\" -DDEF_PATH=\"$(mp3path)\" -DDEF_HTMLFILE=\"$(htmlfile)\"
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@
LIBTOOL = $(CC)
INSTALL = @INSTALL@

conffile = $(sysconfdir)/ample.conf
htmlfile = $(sysconfdir)/ample.html
logdir  = $(localstatedir)/log
logfile = $(logdir)/ample.log
mp3path = $(datadir)/mp3

PROGRAMS = ample
SOURCES = ample.c client.c entries.c configuration.c helper.c base64.c
OBJECTS = ample.o client.o entries.o configuration.o helper.o base64.o
COMPILE = $(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRACPPFLAGS) $(DEFS)
LINK = $(LIBTOOL) $(LDFLAGS)

all: ample

ample: $(OBJECTS)
	$(LINK) $(OBJECTS) $(LIBS) -o $@

.c.o: 
	$(COMPILE) -c $<

install:
	@$(INSTALL) -d $(bindir)
	@for i in $(PROGRAMS); do \
	  echo "Installing $$i ..."; \
	  $(INSTALL) -s $$i $(bindir); \
	done
	@$(INSTALL) -d $(logdir)

uninstall:
	@for i in $(PROGRAMS); do \
	  echo "Removing $$i ..."; \
	  rm -f $(bindir)/$$i; \
	done

clean:
	rm -f *.o $(PROGRAMS)

maint-clean:
	rm -f *.o *~ Makefile ample

dist-clean:
	rm -f *.o *~ Makefile ample
	rm -rf CVS

.PHONY: all install clean maint-clean dist-clean

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
