Oops, fix a broken part of the patch
[beagle.git] / Util / Makefile.am
blob3256cd67c9b185cf96d828299f03e2b7212d6acd
1 # Warnings we don't want to see
2 # 0169 = The private field is never used
4 CSC = mcs -debug -nowarn:0169
5 CSFLAGS = -target:library
7 UTIL_TARGET = Util.dll
8 UTIL_TARGET_CONFIG = $(UTIL_TARGET).config
10 UI_UTIL_TARGET = UiUtil.dll
11 UI_UTIL_TARGET_CONFIG = $(UI_UTIL_TARGET).config
13 if OS_LINUX
14 CSFLAGS += -define:OS_LINUX
15 endif
17 if OS_FREEBSD
18 CSFLAGS += -define:OS_FREEBSD
19 endif
21 if ENABLE_WEBSERVICES
22 CSFLAGS += -define:ENABLE_WEBSERVICES
23 endif
25 GOOGLE_WSDL = $(srcdir)/GoogleSearch.wsdl
26 GOOGLE_CS   = GoogleSearch.cs
28 $(GOOGLE_CS): $(GOOGLE_WSDL)
29         wsdl -namespace:Beagle.Util -out:$@ $^
31 EXTSTR = ExternalStringsHack.cs
32 EXTSTR_IN = $(srcdir)/$(EXTSTR).in
33 $(EXTSTR): $(EXTSTR_IN)
34         sed     -e "s|\@prefix\@|$(prefix)|g"                   \
35                 -e "s|\@sysconfdir\@|$(sysconfdir)|g"           \
36                 -e "s|\@pkglibdir\@|$(pkglibdir)|g"             \
37                 -e "s|\@pkgdatadir\@|$(pkgdatadir)|g"           \
38                 -e "s|\@localstatedir\@|$(localstatedir)|g"     \
39                 -e "s|\@VERSION\@|$(VERSION)|g"                 \
40                 -e "s|\@GNOME_PREFIX\@|$(GNOME_PREFIX)|g"       \
41                 -e "s|\@KDE_PREFIX\@|$(KDE_PREFIX)|g"           \
42                 -e "s|\@SQLITE_MAJ_VER\@|$(SQLITE_MAJ_VER)|g"   \
43                 < $(EXTSTR_IN) > $@
45 UTIL_CSFILES =                                  \
46         $(srcdir)/ArrayFu.cs                    \
47         $(srcdir)/BetterBitArray.cs             \
48         $(srcdir)/EndianConverter.cs            \
49         $(srcdir)/camel.cs                      \
50         $(srcdir)/CommandLineFu.cs              \
51         $(srcdir)/Conf.cs                       \
52         $(srcdir)/DelayedTextWriter.cs          \
53         $(srcdir)/DigikamTags.cs                \
54         $(srcdir)/DirectoryWalker.cs            \
55         $(srcdir)/Evolution.cs                  \
56         $(srcdir)/ExceptionHandlingThread.cs    \
57         $(srcdir)/ExifData.cs                   \
58         $(srcdir)/ExtendedAttribute.cs          \
59         $(srcdir)/FileAdvise.cs                 \
60         $(srcdir)/FileSystem.cs                 \
61         $(srcdir)/FrequencyStatistics.cs        \
62         $(srcdir)/FSpotTools.cs                 \
63         $(srcdir)/GuidFu.cs                     \
64         $(srcdir)/ImBuddy.cs                    \
65         $(srcdir)/ImLog.cs                      \
66         $(srcdir)/Inotify.cs                    \
67         $(srcdir)/IoPriority.cs                 \
68         $(srcdir)/JpegHeader.cs                 \
69         $(srcdir)/KdeUtils.cs                   \
70         $(srcdir)/KonqHistoryUtil.cs            \
71         $(srcdir)/Log.cs                        \
72         $(srcdir)/Logger.cs                     \
73         $(srcdir)/MetadataStore.cs              \
74         $(srcdir)/Mozilla.cs                    \
75         $(srcdir)/MultiReader.cs                \
76         $(srcdir)/NautilusTools.cs              \
77         $(srcdir)/Note.cs                       \
78         $(srcdir)/PathFinder.cs                 \
79         $(srcdir)/PngHeader.cs                  \
80         $(srcdir)/PullingReader.cs              \
81         $(srcdir)/ReflectionFu.cs               \
82         $(srcdir)/Scheduler.cs                  \
83         $(srcdir)/SmallIntArray.cs              \
84         $(srcdir)/Stopwatch.cs                  \
85         $(srcdir)/StringFu.cs                   \
86         $(srcdir)/StringMatcher.cs              \
87         $(srcdir)/SystemInformation.cs          \
88         $(srcdir)/TeeTextWriter.cs              \
89         $(srcdir)/ThreadPond.cs                 \
90         $(srcdir)/Tiff.cs                       \
91         $(srcdir)/Timeline.cs                   \
92         $(srcdir)/TopScores.cs                  \
93         $(srcdir)/UnclosableStream.cs           \
94         $(srcdir)/UriFu.cs                      \
95         $(srcdir)/XdgMime.cs                    \
96         $(srcdir)/XmlFu.cs                      \
97         $(srcdir)/XmpFile.cs                    \
98         $(srcdir)/SemWeb/ForwardLogic.cs                \
99         $(srcdir)/SemWeb/KnowledgeModel.cs              \
100         $(srcdir)/SemWeb/MemoryStore.cs         \
101         $(srcdir)/SemWeb/N3Parser.cs                    \
102         $(srcdir)/SemWeb/N3Writer.cs                    \
103         $(srcdir)/SemWeb/NamespaceManager.cs            \
104         $(srcdir)/SemWeb/Query.cs                       \
105         $(srcdir)/SemWeb/RdfParser.cs                   \
106         $(srcdir)/SemWeb/RdfWriter.cs                   \
107         $(srcdir)/SemWeb/Reasoning.cs                   \
108         $(srcdir)/SemWeb/Resource.cs                    \
109         $(srcdir)/SemWeb/RSquary.cs                     \
110         $(srcdir)/SemWeb/RSquaryFilters.cs              \
111         $(srcdir)/SemWeb/Sparql.cs                      \
112         $(srcdir)/SemWeb/SQLStore.cs                    \
113         $(srcdir)/SemWeb/Statement.cs                   \
114         $(srcdir)/SemWeb/Store.cs                       \
115         $(srcdir)/SemWeb/UriMap.cs                      \
116         $(srcdir)/SemWeb/Util.cs                        \
117         $(srcdir)/SemWeb/XmlParser.cs                   \
118         $(srcdir)/SemWeb/XmlWriter.cs                   \
119         $(srcdir)/SemWeb/XPathSemWebNavigator.cs
122 if HAS_LIBCHM 
123 UTIL_CSFILES +=                                 \
124         $(srcdir)/ChmFile.cs
125 endif
127 UTIL_ASSEMBLIES =                               \
128         $(BEAGLED_LIBS)                         \
129         -r:System.Web.Services                  \
130         -r:System.Data                          \
131         -r:Mono.Data.SqliteClient               \
132         -r:Mono.Posix                           \
133         -r:System.Web                           \
134         -r:ICSharpCode.SharpZipLib
136 if ENABLE_GALAGO
137 UTIL_CSFILES +=                                 \
138         $(srcdir)/Galago.cs
140 UTIL_ASSEMBLIES +=                              \
141         $(GALAGO_LIBS)
142 endif
144 if ENABLE_INOTIFY
145 INOTIFY_EXE = Inotify.exe
146 CSFLAGS += -define:ENABLE_INOTIFY
147 else
148 INOTIFY_EXE =
149 endif
151 $(UTIL_TARGET): $(UTIL_CSFILES) $(GOOGLE_CS) $(EXTSTR)
152         $(CSC) -unsafe -out:$@ $(CSFLAGS) $^ $(UTIL_ASSEMBLIES)
154 UI_UTIL_CSFILES =                               \
155         $(srcdir)/CompatFileChooser.cs          \
156         $(srcdir)/GnomeFu.cs                    \
157         $(srcdir)/GtkUtils.cs                   \
158         $(srcdir)/HigMessageDialog.cs           \
159         $(srcdir)/XKeybinder.cs
161 UI_UTIL_ASSEMBLIES =                            \
162         $(BEAGLE_UI_LIBS)                       \
163         -r:Util.dll
165 $(UI_UTIL_TARGET): $(UI_UTIL_CSFILES) $(UTIL_TARGET)
166         $(CSC) -unsafe -out:$@ $(CSFLAGS) $(UI_UTIL_CSFILES) $(UI_UTIL_ASSEMBLIES)
168 INOTIFY_TEST_CSFILES =                          \
169         $(srcdir)/Inotify.cs                    \
170         $(srcdir)/Log.cs                        \
171         $(srcdir)/Logger.cs                     \
172         $(srcdir)/DelayedTextWriter.cs          \
173         $(srcdir)/TeeTextWriter.cs              \
174         $(srcdir)/DirectoryWalker.cs            \
175         $(srcdir)/FileSystem.cs                 \
176         $(srcdir)/ExceptionHandlingThread.cs
178 Inotify.exe: $(INOTIFY_TEST_CSFILES)
179         $(CSC) -unsafe -out:$@ $^ -r:Mono.Posix -define:INOTIFY_TEST -define:ENABLE_INOTIFY
181 ALL_TARGETS =                   \
182         $(UTIL_TARGET)          \
183         $(INOTIFY_EXE)
185 if ENABLE_GUI
186 ALL_TARGETS += $(UI_UTIL_TARGET)
187 endif
189 all: $(ALL_TARGETS)
191 install-data-local: $(ALL_TARGETS)
192         $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
193         $(INSTALL_DATA) $(UTIL_TARGET) $(UTIL_TARGET).mdb $(UTIL_TARGET_CONFIG) $(DESTDIR)$(pkglibdir)
194 if ENABLE_GUI
195         $(INSTALL_DATA) $(UI_UTIL_TARGET) $(UI_UTIL_TARGET).mdb $(srcdir)/$(UI_UTIL_TARGET_CONFIG) $(DESTDIR)$(pkglibdir)
196 endif
198 uninstall-local:
199         rm -f $(DESTDIR)$(pkglibdir)/$(UTIL_TARGET) $(DESTDIR)$(pkglibdir)/$(UTIL_TARGET).mdb $(DESTDIR)$(pkglibdir)/$(UTIL_TARGET_CONFIG)
200         rm -f $(DESTDIR)$(pkglibdir)/$(UI_UTIL_TARGET) $(DESTDIR)$(pkglibdir)/$(UI_UTIL_TARGET).mdb $(DESTDIR)$(pkglibdir)/$(UI_UTIL_TARGET_CONFIG)
203 COND_CS_FILES =                 \
204         $(srcdir)/ChmFile.cs    \
205         $(srcdir)/Galago.cs
207 EXTRA_DIST =                    \
208         $(GOOGLE_WSDL)          \
209         $(EXTSTR_IN)            \
210         $(UTIL_CSFILES)         \
211         $(UI_UTIL_CSFILES)      \
212         $(COND_CS_FILES)        \
213         UiUtil.dll.config       \
214         Util.dll.config.in      \
215         inotify-test
217 CLEANFILES =                    \
218         $(GOOGLE_CS)            \
219         $(EXTSTR)               \
220         $(UTIL_TARGET)          \
221         $(UTIL_TARGET).mdb      \
222         $(UI_UTIL_TARGET)       \
223         $(UI_UTIL_TARGET).mdb   \
224         Inotify.exe             \
225         Inotify.exe.mdb