summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2025-04-24 14:38:36 -0700
committerCliff Click <cliffc@acm.org>2026-10-08 16:52:27 -0700
commit53308013c3f2bad224208805df0f54416067b8be (patch)
treeefd01b4f23d18bc40c9d4001fb399ce3567b180b /Makefile
parent43316b84a9cc0b7ac03a4d85fa4f4dff0f26ccd5 (diff)
downloadSimple-53308013c3f2bad224208805df0f54416067b8be.tar.gz
Simple-53308013c3f2bad224208805df0f54416067b8be.zip
Chapter 21: Instruction Encoding and ELF
Co-authored-by: godalming123 <68993177+godalming123@users.noreply.github.com> Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: tejasae-afk <tejasae-afk@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Tejas Attarde <201814263+tejasae-afk@users.noreply.github.com> Co-authored-by: Tamás Hadházy <85063808+Hels15@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki <jun784@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 30b5f180..73804a6d 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,9 @@ test_javas := $(wildcard $(TST)/$(SIMPLE)/*java $(TST)/$(SIMPLE)/*/*java)
main_classes := $(patsubst $(SRC)/%java,$(CLZDIR)/main/%class,$(main_javas))
include $(firstword $(wildcard ../graph/graph.mk graph/graph.mk))
include $(firstword $(wildcard ../print/print.mk print/print.mk))
+include $(firstword $(wildcard ../isa/isa.mk isa/isa.mk))
test_classes := $(patsubst $(TST)/%java,$(CLZDIR)/test/%class,$(test_javas))
-test_cp := $(patsubst $(TST)/$(SIMPLE)/%.java,com.seaofnodes.simple.%,$(wildcard $(TST)/$(SIMPLE)/*Test.java))
+test_cp := $(patsubst $(TST)/$(SIMPLE)/%.java,com.seaofnodes.simple.%,$(wildcard $(TST)/$(SIMPLE)/*Test.java)) com.seaofnodes.simple.codegen.X86EncodingTest
classes = $(main_classes) $(test_classes)
# All the libraries
libs = $(wildcard lib/*jar)
@@ -55,28 +56,31 @@ endif
default: $(default_targets)
# Compile just the out-of-date files
-$(main_classes): $(CLZDIR)/main/%class: $(SRC)/%java $(graph_javas) $(print_javas)
+$(main_classes): $(CLZDIR)/main/%class: $(SRC)/%java $(graph_javas) $(print_javas) $(isa_javas)
@echo "compiling " $@ " because " $?
@[ -d $(CLZDIR)/main ] || mkdir -p $(CLZDIR)/main
@javac $(JAVAC_ARGS) -cp "$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(SRC) -d $(CLZDIR)/main $(main_javas)
-$(test_classes): $(CLZDIR)/test/%class: $(TST)/%java $(main_classes)
+$(test_classes): $(CLZDIR)/test/%class: $(TST)/%java $(main_classes) $(isa_test_javas)
@echo "compiling " $@ " because " $?
@[ -d $(CLZDIR)/test ] || mkdir -p $(CLZDIR)/test
- @javac $(JAVAC_ARGS) -cp "$(CLZDIR)/test$(SEP)$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(TST) -d $(CLZDIR)/test $(test_javas)
+ @javac $(JAVAC_ARGS) -cp "$(CLZDIR)/test$(SEP)$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(TST) -d $(CLZDIR)/test $(test_javas) $(isa_test_javas)
# Base launch line for JVM tests
JVM=nice java -ea -cp "$(CLZDIR)/main${SEP}${jars}${SEP}$(CLZDIR)/test"
tests: $(default_targets)
@echo "testing " $(test_cp)
+ @[ -d build/objs ] || mkdir -p build/objs
@$(JVM) org.junit.runner.JUnitCore $(test_cp)
@$(JVM) org.junit.runner.JUnitCore com.seaofnodes.simple.FuzzerWrap
-# Report measured spill totals while retaining the tests' assertions.
spill-stats: $(default_targets)
+ @[ -d build/objs ] || mkdir -p build/objs
@$(JVM) com.seaofnodes.simple.SpillStats
+.PHONY: spill-stats
+
fuzzer: $(default_targets)
@echo "fuzzing " $(test_cp)
@$(JVM) org.junit.runner.JUnitCore com.seaofnodes.simple.FuzzerWrap
@@ -91,7 +95,7 @@ build/release/simple.jar: $(main_classes) $(test_classes)
@jar cf build/release/simple.jar -C $(CLZDIR)/main . -C $(CLZDIR)/test . -C $(SRC)/$(SIMPLE) . -C $(TST)/$(SIMPLE) .
-.PHONY: clean spill-stats
+.PHONY: clean
clean:
rm -rf build
rm -f TAGS