439c7ac6972384cefb3a57ee38da9978bf5a5249
[svn/Prometheus-QoS/.git] / Makefile
1 PACKAGE=prometheus
2 VERSION=0.8.2
3 CFLAGS=-std=c99 -Wall
4 prefix=/usr
5 mandir=$(prefix)/share/man
6 sbindir=$(prefix)/sbin
7 sysconfdir=/etc
8 OBJECTS=parsehosts.o parselogs.o ipv4subnets.o json.o prometheus.o
9 HEADERS=cll1-0.6.2.h ipstruct.h
10
11 main: prometheus
12
13 %.o: %.c $(HEADERS)
14 gcc -c $< -o $@
15
16 prometheus: $(OBJECTS)
17 $(CC) $(OBJECTS) -o prometheus
18
19 deb: main
20 debian/prometheus.debian
21 dpkg-buildpackage -rfakeroot
22
23 tgz: clean
24 cp -r . ../$(PACKAGE)-$(VERSION)
25 rm -rf ../$(PACKAGE)-$(VERSION)/.svn/
26 rm -rf ../$(PACKAGE)-$(VERSION)/*/.svn/
27 rm -rf ../$(PACKAGE)-$(VERSION)/*~ $(PACKAGE)-$(VERSION)/*/*~
28 tar -czf ../$(PACKAGE)-$(VERSION).tar.gz ../$(PACKAGE)-$(VERSION)
29 rm -rf ../$(PACKAGE)-$(VERSION)
30
31 install: main
32 install -d $(sbindir)
33 install -d $(mandir)/man1
34 install -d $(mandir)/man5
35 install -d $(sysconfdir)/cron.d
36 install -d $(sysconfdir)/prometheus
37 install -m 755 prometheus $(sbindir)
38 install -m 644 prometheus.1 $(mandir)/man1
39 install -m 644 prometheus.conf.5 $(mandir)/man5
40 install -m 755 conf/prometheus.cron $(sysconfdir)/cron.d/prometheus
41 install -m 755 conf/prometheus.init $(sysconfdir)/init.d/prometheus
42 install -m 600 conf/prometheus.conf $(sysconfdir)/prometheus
43 install -m 600 conf/prometheus.hosts $(sysconfdir)/prometheus/hosts
44 install -m 644 conf/prometheus.default $(sysconfdir)/default/prometheus
45
46 clean:
47 rm -f prometheus
48 rm -f $(OBJECTS)
This page took 0.390524 seconds and 3 git commands to generate.