aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


client/Makefile.windows (1005B)


      1 SHELL := cmd.exe
      2 .DEFAULT_GOAL := all
      3 
      4 CC := ../toolchains/llvm-mingw-20261006-ucrt-x86_64/bin/i686-w64-mingw32-clang.exe
      5 CPPFLAGS := -Iruntime -Igame -Idata
      6 CFLAGS := -O2 -fno-strict-aliasing -fms-extensions
      7 GAME_SOURCES := $(wildcard game/*/*.c)
      8 SOURCES := $(GAME_SOURCES) $(wildcard data/*.c) game/dispatch.c runtime/game_host.c runtime/native32.c runtime/recomp_state.c runtime/recomp_trace.c
      9 OBJECTS := $(patsubst %.c,build/windows/%.o,$(SOURCES))
     10 
     11 .PHONY: all
     12 all: build/windows/game.exe
     13 
     14 build/windows/%.o: %.c
     15 	@if not exist "$(subst /,\,$(@D))" mkdir "$(subst /,\,$(@D))"
     16 	$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@
     17 
     18 build/windows/game.exe: $(OBJECTS) Makefile.windows
     19 	$(file >build/windows/objects.rsp,$(OBJECTS))
     20 	$(CC) -mwindows @build/windows/objects.rsp -Wl,--image-base,0x60000000 -Wl,--stack,16777216 -o $@
     21 
     22 -include $(OBJECTS:.o=.d)
     23 
     24 .PHONY: clean
     25 clean:
     26 	powershell -NoProfile -Command "if (Test-Path 'build/windows') { Remove-Item -LiteralPath 'build/windows' -Recurse -Force }"