1#!/usr/bin/make -f 2 3# mpatrol 4# A library for controlling and tracing dynamic memory allocations. 5# Copyright (C) 1997-2002 Graeme S. Roy <graeme.roy@analog.com> 6# 7# This library is free software; you can redistribute it and/or 8# modify it under the terms of the GNU Library General Public 9# License as published by the Free Software Foundation; either 10# version 2 of the License, or (at your option) any later version. 11# 12# This library is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15# Library General Public License for more details. 16# 17# You should have received a copy of the GNU Library General Public 18# License along with this library; if not, write to the Free 19# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20# MA 02111-1307, USA. 21 22# $Id: rules,v 1.2 2002/01/08 20:19:01 graeme Exp $ 23 24# Uncomment this to turn on verbose mode. 25# export DH_VERBOSE=1 26 27# This is the debhelper compatibility version to use. 28export DH_COMPAT=3 29 30MPATROL=$(shell pwd)/debian/mpatrol 31 32configure: configure-stamp 33configure-stamp: 34 dh_testdir 35 36 # Add here commands to configure the package. 37 38 touch configure-stamp 39 40build: configure-stamp build-stamp 41build-stamp: 42 dh_testdir 43 44 # Add here commands to compile the package. 45 46 # Build the libraries and commands. 47 ( cd build/unix && $(MAKE) all && cd - ) 48 49 touch build-stamp 50 51clean: 52 dh_testdir 53 dh_testroot 54 rm -f build-stamp configure-stamp 55 56 # Add here commands to clean up after the build process. 57 58 # Clean up the libraries and commands. 59 ( cd build/unix && $(MAKE) clobber && cd - ) 60 61 dh_clean 62 63install: build 64 dh_testdir 65 dh_testroot 66 dh_clean -k 67 dh_installdirs 68 69 # Add here commands to install the package into debian/mpatrol. 70 71 # Install the commands. 72 install -m755 -s build/unix/mpatrol $(MPATROL)/usr/bin 73 install -m755 -s build/unix/mprof $(MPATROL)/usr/bin 74 install -m755 -s build/unix/mptrace $(MPATROL)/usr/bin 75 install -m755 -s build/unix/mleak $(MPATROL)/usr/bin 76 install -m755 bin/mpsym $(MPATROL)/usr/bin 77 install -m755 bin/mpedit $(MPATROL)/usr/bin 78 install -m755 bin/hexwords $(MPATROL)/usr/bin 79 80 # Install the documentation. 81 install -m644 doc/mpatrol.html $(MPATROL)/usr/share/doc/mpatrol/html 82 install -m644 doc/images/*.jpg $(MPATROL)/usr/share/doc/mpatrol/html/images 83 install -m644 doc/mpatrol.pdf $(MPATROL)/usr/share/doc/mpatrol 84 install -m644 doc/refcard.pdf $(MPATROL)/usr/share/doc/mpatrol 85 86 # Install the headers. 87 install -m644 src/mpatrol.h $(MPATROL)/usr/include 88 install -m644 src/mpalloc.h $(MPATROL)/usr/include 89 install -m644 src/mpdebug.h $(MPATROL)/usr/include 90 install -m644 tools/*.h $(MPATROL)/usr/include/mpatrol 91 92 # Install the info file. 93 install -m644 doc/mpatrol.info* $(MPATROL)/usr/share/info 94 95 # Install the libraries. 96 install -m644 build/unix/lib*.a $(MPATROL)/usr/lib 97 install -m755 build/unix/lib*.so.* $(MPATROL)/usr/lib 98 99 # Install the manual pages. 100 install -m644 man/man1/*.1 $(MPATROL)/usr/share/man/man1 101 install -m644 man/man3/*.3 $(MPATROL)/usr/share/man/man3 102 103 # Install the extra files. 104 install -m644 extra/mpatrol.m4 $(MPATROL)/usr/share/aclocal 105 106# Build architecture-independent files here. 107binary-indep: build install 108 109# Build architecture-dependent files here. 110binary-arch: build install 111# dh_testversion 112 dh_testdir 113 dh_testroot 114# dh_installdebconf 115 dh_installdocs 116# dh_installexamples 117# dh_installmenu 118# dh_installemacsen 119# dh_installpam 120# dh_installinit 121# dh_installcron 122 dh_installmanpages 123 dh_installinfo 124# dh_undocumented 125 dh_installchangelogs ChangeLog 126 dh_link 127 dh_strip 128 dh_compress 129 dh_fixperms 130# dh_suidregister 131 dh_makeshlibs 132 dh_installdeb 133# dh_perl 134 dh_shlibdeps 135 dh_gencontrol 136 dh_md5sums 137 dh_builddeb 138 139binary: binary-indep binary-arch 140 141.PHONY: configure build clean install binary-indep binary-arch binary 142