celeste-avali-skin/SourceCode/Makefile

42 lines
1.6 KiB
Makefile

# run make release to compile everything on linux (and maybe on macos too who knows)
SHELL = /bin/bash
# .ONESHELL:
# .SHELLFLAGS=-ec
LIBS = -pkg:dotnet -r:MonoMod.Utils.dll -r:MonoMod.RuntimeDetour.dll \
-r:Celeste.exe -r:MMHOOK_Celeste.dll -r:FNA.dll -r:Mono.Cecil.dll -r:YamlDotNet.dll -r:CelesteNet.Client.dll -r:CelesteNet.Shared.dll
# If this mod is setup in the Celeste/Mods/ directory, then we use the paths:
# - ../../../, which should be the Celeste/ directory, which contains most dlls
# - ./Libraries/, which contains the optional dependency CelesteNet.Client.dll
LIB_PATH = -lib:../../../ -lib:./Libraries/
BINARY=AvaliSkin.dll
.PHONY: default release strip
default: release
# To compile code on linux you will need the mono runtime and mcs (the mono c# compiler), and that's it actually.
release:
mcs ${LIB_PATH} ${LIBS} *.cs -t:library -out:${BINARY} -optimize
cat ${BINARY} > ../${BINARY}
rm ${BINARY}
# This strips out code from reference assemblies so only the symbols are
# present for linking.
strip:
for file in ./Libraries/*; do mono-cil-strip "$$file"; done
# To compile the shaders, you will need:
# - wine64 to be installed,
# - the June 2010 legacy DirectX SDK needs to be unzipped under wine
# (download: https://www.microsoft.com/en-us/download/details.aspx?id=6812)
# - and you will need D3DCompiler_43.dll which you can grab from winetricks or
# if you have steam proton installed, you probably already have a copy of it
# *somewhere* on your system.
# Man microsoft software sucks... how is this company still alive
shader_c:
wine64 DXSDK/Utilities/bin/x64/fxc.exe "AvaliRecolor.fx" "/T" "fx_2_0" "/Fo" "AvaliRecolor.o" "/O3"