summaryrefslogtreecommitdiff
path: root/makefile.mk
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-04 19:41:10 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-04 19:41:10 -0400
commit1c11a13ff33873bcc79d4597d31cd252d5c6c1ae (patch)
treea4321b97f5ad69d1a9b9d06dd629a4dc532758b0 /makefile.mk
parentupdate msim usage (diff)
downloadmips-1c11a13ff33873bcc79d4597d31cd252d5c6c1ae.tar.gz
mips-1c11a13ff33873bcc79d4597d31cd252d5c6c1ae.tar.bz2
mips-1c11a13ff33873bcc79d4597d31cd252d5c6c1ae.zip
refactor masm to add codegen step
Diffstat (limited to 'makefile.mk')
-rw-r--r--makefile.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/makefile.mk b/makefile.mk
index 8135205..e004a64 100644
--- a/makefile.mk
+++ b/makefile.mk
@@ -3,7 +3,7 @@
CFLAGS += -std=gnu2x
# add include directory
-CFLAGS += -isystem ../include
+CFLAGS += -isystem ../include -DPREFIX=$(PREFIX)
INCLUDE += ../include
# add lib directory
@@ -13,7 +13,7 @@ H_SRC = $(shell find $(SRC) $(INCLUDE) -type f -name "*.h")
C_SRC = $(shell find $(SRC) -type f -name "*.c")
C_OBJ = $(patsubst %.c,$(BIN)/%.o,$(C_SRC))
-.PHONY: clean build run test
+.PHONY: clean build run fuzz
build: $(BIN)/$(OUT)
@@ -24,8 +24,8 @@ clean:
run: build
$(BIN)/$(OUT)
-test:
- make -C ../test $(OUT)
+fuzz: clean
+ make -C . build CC=afl-cc LD=afl-cc
mkdir -p ../fuzz
rm -fr ../fuzz/$(OUT)
afl-fuzz -i ../test/$(OUT) -o ../fuzz -M $(OUT) -- $(BIN)/$(OUT) @@