root = ..\..\..\..

!include $(root)\build\cxx\rules.nmake

# Build.
#
EXTRA_CPPFLAGS = /I$(root)\libxsde

!if "$(XSDE_LONGLONG)" == "n"
EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
!endif

!if "$(XSDE_VALIDATION)" == "n"
EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
!endif

driver.exe: driver.obj hello-pskel.obj $(root)\libxsde\xsde\xsde.lib

driver.obj: driver.cxx hello-pskel.hxx
hello-pskel.obj: hello-pskel.cxx hello-pskel.hxx

hello-pskel.cxx hello-pskel.hxx: hello.xsd
	$(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) hello.xsd

# Test.
#
test: driver.exe hello.xml
	.\driver.exe hello.xml


# Clean.
#
clean:
	-del hello-pskel.?xx hello-pskel.obj driver.obj driver.exe

