#
# Makefile  -  makefile for netboot systems database maintenance utility
#
# Copyright (C) 2006-2007 Gero Kuhlmann   <gero@gkminix.han.de>
#
#  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 of the License, or
#  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.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.3 2007/02/01 18:42:10 gkminix Exp $
#


# Directory name of this module
MODNAME   = dbtool


# Include makefile configuration
include ../make.config
include ../make.rules


# MANEXT is the manual section number
MANEXT    = 8


# Subdirectories
SUBDIRS   =


# Module-specific compiler flags
CMODFLAGS =


# Source and object files for the host system
SRCS      = main.c
OBJS      = $(SRCS:.c=.o)
TARGET    = nbdbtool


# Rules to make the target
all:		$(TARGET)

$(TARGET):	$(LIBTOOL) $(OBJS) $(LIBNBA)
		@$(LIBTOOL) --mode=link \
		  $(CC) -o nbdbtool $(LDFLAGS) $(OBJS) $(LIBS)


# distrib generates all files which are not removed by distclean
distrib:

install:	$(LIBTOOL) all
		$(INSTALL) -d $(DESTDIR)$(mandir)/man$(MANEXT)
		$(INSTALL) -d $(DESTDIR)$(bindir)
		@$(LIBTOOL) --mode=install \
		  $(INSTALL_PROGRAM) nbdbtool $(DESTDIR)$(bindir)/$(TARGET)
		$(INSTALL_DATA) nbdbtool.man $(DESTDIR)$(mandir)/man$(MANEXT)/$(TARGET).$(MANEXT)


clean:			clean-local clean-recursive

clean-local:		clean-general


distclean:		distclean-local distclean-recursive

distclean-local:	clean-local


realclean:		realclean-local realclean-recursive

realclean-local:	distclean-local

