summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-02-11 23:48:29 +0000
committerdavidovski <david@davidovski.xyz>2022-02-11 23:48:29 +0000
commitf090af0af78491efbbe41ef0b888dc7e7304e7fe (patch)
treea89684e76086d24a2b8603e4a51fce7c747411cd /Makefile
parent33e775af4521a4861f3e50c6e11faf754a708824 (diff)
completed hbar
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..5be29ab
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+CC=gcc
+FLAGS=
+
+DESTDIR=
+PREFIX=/usr
+
+
+.DEFAULT_GOAL := build-hbar
+
+install: install-hbar install-headers
+build: build-hbar
+
+install-headers: src/*.h
+ install -m644 src/*.h ${DESTDIR}${PREFIX}/include
+
+install-hbar: bin/hbar
+ install -m755 bin/hbar ${DESTDIR}${PREFIX}/bin
+
+build-hbar: src/hbar.c
+ ${CC} src/hbar.c -o bin/hbar ${FLAGS}
+
+prepare:
+ rm -rf bin
+ mkdir -pv bin
+