# Makefile.in for whoisRIP.c

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program 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 General Public License for more details.


PRODUCT = @PRODUCT@
VERSION = @VERSION@

SHELL = /bin/sh
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

.SUFFIXES:
.SUFFIXES: .c .o

OPT=-g -O

AR = ar
AR_FLAGS = rc
RANLIB = @RANLIB@

CC = @CC@
DEFINES = @DEFS@
CFLAGS = -I. @CFLAGS@ $(DEFINES)
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(prefix)/lib
infodir = $(prefix)/info

DISTFILES = README whoisRIP.c Makefile.in configure.in configure \
mkinstalldirs install-sh

TARGET=whoisRIP
SOURCES=whoisRIP.c
OBJS=whoisRIP.o
LIB_OBJS=

# Global target
all: $(TARGET)

install: all
	$(top_srcdir)/mkinstalldirs $(bindir)
	$(INSTALL) $(TARGET) $(bindir)/$(TARGET)

uninstall:
	/bin/rm -f $(bindir)/$(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)

clean:
	/bin/rm -f core *.o $(OBJS) $(LIB_OBJS) $(TARGET)

distclean: clean
	/bin/rm -f Makefile config.h config.status config.cache config.log

mostlyclean: clean

maintainer-clean: clean

# automatic re-running of configure if the configure.in file has changed
${srcdir}/configure: configure.in 
	cd ${srcdir} && autoconf

# autoheader might not change config.h.in, so touch a stamp file
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.in 
		cd ${srcdir} && autoheader
		echo timestamp > ${srcdir}/stamp-h.in

config.h: stamp-h
stamp-h: config.h.in config.status
	./config.status
Makefile: Makefile.in config.status
	./config.status
config.status: configure
	./config.status --recheck


# Distribution: you need gtar for that

dist: $(DISTFILES)
	rm -rf $(PRODUCT)-$(VERSION)
	mkdir $(PRODUCT)-$(VERSION)
	chmod 777 $(PRODUCT)-$(VERSION)
	@echo "Copying distribution files"
	@for file in $(DISTFILES); do \
	  ln $(srcdir)/$$file $(PRODUCT)-$(VERSION) 2> /dev/null \
	    || cp -p $(srcdir)/$$file $(PRODUCT)-$(VERSION); \
	done
	chmod -R a+r $(PRODUCT)-$(VERSION)
	gtar chozf $(PRODUCT)-$(VERSION).tar.gz $(PRODUCT)-$(VERSION)
	rm -rf $(PRODUCT)-$(VERSION)

