blob: 9a0abc808a57382070b559a2c57bc1e6c35ed39c [file] [log] [blame]
## -----------------------------------------------------------------------
##
## Copyright 2005-2009 H. Peter Anvin - All Rights Reserved
##
## 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, Inc., 675 Mass Ave, Cambridge MA 02139,
## USA; either version 2 of the License, or (at your option) any later
## version; incorporated herein by reference.
##
## -----------------------------------------------------------------------
##
## Makefile for fatattr
##
-include MCONFIG
include MRULES
PROGS = fatattr
MAN1PAGES = fatattr.1
OBJS = fatattr.o
all: $(PROGS)
spec: fatattr.spec
clean:
rm -f *.o *.i *.s version.h $(PROGS)
distclean: clean
rm -f MCONFIG config.status config.log config.h *~ \#*
rm -f core *.orig *.rej
rm -rf *.cache
release:
$(MAKE) configure
$(MAKE) spec
$(MAKE) distclean
fatattr: $(OBJS)
$(CC) $(LDFLAGS) -o fatattr $(OBJS) $(LIBS)
spotless: distclean
rm -f configure config.h.in fatattr.spec
install: all
mkdir -p $(INSTALLROOT)$(bindir)
$(INSTALL_PROGRAM) $(PROGS) $(INSTALLROOT)$(bindir)
mkdir -p $(INSTALLROOT)$(mandir)/man1
$(INSTALL_DATA) $(MAN1PAGES) $(INSTALLROOT)$(mandir)/man1
config: MCONFIG
MCONFIG: configure MCONFIG.in config.h.in
./configure
config.h: MCONFIG
: Generated by side effect
config.h.in: configure.in
rm -f config.h.in
autoheader
configure: configure.in aclocal.m4
autoconf
rm -f MCONFIG config.cache config.log config.status config.h
dist: config spec
$(MAKE) distclean
#
# Version header
#
VERSION = $(shell cat version)
version.h: version
echo "#define FATATTR_VERSION \"$(VERSION)\"" > version.h
fatattr.spec: fatattr.spec.in version
sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@