clone url: git://git.m455.casa/lol
Makefile
1 | DEPS = utf8 spiffy lowdown |
2 | SRC = src/main.scm |
3 | DIR_INSTALL ?= ~/.local/bin |
4 | DIR_BUILD = builds |
5 | PROG = lol |
6 | KERNEL != uname -s | tr 'A-Z' 'a-z' |
7 | PLATFORM != uname -m |
8 | BIN = $(PROG)-$(KERNEL)-$(PLATFORM) |
9 |
|
10 | all: compile checksum |
11 |
|
12 | checksum: compile |
13 | sha256sum ./$(DIR_BUILD)/$(BIN) | cut -d ' ' -f1 > ./$(DIR_BUILD)/$(BIN)-sha256.txt |
14 |
|
15 | compile: |
16 | mkdir -p ./$(DIR_BUILD) |
17 | csc -static ./$(SRC) -o ./$(DIR_BUILD)/$(BIN) |
18 | rm ./$(DIR_BUILD)/$(BIN).link |
19 | @echo "Finished compiling a static binary in $(DIR_BUILD)/$(BIN)!" |
20 |
|
21 | install: |
22 | install -Dm755 ./$(DIR_BUILD)/$(BIN) -D $(DIR_INSTALL)/$(PROG) |
23 |
|
24 | uninstall: |
25 | rm $(DIR_INSTALL)/$(PROG) |
26 |
|
27 | dependencies: |
28 | chicken-install $(DEPS) |
29 |
|
30 | clean: |
31 | rm ./$(DIR_BUILD)/$(BIN) |
32 |
|