blob: 686ca7e48a21b87d9d894951f8162236e436fbcc (
plain)
1 CCOPTS = -std=gnu18 -Wall -Werror -O2
2 CCGIT = $(shell pkg-config --libs libgit2)
3
4 VERMAJOR = 0
5 VERMINOR = 1
6 VERPATCH = 0
7
8 all: build
9
10 build: setup common modgit
11 cc $(CCOPTS) \
12 -DVERMAJOR=$(VERMAJOR) -DVERMINOR=$(VERMINOR) -DVERPATCH=$(VERPATCH) \
13 obj/*.o $(CCGIT) src/main.c -o nullprompt
14
15 common: setup
16 cc $(CCOPTS) -c src/common.c -o obj/common.o
17
18 modgit: setup common
19 cc $(CCOPTS) -c src/modgit.c -o obj/modgit.o
20
21 setup:
22 if [ ! -d obj ]; then mkdir obj; fi
23
24
25 install: build
26 install -D -m 755 nullprompt $(DESTDIR)/usr/bin/nullprompt
|