diff options
author | Aaron Ball <nullspoon@oper.io> | 2024-06-07 16:40:18 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2024-06-07 17:00:56 -0600 |
commit | 3cc711f5df8151a631090384e4dcf9c244f38093 (patch) | |
tree | 8c6e03c8bdc80681b9024bb0ac1c136df970682b /Makefile | |
download | nullprompt-3cc711f5df8151a631090384e4dcf9c244f38093.tar.gz nullprompt-3cc711f5df8151a631090384e4dcf9c244f38093.tar.xz |
Initial commit of nullpromptv0.1.0
Currently handles two modes: normal, and git.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..686ca7e --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +CCOPTS = -std=gnu18 -Wall -Werror -O2 +CCGIT = $(shell pkg-config --libs libgit2) + +VERMAJOR = 0 +VERMINOR = 1 +VERPATCH = 0 + +all: build + +build: setup common modgit + cc $(CCOPTS) \ + -DVERMAJOR=$(VERMAJOR) -DVERMINOR=$(VERMINOR) -DVERPATCH=$(VERPATCH) \ + obj/*.o $(CCGIT) src/main.c -o nullprompt + +common: setup + cc $(CCOPTS) -c src/common.c -o obj/common.o + +modgit: setup common + cc $(CCOPTS) -c src/modgit.c -o obj/modgit.o + +setup: + if [ ! -d obj ]; then mkdir obj; fi + + +install: build + install -D -m 755 nullprompt $(DESTDIR)/usr/bin/nullprompt |