about summary refs log tree commit diff
path: root/patches/fuzzolic-utils-make.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/fuzzolic-utils-make.patch')
-rw-r--r--patches/fuzzolic-utils-make.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/fuzzolic-utils-make.patch b/patches/fuzzolic-utils-make.patch
new file mode 100644
index 0000000..4a971a5
--- /dev/null
+++ b/patches/fuzzolic-utils-make.patch
@@ -0,0 +1,34 @@
+commit 1bfb2b78e56f953956f2125980992b91ad355774
+Author: Nguyễn Gia Phong <cnx@loang.net>
+Date:   2025-05-08 11:01:05 +0900
+
+    Build and install utilities
+
+diff --git a/Makefile b/Makefile
+index 395f7a387bd9..feaef92f3266 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,23 @@
++.POSIX:
++.PHONY: all install
++
++PREFIX ?= /usr/local
++BINDIR ::= $(DESTDIR)$(PREFIX)/bin
++BIN ::= fuzzolic-merge-bitmap fuzzolic-find-models-addrs
++
++all: $(BIN)
++
++fuzzolic-find-models-addrs: fuzzolic/find_models_addrs.py
++	cp $< $@
++
++fuzzolic-merge-bitmap: utils/merge_bitmap.o
++	$(CC) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -o $@
++
++install: $(BIN:%=$(BINDIR)/%)
++
++$(BINDIR)/%: %
++	install -Dm 755 $< $@
++
+ simpleif: build clean-work-dir
+ 	./fuzzolic/fuzzolic.py -o workdir -i tests/simple_if_0.dat tests/driver simple_if
+ 	./utils/print_test_cases.py workdir/tests