SDKDIR=$(HOME)/.dotnet/sdk/6.0.102# or whatever your sdk is
CSCPATH=$(SDKDIR)/Roslyn/bincore/csc.dll
NETSTANDARD=$(SDKDIR)/ref/netstandard.dll
CONFIG=$(SDKDIR)/vstest.console.runtimeconfig.json
DOTNET=DOTNET_CLI_TELEMETRY_OPTOUT=1 && dotnet
CSC=$(DOTNET) $(CSCPATH) -reference:$(NETSTANDARD)
RUN=$(DOTNET) exec --runtimeconfig $(CONFIG)
#CSC = mcs
#RUN = mono

all: Out.txt
	cat Out.txt

Out.txt: hello.exe
	$(RUN) hello.exe > Out.txt

hello.exe: hello.cs
	$(CSC) hello.cs -target:exe -out:hello.exe

.PHONEY:clean
clean:
	rm -rf Out.txt hello.exe

TEST='optout'
test:
	echo $(TEST)
	echo $(CSC)
