~ubuntu-branches/ubuntu/intrepid/checkinstall/intrepid

« back to all changes in this revision

Viewing changes to installwatch-0.7.0beta5/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2006-12-20 17:39:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20061220173931-fxitje7fef9y4cjb
Tags: 1.6.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Use /usr/bin/which instead of which. (Malone: #4423)
  - add make to Depends, checkinstall doesn't work without it.
   (Malone: #3142)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile for installwatch
 
2
# $Id: Makefile,v 0.7.0.5 2006/11/01 06:39:28 izto Exp $
 
3
 
 
4
# Well, the only configurable part is the following variable.
 
5
# Make sure the directory you specify exists.
 
6
 
 
7
PREFIX=/usr/local
 
8
 
 
9
# End of configurable part
 
10
 
 
11
VERSION=0.7.0beta5
 
12
 
 
13
BINDIR=$(PREFIX)/bin
 
14
LIBDIR=$(PREFIX)/lib
 
15
 
 
16
all: installwatch.so
 
17
 
 
18
installwatch.so: installwatch.o
 
19
        ld -shared -o installwatch.so installwatch.o -ldl -lc
 
20
 
 
21
installwatch.o: installwatch.c localdecls.h
 
22
        gcc -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DVERSION=\"$(VERSION)\" installwatch.c
 
23
 
 
24
localdecls.h:
 
25
        ./create-localdecls
 
26
 
 
27
install: all
 
28
        mkdir -p $(LIBDIR)
 
29
        mkdir -p $(BINDIR)
 
30
        if [ -r $(LIBDIR)/installwatch.so ]; then \
 
31
                rm -f  $(LIBDIR)/installwatch.so; \
 
32
        fi
 
33
        install -s installwatch.so $(LIBDIR)
 
34
        
 
35
        sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > $(BINDIR)/installwatch
 
36
        chmod 755 $(BINDIR)/installwatch
 
37
 
 
38
uninstall:
 
39
        rm -f $(LIBDIR)/installwatch.so
 
40
        rm -f $(BINDIR)/installwatch
 
41
        
 
42
clean:
 
43
        rm -f *~ *.bak *.o installwatch.so core localdecls.h libctest test-installwatch
 
44
 
 
45
tarball: clean
 
46
        tar -czvC .. -f ../installwatch-$(VERSION).tar.gz installwatch-$(VERSION)
 
47
 
 
48
test: install
 
49
        gcc -Wall -DVERSION=\"$(VERSION)\" -o test-installwatch test-installwatch.c -ldl
 
50
        $(PREFIX)/bin/installwatch ./test-installwatch
 
51
 
 
52