Debian Codegraph @

Makefile

raw
1 # Copyright 2010 Google Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 all: runalarm runstat runlock
16
17 runalarm: runalarm.c subprocess.c
18
19 runlock: runlock.c subprocess.c tempdir.c
20
21 runstat: runstat.c subprocess.c tempdir.c
22
23 CFLAGS+=-Wall -Werror -Wextra -D_XOPEN_SOURCE=500 -g -ansi -pedantic-errors -Wwrite-strings -Wcast-align -Wcast-qual -Winit-self -Wformat=2 -Wuninitialized -Wmissing-declarations -Wpointer-arith -Wstrict-aliasing -fstrict-aliasing
24 LDLIBS+=-lrt
25
26 SOURCES = runalarm.c runlock.c runstat.c subprocess.c subprocess.h tempdir.c tempdir.h Makefile runalarm.1 runlock.1 runstat.1 version examples cronutils.spec runcron regtest.sh tests
27
28 prefix = usr/local
29 BINDIR = $(prefix)/bin
30 MANDIR = $(prefix)/share/man/man1
31 VERSION = $(shell cat version)
32
33 install:
34 mkdir -p -m 755 $(DESTDIR)/$(BINDIR) $(DESTDIR)/$(MANDIR)
35 install -m 755 runalarm runlock runstat $(DESTDIR)/$(BINDIR)
36 install -m 644 runalarm.1 runlock.1 runstat.1 $(DESTDIR)/$(MANDIR)
37
38 clean:
39 rm -f runalarm runlock runstat
40
41 distclean: clean
42 rm -f *~ \#*
43
44 dist:
45 rm -rf cronutils-$(VERSION) cronutils-$(VERSION).tar cronutils-$(VERSION).tar.gz
46 mkdir cronutils-$(VERSION)
47 cp -r $(SOURCES) cronutils-$(VERSION)
48 tar cf cronutils-$(VERSION).tar cronutils-$(VERSION)
49 gzip -9 cronutils-$(VERSION).tar
50 rm -rf cronutils-$(VERSION)
51
52 test: all
53 ./regtest.sh
54
55 .PHONY: dist clean install distclean test