#
# Makefile - NILFS miscellaneous tools
#
# Copyright (C) 2006 Nippon Telegraph and Telephone Corporation.
#
# This file is part of NILFS.
#
# NILFS 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 of the License, or
# (at your option) any later version.
#
# NILFS 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.
#
# You should have received a copy of the GNU General Public License
# along with NILFS; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# Makefile,v 1.3 2006/02/14 08:24:16 moriai Exp
#
# Written by Ryusuke Konishi <ryusuke@osrg.net>

BINDIR  = /sbin
ETCDIR	= /etc

TARGETS  = seekcp updatecp auto.nilfs.dev
SCRIPTS = seekcp updatecp
AMSCRIPTS = auto.nilfs.dev

SUFFIXES += .pl
%: %.pl
	cat $< >$@
	chmod a+x $@

all: $(TARGETS)

clean:
	rm -f $(TARGETS) $(OBJS) *~

install: all
	install -d $(BINDIR)
	install -m 755 $(SCRIPTS) $(BINDIR)
	install -d $(ETCDIR)
	install -m 755 $(AMSCRIPTS) $(ETCDIR)

uninstall:
	rm -f ${SCRIPTS:%=$(BINDIR)/%}
	rm -f ${AMSCRIPTS:%=$(ETCDIR)/%}

reinstall: uninstall install
