-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (25 loc) · 768 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
VERSION=1.0
# www.vanheusden.com
DEBUG=-g -D_DEBUG
LDFLAGS+=$(DEBUG)
CFLAGS+=-Os -Wall -Wextra -DVERSION=\"$(VERSION)\" $(DEBUG)
OBJS=error.o tc.o
all: tcpconsole
tcpconsole: $(OBJS)
$(CC) -Wall -W $(OBJS) $(LDFLAGS) -o tcpconsole
install: tcpconsole
cp tcpconsole /usr/local/sbin
cp tcpconsole.service /etc/systemd/system
systemctl enable tcpconsole
systemctl start tcpconsole
uninstall:
rm /usr/local/sbin/tcpconsole /etc/systemd/system/tcpconsole.service
clean:
rm -f $(OBJS) core tcpconsole
package: clean
# source package
rm -rf tcpconsole-$(VERSION)*
mkdir tcpconsole-$(VERSION)
cp *.c *.h Makefile* readme.txt *service tcpconsole-$(VERSION)
tar cf - tcpconsole-$(VERSION) | gzip -9 > tcpconsole-$(VERSION).tgz
rm -rf tcpconsole-$(VERSION)