File: Makefile

package info (click to toggle)
installwatch 0.5.5-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 116 kB
  • ctags: 84
  • sloc: ansic: 574; sh: 186; makefile: 70
file content (48 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download
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
# Makefile for installwatch

# Edited for Debian GNU/Linux
DESTDIR =

# Well, the only configurable part is the following variable.
# Make sure the directory you specify exists.

PREFIX=/usr

# End of configurable part

VERSION=0.5.5

BINDIR=$(DESTDIR)$(PREFIX)/bin
LIBDIR=$(DESTDIR)$(PREFIX)/lib

all: installwatch.so

installwatch.so: installwatch.o
	ld -shared -o installwatch.so installwatch.o -ldl -lc

installwatch.o: installwatch.c localdecls.h
	gcc -Wall -c -DPIC -fPIC -D_REENTRANT -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" installwatch.c

localdecls.h:
	./create-localdecls

install: all
	install installwatch.so $(LIBDIR)
	install installwatch $(BINDIR)

uninstall:
	rm $(LIBDIR)/installwatch.so
	rm $(BINDIR)/installwatch
	rm $(BINDIR)/inst2rpm
	
clean:
	rm -f *~ *.bak *.o *.tmp *.so core localdecls.h libctest test-installwatch

tarball: clean
	tar -czvC .. -f ../installwatch-$(VERSION).tar.gz installwatch-$(VERSION)

test: install
	gcc -Wall -DVERSION=\"$(VERSION)\" -o test-installwatch test-installwatch.c -ldl
	$(PREFIX)/bin/installwatch ./test-installwatch