# NOTE: If you change this file, you'll need to
#       clean all ("stbuild all all -clean") before compiling again.

target _
	sampleGenericParse, calculatorDynamic, calculatorStatic, _
	altercgt, dumpcgt, staticlang, parse, gendocs, grmc, updateServerDocs
	   
[altercgt, dumpcgt, staticlang, parse, gendocs, grmc, updateServerDocs:all]
flags src/tools/$(TARGET)/main.d

[sampleGenericParse, calculatorDynamic, calculatorStatic:all]
flags src/samples/$(TARGET)/main.d

[sampleGenericParse, staticlang:all]
flags -m32  # Work around DMD Issue #6983

[staticlang:all]
# Compiling a grammar is done using a static-style language for the grm
# grammar description format, so this avoids an awkward self-dependency.
flags -version=Goldie_OmitGrmcLib

[all:all]
flags -Isrc -I../SemiTwistDTools/src _
      -oqobj/$(TARGET)/$(MODE)  # Keep object files separate to prevent screwy
	                            # template-related linking issues (might not
								# be needed with RDMD...)

[all:debug]
flags -ofbin/goldie-$(TARGET)-$(MODE) _
      -debug -C-unittest _
	  -g _
      -C-wi

[all:release]
flags -ofbin/goldie-$(TARGET) _
      -release -C-O _
      -C-wi
