#	$Id: Makefile.in,v 1.1 1999/11/03 05:00:13 lha Exp $

SHELL		= /bin/sh

srcdir		= @srcdir@
VPATH		= @srcdir@

CC		= @CC@
RM		= rm

INSTALL		= @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
MKINSTALLDIRS 	= @top_srcdir@/mkinstalldirs

prefix 		= @prefix@
exec_prefix 	= @exec_prefix@
libdir 		= @libdir@
libexecdir 	= @libexecdir@
bindir 		= @bindir@
sbindir 	= @sbindir@
transform	= @program_transform_name@

PROGS		= boot-strap.sh anti-boot-strap.sh

all:	$(PROGS)

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -I../../../include -I$(srcdir)/../../../include $<

clean:
	$(RM) -f $(PROGS) startarla *.o *~

boot-strap.sh: boot-strap.sh.in
	cd ../../.. ; CONFIG_FILES=milko/appl/bootstrap/boot-strap.sh CONFIG_HEADERS= $(SHELL) config.status
	chmod +x $@
anti-boot-strap.sh: anti-boot-strap.sh.in
	cd ../../.. ; CONFIG_FILES=milko/appl/bootstrap/anti-boot-strap.sh CONFIG_HEADERS= $(SHELL) config.status
	chmod +x $@

Makefile: Makefile.in ../../../config.status
	cd ../../.. ; CONFIG_FILES=milko/appl/bootstrap/Makefile CONFIG_HEADERS= $(SHELL) config.status


install: all
	$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
	PROG_SBIN='$(PROGS)'; for x in $$PROG_SBIN; do \
	  f=`echo $$x | sed '$(transform)'`; \
	  $(INSTALL_PROGRAM) $$x $(DESTDIR)$(sbindir)/$$f; \
	done

uninstall:
	PROG_SBIN='$(PROGS)'; for x in $$PROG_SBIN; do \
	  f=`echo $$x | sed '$(transform)'`; \
	  rm -f $(DESTDIR)$(sbindir)/$$f; \
	done

.PHONY: all install uninstall clean
