DEPS = utf8 lowdown sxml-transforms clojurian symbol-utils scss srfi-1 srfi-13 srfi-14 ersatz SRC = main.scm DIR_INSTALL ?= /usr/local/bin DIR_BUILD = . BIN = repo2html all: compile compile: mkdir -p $(DIR_BUILD)/ csc -O3 -static ./$(SRC) -o $(DIR_BUILD)/$(BIN) rm ./$(DIR_BUILD)/$(BIN).link @echo "Finished compiling a static binary in $(DIR_BUILD)/$(BIN)!" dependencies: chicken-install $(DEPS) install: install -Dm755 $(DIR_BUILD)/$(BIN) -D $(DIR_INSTALL)/$(PROG) uninstall: rm $(DIR_INSTALL)/$(PROG) clean: rm $(DIR_BUILD)/$(BIN) compile-on-debian-11: # builds repo2html compatible with systems running glibc-2.31 and higher. # # this will download a debian docker container that has glibc 2.31, then # download chicken scheme, gcc compiler, and tons of related packages, then # download all the dependency eggs, then compile them, then compile this # project, then except for that one output executable it will delete # *everything* it has done and downloaded including any caches meant to # save you some time and bandwidth the next time you need to compile this # # what i'm saying is, if we need to run this frequently, we should find a # better mechanism. providing a dockerfile would probably be sufficient... docker run --rm -it -v "$(shell pwd)":/tmp/x -w /tmp/x debian:bullseye-slim sh -c '\ apt update &&\ apt install -y chicken-bin build-essential make &&\ make dependencies &&\ make compile'