blob: 9b3c4f3903b41f1135065e406459f5182cf1b094 (
plain)
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
|
CFLAGS+=-std=c11 -Wall -Wextra -Wpedantic -D_POSIX_C_SOURCE=200809L
CFLAGS+=-I/usr/include/lua5.3
LDLIBS+=-llua5.3
PREFIX?=/usr/local
plop: main.o plop.o response.o request.o
main.o: plop.h request.h
plop.o: plop.h request.h response.h
request.o: request.h
response.o: response.h
connection.o: connection.h request.h
clean:
rm -f plop *.o
install: plop
mkdir -p $(PREFIX)/bin
mkdir -p $(PREFIX)/share/man/man1
mkdir -p $(PREFIX)/share/plop
cp -f plop $(PREFIX)/bin
cp -f plop.1 $(PREFIX)/share/man/man1
cp -f default.lua $(PREFIX)/share/plop
chmod 755 $(PREFIX)/bin/plop
chmod 644 $(PREFIX)/share/man/man1/plop.1
chmod 644 $(PREFIX)/share/plop/default.lua
uninstall:
rm -f $(PREFIX)/bin/plop
rm -f $(PREFIX)/share/man/man1/plop.1
rm -f $(PREFIX)/share/plop/default.lua
rmdir --ignore-fail-on-non-empty $(PREFIX)/share/plop
.PHONY: clean install uninstall
|