forked from miku/filterline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (29 loc) · 883 Bytes
/
Makefile
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
SHELL = /bin/bash
TARGETS = filterline
filterline: filterline.c
cc -Wall -xc -O3 -o filterline filterline.c
.PHONY: format
fmt:
clang-format -i -style WebKit filterline.c
.PHONY: clean
clean:
rm -f filterline
rm -f filterline_*.deb
rm -f filterline-*.rpm
rm -rf packaging/deb/filterline/usr
.PHONY: deb
deb: $(TARGETS)
mkdir -p packaging/deb/filterline/usr/sbin
cp $(TARGETS) packaging/deb/filterline/usr/sbin
cd packaging/deb && fakeroot dpkg-deb --build filterline .
mv packaging/deb/filterline_*.deb .
.PHONY: rpm
rpm: $(TARGETS)
mkdir -p $(HOME)/rpmbuild/{BUILD,SOURCES,SPECS,RPMS}
cp ./packaging/rpm/filterline.spec $(HOME)/rpmbuild/SPECS
cp $(TARGETS) $(HOME)/rpmbuild/BUILD
./packaging/rpm/buildrpm.sh filterline
cp $(HOME)/rpmbuild/RPMS/x86_64/filterline*.rpm .
.PHONY: valgrind
valgrind: clean filterline
valgrind -v ./filterline fixtures/L fixtures/F