1 # Makefile for Microsoft Visual C++ 7.0 (or compatible)
5 # Will build the Csharp bindings
7 # Where the core is, relative to the Csharp bindings
8 # Change this to match your environment
10 XAPIAN_CORE_REL_CSHARP
=..\..\xapian-core
11 OUTLIBDIR
=$(XAPIAN_CORE_REL_CSHARP
)\win32\
$(XAPIAN_DEBUG_OR_RELEASE
)\libs
13 !INCLUDE
$(XAPIAN_CORE_REL_CSHARP
)\win32\config.mak
15 OUTDIR
=$(XAPIAN_CORE_REL_CSHARP
)\win32\
$(XAPIAN_DEBUG_OR_RELEASE
)\CSharp
18 # Note we have two DLLs: the Assembly is built by the Csharp compiler and references the Binding which is built by the C compiler
22 XAPIAN_SWIG_CSHARP_SRCS
=\
30 DateValueRangeProcessor.cs \
44 NumberValueRangeProcessor.cs \
57 StemImplementation.cs \
59 StringValueRangeProcessor.cs \
60 SWIGTYPE_p_std__string.cs \
61 SWIGTYPE_p_std__vectorT_std__string_t.cs \
62 SWIGTYPE_p_std__vectorT_Xapian__Query_t.cs \
67 ValueRangeProcessor.cs \
74 ALL
: "$(ASSEMBLY).dll" SmokeTest.exe
"$(BINDING).dll"
75 # REMOVE THIS NEXT LINE if using Visual C++ .net 2003 - you won't need to worry about manifests. For later compilers this prevents error R6034
76 $(MANIFEST
) "$(BINDING).dll.manifest" -outputresource
:"$(BINDING).dll;2"
77 copy
"$(ASSEMBLY).dll" $(OUTDIR
)
78 copy
"$(BINDING).dll" $(OUTDIR
)
79 copy
"$(ZLIB_LIB_DIR)\zdll.lib"
80 copy
"$(ZLIB_BIN_DIR)\zlib1.dll" $(OUTDIR
)
83 -@erase XapianSharp.snk
84 -@erase AssemblyInfo.cs
85 -@erase
"$(BINDING).dll"
86 -@erase
"$(OUTDIR)\$(BINDING).dll"
87 -@erase
"$(BINDING).dll.manifest"
88 -@erase
"$(ASSEMBLY).dll"
89 -@erase
"$(OUTDIR)\$(ASSEMBLY).dll"
90 -@erase
"$(ASSEMBLY).dll.manifest"
91 -@erase
"SmokeTest.exe"
92 -@erase
"$(OUTDIR)\SmokeTest.exe"
93 -@erase xapian_wrap.obj
101 -@erase xapian_wrap.
cc
102 -@erase xapian_wrap.h
103 -@erase
$(XAPIAN_SWIG_CSHARP_SRCS
)
106 copy SmokeTest.exe
"$(OUTDIR)\SmokeTest.exe"
114 if not exist
"$(OUTDIR)\dist\$(NULL)" mkdir
"$(OUTDIR)\dist"
115 if not exist
"$(OUTDIR)\dist\docs/$(NULL)" mkdir
"$(OUTDIR)\dist\docs"
116 if not exist
"$(OUTDIR)\dist\docs\examples/$(NULL)" mkdir
"$(OUTDIR)\dist\docs\examples"
117 copy
"$(OUTDIR)\_XapianSharp.dll" "$(OUTDIR)\dist"
118 copy
"$(OUTDIR)\XapianCSharp.dll" "$(OUTDIR)\dist"
119 if exist docs copy docs\
*.htm
* "$(OUTDIR)\dist\docs"
120 if exist docs\examples copy docs\examples\
*.
* "$(OUTDIR)\dist\docs\examples"
123 if not exist
"$(OUTDIR)/$(NULL)" mkdir
"$(OUTDIR)"
128 "$(ASSEMBLY).dll": $(XAPIAN_SWIG_CSHARP_SRCS
) AssemblyInfo.cs XapianSharp.snk
"$(OUTDIR)" $(BINDING
).dll
129 $(CSC
) -unsafe
-target
:library
-out
:"$(ASSEMBLY).dll" \
130 $(XAPIAN_SWIG_CSHARP_SRCS
) AssemblyInfo.cs
132 AssemblyInfo.cs
: AssemblyInfo.cs.in
"$(XAPIAN_CORE_REL_CSHARP)\configure.ac"
133 $(PERL_EXE
) "$(XAPIAN_CORE_REL_CSHARP)\win32\genversion.pl" "$(XAPIAN_CORE_REL_CSHARP)\configure.ac" AssemblyInfo.cs.in AssemblyInfo.cs
135 CPP_PROJ
=$(CPPFLAGS_EXTRA
) /GR \
136 /I
"$(XAPIAN_CORE_REL_CSHARP)" /I
"$(XAPIAN_CORE_REL_CSHARP)\include" \
137 /I
"." /Fo
"$(INTDIR)\\" /Tp
$(INPUTNAME
)
139 ALL_LINK32_FLAGS
=$(LINK32_FLAGS
) $(XAPIAN_LIBS
)
141 "$(BINDING).dll" : "$(OUTDIR)" xapian_wrap.obj
".\version.res"
143 $(ALL_LINK32_FLAGS
) /DLL
/out
:"$(BINDING).dll" xapian_wrap.obj
".\version.res"
147 !IF
"$(SWIGBUILD)" == "1"
148 xapian_wrap.
cc xapian_wrap.h
$(XAPIAN_SWIG_CSHARP_SRCS
): util.i ..\xapian.i
149 # Make sure that we don't package stale generated sources in the
150 # case where SWIG changes its mind as to which files it generates.
151 -@erase
$(XAPIAN_SWIG_CSHARP_SRCS
)
152 $(SWIG
) $(SWIG_FLAGS
) -I
$(XAPIAN_CORE_REL_CSHARP
)\
include -I..\generic \
153 -csharp
-namespace Xapian
-module Xapian
-dllimport
$(BINDING
) \
154 -c
++ -o xapian_wrap.
cc ..\xapian.i
161 ".\version.res": version.rc
163 /I
"$(XAPIAN_CORE_REL_CSHARP)\include" \
167 xapian_wrap.obj
: xapian_wrap.
cc
172 SmokeTest.exe
: SmokeTest.cs
$(ASSEMBLY
).dll
$(BINDING
).dll
173 $(CSC
) -unsafe
-target
:exe
-out
:SmokeTest.exe SmokeTest.cs
-r
:$(ASSEMBLY
).dll