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_PARSER)" == "n"
EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
!endif

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

driver.obj: driver.cxx text-pskel.hxx anchor.hxx
text-pskel.obj: text-pskel.cxx text-pskel.hxx anchor.hxx

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

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


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

