1 # To build Linguistica, execute "make".
2 # Run "make V=1" to see the actual commands being run.
3 # See ./README for more information.
6 # Define CXX to the version of g++ you prefer to use.
8 # Define CFLAGS with flags to pass to g++ during compilation
11 # Define LDFLAGS with flags to pass to g++ during linking.
13 # Define NO_PKGCONFIG to disable use of pkg-config during the build
14 # (e.g. if /usr/lib/pkgconfig/QtCore.pc contains nonsense).
16 # Define MOC to the version of the Qt meta-object compiler command
17 # you prefer to use (e.g. moc-qt4).
19 # Define UIC to the version of the Qt user-interface compiler you
20 # prefer to use (e.g. uic-qt4).
22 # Define RCC to the version of the Qt resource compiler you prefer
25 # Define NO_GRAPHVIZ to disable the morphological finite-state
26 # machine graphical display.
28 # Define GRAPHVIZ_LIB to flags to link to and GRAPHVIZ_CFLAGS to
29 # flags to compile with the GraphVizContext library. Example:
30 # GRAPHVIZ_LIB = -L/usr/lib/graphviz -Wl,-rpath,/usr/lib/graphviz -lgvc
31 # GRAPHVIZ_CFLAGS = -I/usr/include/graphviz
33 # Define QT_LIB to flags to link and QT_CFLAGS to flags to
34 # compile with Qt 4, including the QtGui, Qt3Support, and QtXml
36 # QT_LIB = -lQt3Support -lQtGui -lQtNetwork -lQtSql -lQtXml -lQtCore
37 # QT_CFLAGS = -DQT_SHARED -DQT3_SUPPORT -I/usr/include/qt4 \
38 # -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore \
39 # -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtNetwork \
40 # -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml
42 CFLAGS
= -g
-O2
-Wall
-W
49 QT_LIB
= -lQt3Support
-lQtGui
-lQtXml
-lQtCore
50 QT_CFLAGS
= -DQT_SHARED
-DQT3_SUPPORT
-I
/usr
/include/qt4 \
51 -I
/usr
/include/qt4
/QtGui
-I
/usr
/include/qt4
/QtCore \
52 -I
/usr
/include/qt4
/Qt3Support
-I
/usr
/include/qt4
/QtXml
53 GRAPHVIZ_LIB
= -L
/usr
/lib
/graphviz
-Wl
,-rpath
,/usr
/lib
/graphviz
-lgvc
54 GRAPHVIZ_CFLAGS
= -I
/usr
/include/graphviz
56 ifeq ($(shell type pkg-config
> /dev
/null
2>&1 || echo n
),n
)
57 NO_PKGCONFIG
= YesUnfortunately
64 $(error Run “make NO_PKGCONFIG
=YesPlease” to disable use of pkg-config
)
66 define find_qt_command
67 $(1) := $$(shell pkg-config
--print-errors \
68 --variable
=$(2)_location QtCore
)
70 ifeq ($$(shell type
"$$($(1))" > /dev
/null || echo n
),n
)
74 $(eval
$(call find_qt_command
,MOC
,moc
))
75 $(eval
$(call find_qt_command
,UIC
,uic
))
77 QT_LIB
:= $(shell pkg-config
--print-errors \
78 --libs QtGui Qt3Support QtXml QtCore
)
79 QT_CFLAGS
:= $(shell pkg-config
--print-errors \
80 --cflags QtGui Qt3Support QtXml QtCore
) \
83 ifeq ($(shell pkg-config
--exists libgvc || echo n
),n
)
84 NO_GRAPHVIZ
= YesUnfortunately
88 GRAPHVIZ_LIB
:= $(shell pkg-config
--print-errors
--libs libgvc
)
89 GRAPHVIZ_CFLAGS
:= $(shell pkg-config
--print-errors
--cflags libgvc
)
96 ALL_GRAPHVIZ_CFLAGS
:=
98 ALL_GRAPHVIZ_CFLAGS ?
= $(GRAPHVIZ_CFLAGS
) -DUSE_GRAPHVIZ
102 CFLAGS
:= $(CXXFLAGS
)
105 # The compiler should not rely on strict aliasing rules,
106 # since QMap violates them.
108 ALL_CFLAGS ?
= $(CFLAGS
) -Iinclude
-fno-strict-aliasing \
109 $(QT_CFLAGS
) $(ALL_GRAPHVIZ_CFLAGS
)
110 ALL_LDFLAGS ?
= $(LDFLAGS
)
111 LIBS ?
= $(GRAPHVIZ_LIB
) $(QT_LIB
)
114 OBJECTS
+= Alignment.o
115 OBJECTS
+= Allomorphy.o
117 OBJECTS
+= BiphoneCollection.o
118 OBJECTS
+= canvasdialog.o
120 OBJECTS
+= cMTModel1.o
121 OBJECTS
+= cMTModel2Norm.o
122 OBJECTS
+= CommandLine.o
123 OBJECTS
+= CompareFunc.o
124 OBJECTS
+= Compound.o
125 OBJECTS
+= CompoundCollection.o
126 OBJECTS
+= corpusviewdialog.o
127 OBJECTS
+= CorpusWord.o
128 OBJECTS
+= CorpusWordCollection.o
130 OBJECTS
+= DCNcorpussyl.o
131 OBJECTS
+= DCNdcnword.o
132 OBJECTS
+= DCNgrammar.o
133 OBJECTS
+= DCNgrammarsyl.o
134 OBJECTS
+= DCNlearning.o
135 OBJECTS
+= DCNlearningsyl.o
136 OBJECTS
+= DCNnetwork.o
137 OBJECTS
+= DCNnetworksyl.o
138 OBJECTS
+= DCNsnetwork.o
139 OBJECTS
+= DescriptionLength.o
140 OBJECTS
+= DLHistory.o
141 OBJECTS
+= EarleyParser.o
143 OBJECTS
+= exportwizard.o
144 OBJECTS
+= exportwizard_exporting.o
146 OBJECTS
+= GrammarRule.o
147 OBJECTS
+= GraphicView.o
148 OBJECTS
+= GUI_Lexicon.o
149 OBJECTS
+= GUIclasses.o
150 OBJECTS
+= helpaboutdialog.o
153 OBJECTS
+= Lexicon_Allomorphy.o
154 OBJECTS
+= Lexicon_Compounds.o
155 OBJECTS
+= linepropertiesdialog.o
156 OBJECTS
+= linguisticamainwindow.o
157 OBJECTS
+= linguisticamainwindow_collectionview.o
158 OBJECTS
+= linguisticamainwindow_commandline.o
159 OBJECTS
+= linguisticamainwindow_DCN.o
160 OBJECTS
+= linguisticamainwindow_goldstandard.o
161 OBJECTS
+= linguisticamainwindow_graphicdisplay.o
162 OBJECTS
+= linguisticamainwindow_preferences.o
163 OBJECTS
+= linguisticamainwindow_treeview.o
165 OBJECTS
+= LinkerCollection.o
166 OBJECTS
+= listbuilderdialog.o
168 OBJECTS
+= LPreferences.o
170 OBJECTS
+= MiniLexicon.o
171 OBJECTS
+= MiniLexicon_Allomorphy.o
172 OBJECTS
+= MiniLexicon_CheckAffixes.o
173 OBJECTS
+= MiniLexicon_Core.o
174 OBJECTS
+= MiniLexicon_SingletonSignatures.o
175 OBJECTS
+= MiniLexicon_SuccessorFreqs.o
176 OBJECTS
+= MonteCarlo.o
177 OBJECTS
+= Morpheme.o
178 OBJECTS
+= MorphemeCollection.o
181 OBJECTS
+= PhoneCollection.o
182 OBJECTS
+= Phonology.o
184 OBJECTS
+= POSCollection.o
185 OBJECTS
+= preferencesdialog.o
187 OBJECTS
+= PrefixCollection.o
188 OBJECTS
+= propertiesdialog.o
189 OBJECTS
+= Sequencer.o
190 OBJECTS
+= Signature.o
191 OBJECTS
+= SignatureCollection.o
192 OBJECTS
+= SignatureCollection_PartsOfSpeech.o
194 OBJECTS
+= SparseIntVector.o
195 OBJECTS
+= SparseVector.o
196 OBJECTS
+= StateEmitHMM.o
199 OBJECTS
+= Stem_EncodingLength.o
200 OBJECTS
+= Stem_Phonology.o
201 OBJECTS
+= StemCollection.o
202 OBJECTS
+= StemListViewItem.o
203 OBJECTS
+= StringEditGrid.o
205 OBJECTS
+= SuffixCollection.o
206 OBJECTS
+= Template.o
207 OBJECTS
+= TemplateCollection.o
208 OBJECTS
+= TerminalRuleCollection.o
209 OBJECTS
+= TreeViewItem.o
211 OBJECTS
+= verifydialog.o
213 OBJECTS
+= VeryLong.o
215 OBJECTS
+= WordCollection.o
217 include string
/Makefile
221 OBJECTS
+= moc_canvasdialog.o
222 OBJECTS
+= moc_corpusviewdialog.o
223 OBJECTS
+= moc_exportwizard.o
224 OBJECTS
+= moc_GraphicView.o
225 OBJECTS
+= moc_helpaboutdialog.o
226 OBJECTS
+= moc_linepropertiesdialog.o
227 OBJECTS
+= moc_linguisticamainwindow.o
228 OBJECTS
+= moc_listbuilderdialog.o
229 OBJECTS
+= moc_preferencesdialog.o
230 OBJECTS
+= moc_propertiesdialog.o
231 OBJECTS
+= moc_verifydialog.o
233 OBJECTS
+= qrc_linguistica.o
235 RESOURCES
+= images
/splash.png
236 RESOURCES
+= images
/new.xpm
237 RESOURCES
+= images
/reload.xpm
238 RESOURCES
+= images
/save.xpm
239 RESOURCES
+= images
/open.xpm
240 RESOURCES
+= images
/favicon.xpm
249 quiet_link
= @echo
" LINK" $@
&&
250 quiet_compile
= @echo
" CXX" $@
&&
251 quiet_metaobject
= @echo
" MOC" $@
&&
252 quiet_resource
= @echo
" RCC" $@
&&
253 quiet_uiheader
= @echo
" UIC" $@
&&
256 linguistica
: $(OBJECTS
)
257 $(quiet_link
) $(CXX
) -o
$@
$(OBJECTS
) $(ALL_LDFLAGS
) $(LIBS
)
259 dep_file
= $(dir $@
).
$(notdir $@
).d
260 dep_args
= -MF
$(dep_file
) -MMD
-MP
263 $(quiet_compile
) $(CXX
) -c
$< -o
$@
$(dep_args
) $(ALL_CFLAGS
)
265 dep_files
:= $(wildcard .
*.d
)
266 ifneq ($(dep_files
),)
271 $(quiet_metaobject
) $(MOC
) -o
$@
$<
273 qrc_linguistica.
cpp: images
/linguistica.qrc
$(RESOURCES
)
274 $(quiet_resource
) $(RCC
) -o
$@
$< -name linguistica
276 $(OBJECTS
): ui_canvasdialogbase.h
277 $(OBJECTS
): ui_corpusviewdialogbase.h
278 $(OBJECTS
): ui_exportwizardbase.h
279 $(OBJECTS
): ui_helpaboutdialogbase.h
280 $(OBJECTS
): ui_linepropertiesdialogbase.h
281 $(OBJECTS
): ui_linguisticamainwindowbase.h
282 $(OBJECTS
): ui_listbuilderdialogbase.h
283 $(OBJECTS
): ui_preferencesdialogbase.h
284 $(OBJECTS
): ui_propertiesdialogbase.h
285 $(OBJECTS
): ui_verifydialogbase.h
288 $(quiet_uiheader
) $(UIC
) -o
$@
$<
290 linguistica.app
: linguistica macosx
/Info.plist macosx
/linguistica.icns
292 mkdir
-p
$@
+/Contents
/MacOS
293 mkdir
-p
$@
+/Contents
/Resources
294 cp macosx
/Info.plist
$@
+/Contents
295 cp macosx
/linguistica.icns
$@
+/Contents
/Resources
296 cp linguistica
$@
+/Contents
/MacOS
306 rm -rf linguistica.app linguistica.app
+