summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-08-14 16:56:54 +0200
committertomsmeding <tom.smeding@gmail.com>2016-08-14 16:56:54 +0200
commita7d52eef038d25b83ab7d7e8730749d877b6a73c (patch)
treed5f0212d9344e42fc3065ad6b34c27ebe7ef6ea1 /Makefile
parentf30ff2240932d4d03984bd16cc8b9bb2b5427a53 (diff)
Heatmap, etc.
- factor out prologue and epilogue - -H, -L - sourcemapping - separate settings - heatmap.py
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 73e948a..fa0c505 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,21 @@
CC := gcc
CFLAGS := -Wall -Wextra -std=c11 -O2 -fwrapv
BIN := bfcomp
+SNIPPETS := $(wildcard *.snippet.asm)
+SNIPPETHEADERS := $(patsubst %.asm,%.asm.h,$(SNIPPETS))
.PHONY: all clean remake
all: $(BIN)
clean:
- rm -rf $(BIN) *.dSYM
+ rm -rf $(BIN) *.asm.h *.dSYM
remake: clean all
-$(BIN): $(wildcard *.c *.h)
+$(BIN): $(wildcard *.c *.h) $(SNIPPETHEADERS)
$(CC) $(CFLAGS) -o $@ $(filter-out %.h,$^)
+
+%.asm.h: %.asm
+ (printf '#pragma once\n\n'; xxd -i $^ | sed 's/[0-9a-f]$$/&, 0x00/' | sed 's/unsigned //g') >$@