#
# Makefile - for NILFS tool newfs (mkfs.nilfs)
#
# Copyright (C) 2005, 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.18 2006/02/08 02:01:33 amagai Exp
#
# Written by Hisashi Hifumi, modified by Seiji Kihara
#

BINDIR	= /sbin
TARGET	= mkfs.nilfs
OBJS	= newfs.o crc.o

CC	= gcc
CFLAGS	= -Wall -g -O
LIB	= -luuid

all: $(TARGET)

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

newfs.o: newfs.c newfs.h ../fs/nilfs_fs.h

#crc.o: crc.c

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

install: $(TARGET)
	install -m 755 $(TARGET) $(BINDIR)

uninstall:
	rm -f $(BINDIR)/$(TARGET)

reinstall: uninstall install

TAGS:
	etags *.h *.c

.PHONY: TAGS
