maybe let's not have the complexity of a DIR_BUILD

This commit is contained in:
pho4cexa 2023-02-23 23:37:07 -08:00
parent f68eaea795
commit f05e393aa3

View file

@ -2,25 +2,24 @@ DEPS = utf8 lowdown sxml-transforms clojurian symbol-utils scss srfi-1 srfi-13 s
SRC = main.scm
LOCAL_MODULES = utils utils-git
DIR_INSTALL ?= /usr/local/bin
DIR_BUILD = .
BIN = repo2html
default: compile
%: %.scm
csc -O5 -static $<
csc -O3 -static -strip $<
# Note: things break if you use -O5 here.
%.import.scm: %.scm
csc -O4 -static -c -unit $* -emit-import-library $* $<
csc -O3 -static -c -unit $* -emit-import-library $* $<
$(DIR_BUILD):
mkdir -p $@/
$(DIR_INSTALL)/%: %
install -Dm755 $< -D $@
compile: $(DIR_BUILD)/$(BIN)
rm -f ./$(DIR_BUILD)/$(BIN).link
@ls -sh $(DIR_BUILD)/$(BIN)
@echo "Finished compiling a static binary in $(DIR_BUILD)/$(BIN)!"
compile: $(BIN)
rm -f $<.link
@ls -sh $<
@echo "Finished compiling static binary $<!"
foo: utils.import.scm utils.o
repo2html: utils.import.scm utils.o utils-git.import.scm utils-git.o
@ -28,14 +27,13 @@ repo2html: utils.import.scm utils.o utils-git.import.scm utils-git.o
dependencies:
chicken-install $(DEPS)
install:
install -Dm755 $(DIR_BUILD)/$(BIN) -D $(DIR_INSTALL)/$(PROG)
install: $(DIR_INSTALL)/$(BIN)
uninstall:
rm $(DIR_INSTALL)/$(PROG)
rm -f $(DIR_INSTALL)/$(BIN)
clean:
rm -f $(DIR_BUILD)/$(BIN) foo repo2html *.link *.o *.import.scm
rm -f $(BIN) foo repo2html *.link *.o *.import.scm
compile-on-debian-11:
# builds repo2html compatible with systems running glibc-2.31 and higher.