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
$(VERSION_SUFFIX
)
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 \
42 NumberValueRangeProcessor.cs \
54 StemImplementation.cs \
56 StringValueRangeProcessor.cs \
57 SWIGTYPE_p_std__string.cs \
58 SWIGTYPE_p_std__vectorT_std__string_t.cs \
59 SWIGTYPE_p_std__vectorT_Xapian__Query_t.cs \
64 ValueRangeProcessor.cs \
71 ALL
: "$(ASSEMBLY).dll" SmokeTest.exe
"$(BINDING).dll"
72 $(MANIFEST
) "$(BINDING).dll.manifest" -outputresource
:"$(BINDING).dll;2"
73 copy
"$(ASSEMBLY).dll" $(OUTDIR
)
74 copy
"$(BINDING).dll" $(OUTDIR
)
75 copy
"$(ZLIB_LIB_DIR)\zdll.lib"
76 copy
"$(ZLIB_BIN_DIR)\zlib1.dll" $(OUTDIR
)
79 -@erase XapianSharp.snk
80 -@erase AssemblyInfo.cs
81 -@erase
"$(BINDING).dll"
82 -@erase
"$(OUTDIR)\$(BINDING).dll"
83 -@erase
"$(BINDING).dll.manifest"
84 -@erase
"$(ASSEMBLY).dll"
85 -@erase
"$(OUTDIR)\$(ASSEMBLY).dll"
86 -@erase
"$(ASSEMBLY).dll.manifest"
87 -@erase
"SmokeTest.exe"
88 -@erase
"$(OUTDIR)\SmokeTest.exe"
89 -@erase xapian_wrap.obj
97 -@erase xapian_wrap.
cc
99 -@erase
$(XAPIAN_SWIG_CSHARP_SRCS
)
102 copy SmokeTest.exe
"$(OUTDIR)\SmokeTest.exe"
110 if not exist
"$(OUTDIR)\dist\$(NULL)" mkdir
"$(OUTDIR)\dist"
111 if not exist
"$(OUTDIR)\dist\docs/$(NULL)" mkdir
"$(OUTDIR)\dist\docs"
112 if not exist
"$(OUTDIR)\dist\docs\examples/$(NULL)" mkdir
"$(OUTDIR)\dist\docs\examples"
113 copy
"$(OUTDIR)\_XapianSharp.dll" "$(OUTDIR)\dist"
114 copy
"$(OUTDIR)\XapianCSharp.dll" "$(OUTDIR)\dist"
115 if exist docs copy docs\
*.htm
* "$(OUTDIR)\dist\docs"
116 if exist docs\examples copy docs\examples\
*.
* "$(OUTDIR)\dist\docs\examples"
119 if not exist
"$(OUTDIR)/$(NULL)" mkdir
"$(OUTDIR)"
124 "$(ASSEMBLY).dll": $(XAPIAN_SWIG_CSHARP_SRCS
) AssemblyInfo.cs XapianSharp.snk
"$(OUTDIR)" $(BINDING
).dll
125 $(CSC
) -unsafe
-target
:library
-out
:"$(ASSEMBLY).dll" \
126 $(XAPIAN_SWIG_CSHARP_SRCS
) AssemblyInfo.cs
128 AssemblyInfo.cs
: AssemblyInfo.cs.in
"$(XAPIAN_CORE_REL_CSHARP)\configure.ac"
129 $(PERL_EXE
) "$(XAPIAN_CORE_REL_CSHARP)\win32\genversion.pl" "$(XAPIAN_CORE_REL_CSHARP)\configure.ac" AssemblyInfo.cs.in AssemblyInfo.cs
131 CPP_PROJ
=$(CPPFLAGS_EXTRA
) /GR \
132 /I
"$(XAPIAN_CORE_REL_CSHARP)" /I
"$(XAPIAN_CORE_REL_CSHARP)\include" \
133 /I
"." /Fo
"$(INTDIR)\\" /Tp
$(INPUTNAME
)
135 ALL_LINK32_FLAGS
=$(LINK32_FLAGS
) $(XAPIAN_LIBS
)
137 "$(BINDING).dll" : "$(OUTDIR)" xapian_wrap.obj
".\version.res"
139 $(ALL_LINK32_FLAGS
) /DLL
/out
:"$(BINDING).dll" xapian_wrap.obj
".\version.res"
143 !IF
"$(SWIGBUILD)" == "1"
144 xapian_wrap.
cc xapian_wrap.h
$(XAPIAN_SWIG_CSHARP_SRCS
): util.i ..\xapian.i
145 # Make sure that we don't package stale generated sources in the
146 # case where SWIG changes its mind as to which files it generates.
147 -@erase
$(XAPIAN_SWIG_CSHARP_SRCS
)
148 $(SWIG
) $(SWIG_FLAGS
) -I
$(XAPIAN_CORE_REL_CSHARP
)\
include -I..\generic \
149 -csharp
-namespace Xapian
-module Xapian
-dllimport
$(BINDING
) \
150 -c
++ -o xapian_wrap.
cc ..\xapian.i
157 ".\version.res": version.rc
159 /I
"$(XAPIAN_CORE_REL_CSHARP)\include" \
163 xapian_wrap.obj
: xapian_wrap.
cc
168 SmokeTest.exe
: SmokeTest.cs
$(ASSEMBLY
).dll
$(BINDING
).dll
169 $(CSC
) -unsafe
-target
:exe
-out
:SmokeTest.exe SmokeTest.cs
-r
:$(ASSEMBLY
).dll