diff options
| author | Cliff Click <cliffc@acm.org> | 2026-08-10 11:11:18 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-11-12 23:28:58 -0800 |
| commit | 2cb35c65bde63f90d7afc3d7a8a985b0c6ea15d7 (patch) | |
| tree | 50646613e551b1d4e523639d2973299c9d3bd5cd /Makefile | |
| parent | 772e3a1036d571de55b178ebd6d11ee5140d4e36 (diff) | |
| download | Simple-2cb35c65bde63f90d7afc3d7a8a985b0c6ea15d7.tar.gz Simple-2cb35c65bde63f90d7afc3d7a8a985b0c6ea15d7.zip | |
Chapter 30: Text Formatting and Diagnostics
Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com>
Co-authored-by: fuhsnn <66062782+fuhsnn@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-- | Makefile | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -37,7 +37,19 @@ RELEASE:= build/release TEST_SYS:= $(OBJS)/lib_$(CPU_ABI)/sys.o RELEASE_SYS:= $(RELEASE)/$(CPU_ABI)/sys.o RELEASE_CRT:= $(RELEASE)/$(CPU_ABI)/simple_crt.o +RELEASE_ARGS:= $(RELEASE)/$(CPU_ABI)/simple_args.o C_CALL_CONV:= $(if $(filter win64,$(CALL_CONV)),ms_abi,sysv_abi) +GAME_DIR:= build/examples/$(CPU_ABI) +TICTACTOE:= $(GAME_DIR)/TicTacToe$(if $(filter Windows_NT,$(OS)),.exe,) + +# Build a runnable game without starting it. Native outputs are ABI-specific; +# WSL can use CLZDIR=build/classes-linux to keep its Java build separate too. +.PHONY: tictactoe +tictactoe: $(TICTACTOE) + +$(TICTACTOE): docs/examples/TicTacToe.smp $(CLZDIR)/test/.ttag $(RELEASE_SYS) $(RELEASE_CRT) Makefile + @echo "building " $@ + @$(JVM) com.seaofnodes.simple.Simple --link --cpu $(CPU_PORT) --abi $(CALL_CONV) -L $(dir $(RELEASE_SYS)) -o $(GAME_DIR)/TicTacToe.o $< $(TEST_SYS): $(CLZDIR)/main/.mtag $(simple_driver) $(SYS_SMPS) | $(CLZDIR)/test/.ttag @echo "simping " $@ @@ -49,7 +61,11 @@ $(RELEASE_SYS): $(OBJS)/lib_$(CPU_ABI)/sys.o @cp $< $@ @cp -r $(dir $<)sys $(dir $@) -$(RELEASE_CRT): src/main/c/simple_crt.c +$(RELEASE_ARGS): src/main/smp/sys/rt/simple_args.smp $(CLZDIR)/main/.mtag $(simple_driver) Makefile | $(CLZDIR)/test/.ttag + @echo "simping " $@ + @$(JVM) com.seaofnodes.simple.Simple --cpu $(CPU_PORT) --abi $(CALL_CONV) --norun -o $@ $< + +$(RELEASE_CRT): src/main/c/simple_crt.c $(RELEASE_ARGS) Makefile @echo "compiling " $@ @[ -d $(dir $@) ] || mkdir -p $(dir $@) @gcc -c -O2 -DCALL_CONV=$(C_CALL_CONV) -o $@ $< |
