]> mj.ucw.cz Git - bouncer.git/blob - Makefile
make release: Reorganization of directory structure
[bouncer.git] / Makefile
1 VERSION=1.0
2 PACKAGE=bouncer-$(VERSION)
3
4 PKG_CFLAGS := $(shell pkg-config --cflags libucw libipset)
5 PKG_LIBS := $(shell pkg-config --libs libucw libipset)
6
7 CFLAGS=-O2 -Wall -Wextra -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -Wno-missing-field-initializers -std=gnu99 $(PKG_CFLAGS)
8 LDLIBS=$(PKG_LIBS)
9
10 all: bouncer
11
12 bouncer: bouncer.c
13
14 clean:
15         rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
16         rm -f bouncer
17         rm -f bouncer-*.tar.gz bouncer-*.tar.sig
18
19 install: bouncer
20         install -d $(DESTDIR)/usr/sbin $(DESTDIR)/etc
21         install -m755 bouncer $(DESTDIR)/usr/sbin/
22         install -m644 config $(DESTDIR)/etc/bouncer
23
24 release:
25         git tag --sign v$(VERSION)
26         git push --tags
27         git archive --format=tar --prefix=$(PACKAGE)/ HEAD >$(PACKAGE).tar
28         gpg --armor --detach-sign -o $(PACKAGE).tar.sig $(PACKAGE).tar
29         gzip $(PACKAGE).tar
30         scp $(PACKAGE).tar.gz $(PACKAGE).tar.sig atrey:~ftp/pub/local/mj/linux/
31         scp README jw:web/sw/bouncer/
32         ssh jw "cd web && bin/release-prog bouncer $(VERSION)"
33         mv $(PACKAGE).tar.gz $(PACKAGE).tar.sig ~/archives/sw/bouncer/