blob: c8183e0721ecdf7d7b1e051a8184660c762ba92d (
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
|
CFLAGS = -Wall -Wextra -pedantic -O2
prefix = /usr/local
all: bin/envstore
bin/%: src/%.c
$(CC) $(CFLAGS) -o $@ $<
install: bin/envstore
mkdir -p $(prefix)/bin $(prefix)/share/man/man1
cp bin/envstore $(prefix)/bin/envstore
cp bin/envify $(prefix)/bin/envify
cp man/1/envify $(prefix)/share/man/man1/envify.1
cp man/1/envstore $(prefix)/share/man/man1/envstore.1
chmod 755 $(prefix)/bin/envstore
chmod 755 $(prefix)/bin/envify
chmod 644 $(prefix)/share/man/man1/envify.1
chmod 644 $(prefix)/share/man/man1/envstore.1
uninstall:
rm -f $(prefix)/bin/envstore $(prefix)/bin/envify
rm -f $(prefix)/share/man/man1/envify.1
rm -f $(prefix)/share/man/man1/envstore.1
test:
test/main
clean:
rm -f bin/envstore
.PHONY: all install uninstall test clean
|