summaryrefslogtreecommitdiff
path: root/c/examples/zero_init/Makefile
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2023-07-30 14:38:43 -0700
committerMatthew Sotoudeh <matthew@masot.net>2023-07-30 14:38:43 -0700
commit4de60a709d3af497781b7467f2c6fe7e09b39595 (patch)
treea9c4b70c6e87f37f9b69d77153c7cda10a60e043 /c/examples/zero_init/Makefile
parent678b0d4a2ec15db0735d08ebafec55605ce0a688 (diff)
basic libdietc for writing passes in C
Diffstat (limited to 'c/examples/zero_init/Makefile')
-rw-r--r--c/examples/zero_init/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/c/examples/zero_init/Makefile b/c/examples/zero_init/Makefile
new file mode 100644
index 0000000..79b5692
--- /dev/null
+++ b/c/examples/zero_init/Makefile
@@ -0,0 +1,14 @@
+all: default instrumented
+
+default: test.c
+ gcc -O0 $^ -o $@
+
+instrumented: test.c dietpass
+ dietcc -O0 test.c -o $@ --dietc-pass $(PWD)/dietpass
+
+dietpass: dietpass.c ../../libdietc.l ../../libdietc.h
+ make -C ../..
+ gcc -O3 dietpass.c ../../libdietc.o -I../../ -lfl -o $@
+
+clean:
+ rm -f default instrumented dietpass
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback