-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 717 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 717 Bytes
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
36
CFLAGS = -Wall -Wextra -Wno-unused-parameter -g -O2
headers = $(wildcard src/*.h)
sources = $(wildcard src/*.c)
objects = $(subst .c,.o,$(sources))
vcprompt: $(objects)
$(CC) -o $@ $(objects)
# Maximally pessimistic view of header dependencies.
$(objects): $(headers)
.PHONY: check check-simple check-git
check: check-simple check-git
gitrepo = tests/git-repo.tar
check-simple: vcprompt
cd tests && ./test-simple
check-git: vcprompt $(gitrepo)
cd tests && ./test-git
$(gitrepo): tests/setup-git
cd tests && ./setup-git
clean:
rm -f $(objects) vcprompt
DESTDIR =
PREFIX = /usr/local
.PHONY: install
install: vcprompt
install -d $(DESTDIR)$(PREFIX)/bin
install -m 755 vcprompt $(DESTDIR)$(PREFIX)/bin