aboutsummaryrefslogtreecommitdiff
path: root/dist/examples/cxx/parser/polymorphism/nmakefile
blob: 30c50cdbf4dd83b85cac28858990f214f58810d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
root = ..\..\..\..

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

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

!if "$(XSDE_ENCODING)" == "iso8859-1"
EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --char-encoding iso8859-1
!endif

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

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

!if "$(XSDE_REUSE_STYLE)" == "mixin"
EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
!endif

!if "$(XSDE_REUSE_STYLE)" == "mixin"
impl = supermen-pimpl-mixin
!else
impl = supermen-pimpl-tiein
!endif

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

driver.obj: driver.cxx $(impl).hxx supermen-pskel.hxx
$(impl).obj: $(impl).cxx $(impl).hxx supermen-pskel.hxx
supermen-pskel.obj: supermen-pskel.cxx supermen-pskel.hxx


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


# Generate.
#
gen: supermen-pskel.hxx


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


# Clean.
#
cleanobj:
	-del $(impl).obj supermen-pskel.obj driver.obj driver.exe

clean: cleanobj
	-del supermen-pskel.?xx