Skip to content

Instantly share code, notes, and snippets.

@qguv

qguv/Makefile

Created Jun 26, 2020
Embed
What would you like to do?
Makefile for ras52/bootstrap (WIP)
.DEFAULT_GOAL := stage-3/ld
ELF_BIN := stage-1/elfify
BIN := stage-1/unhexl stage-2/as stage-3/ld stage-3/test1 stage-3/test2 stage-3/test3
stage-0/_unhex: stage-0/unhex.x
$(info #1)
printf $$(printf '\\x%s' $$(<$<)) >$@
chmod u+x $@
stage-0/unhex: stage-0/unhex.x stage-0/_unhex
$(info #2)
stage-0/_unhex <$< >$@
chmod u+x $@
%.ts: %.ts.x stage-0/unhex
$(info #3)
stage-0/unhex <$< >$@
$(ELF_BIN): %: %.x stage-0/unhex
$(info #4)
stage-0/unhex <$< >$@
chmod u+x $@
$(BIN): %: %.ts stage-1/elfify
$(info #5)
stage-1/elfify $< >$@
chmod u+x $@
%.ts: %.ts.xl stage-1/unhexl
$(info #6)
stage-1/unhexl <$< >$@
%.ts: %.s stage-2/as
$(info #7)
stage-2/as $< > $@
.PHONY: clean
clean:
rm -f stage-0/_unhex stage-0/unhex $(ELF_BIN) stage-1/unhexl.ts $(BIN) stage-2/as.ts
.DELETE_ON_ERROR:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment