Makefile.in 2.56 KB
Newer Older
Cédric Tissières's avatar
Cédric Tissières committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
# Copyright (C) 2008, Bertrand Mesot <http://www.objectif-securite.ch>
#	 	2008, Cedric Tissieres <http://www.objectif-securite.ch>
#
# 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
# or (at your option) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-13, USA

# General variables
SHELL = /bin/sh

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin

INSTALL = @INSTALL@

PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
distdir = $(PACKAGE)-$(VERSION)

DISTFILES = \
	aclocal.m4 \
	AUTHORS \
	ChangeLog \
	config \
	config.h.in \
	configure \
	configure.in \
	COPYING \
	INSTALL \
	install-sh \
	LICENSE \
	LICENSE.OpenSSL \
	Makefile.in \
	NEWS \
	README.md \
	config.sub \
	config.guess \
	src

all:
	$(MAKE) -C src

install: all
	@echo "Creating directories..."
	$(INSTALL) -d $(DESTDIR)$(bindir)
	@echo "Copying binary..."
	$(INSTALL) src/ophcrack $(DESTDIR)$(bindir)

uninstall:
	@echo "Deleting binary and manpages..."
	rm -f $(DESTDIR)$(bindir)/ophcrack

clean:
	rm -f *~
	$(MAKE) -C src clean

distclean: clean
	$(MAKE) -C src distclean
70
	rm -f Makefile
Cédric Tissières's avatar
Cédric Tissières committed
71 72 73 74 75 76 77 78 79 80
	rm -f config.h config.status config.log
	rm -rf autom4te.cache
	rm -f src/gui/ophcrack_win32.rc src/gui/gui.pro src/gui/Info.plist
	rm -f src/gui/Makefile

dist: distclean
	rm -rf $(distdir)
	mkdir $(distdir)
	cp -r $(DISTFILES) $(distdir)
	for dir in `find ${distdir} -name .svn -type d`; do rm -rf $$dir; done
81
	for file in `find ${distdir} -name .gitignore -type f`; do rm -f $$file; done
Cédric Tissières's avatar
Cédric Tissières committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
	tar cfj $(distdir).tar.bz2 $(distdir)
	rm -rf $(distdir)

# automatic re-running of configure if the configure.in file has changed
configure: configure.in aclocal.m4
	autoconf

# autoheader might not change config.h.in, so touch a stamp file
config.h.in: stamp-h.in
stamp-h.in: configure.in aclocal.m4
	autoheader
	echo timestamp > stamp-h.in

config.h: stamp-h
stamp-h: config.h.in config.status
	./config.status
Makefile: Makefile.in $(wildcard src/*.in) $(wildcard src/*/*.in) config.status
	./config.status
config.status: configure
	./config.status --recheck