-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
364 lines (294 loc) · 12.6 KB
/
Makefile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
#############################################################################
# Makefile for building: $(BIN_DIR)/lekho
# Generated by qmake (1.01a) on: Mon Sep 2 22:03:39 2002
# Project: Lekho.pro
# Template: app
# Command: $(QMAKE) Lekho.pro
#############################################################################
#### change the following four directories to whatever you want ####
#### leaving them as is won't harm you unless you already have ####
#### the directory $(HOME)/C++/Lekho/ with something valuable #####
#LEKHO_DIR = $(HOME)/C++/Lekho/
LEKHO_DIR = /tmp/lekho/
OBJ_DIR = $(LEKHO_DIR)/obj/
#BIN_DIR = $(LEKHO_DIR)/bin/
BIN_DIR = $(HOME)/C++/Lekho/bin/
#works for SuSE....
INSTALL_DIR = /usr/local/bin/
FONTS_DIR = /usr/X11R6/lib/X11/fonts/truetype/
#LIB_DIR = /usr/local/lib/lekho/
LIB_DIR = /usr/local/share/lekho/
################# NO NEED TO CHANGE BEYOND THIS POINT #######################
####### Compiler, tools and options
CC = gcc
CXX = g++
LEX = flex
YACC = yacc
CFLAGS = -pipe -Wall -W -g -O4
CXXFLAGS = -pipe -Wall -W -g -O4
#CFLAGS = -pipe -Wall -W -O3
#CXXFLAGS = -pipe -Wall -W -O3
LEXFLAGS =
YACCFLAGS= -d
INCPATH = -IGui -IBanglaLetter -IBanglaLine -IBanglaDocument -IBanglaTextEdit -IBanglaSegment -IFontConverter -ICodeTreeElement -IBanan -ISyntaxHighlighting -IParser -Iinclude -I$(QTDIR)/include -I$(QTDIR)/mkspecs/default
LINK = g++
LFLAGS =
LIBS = $(SUBLIBS) -Wl,-rpath,$(QTDIR)/lib -L$(QTDIR)/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm
AR = ar cqs
RANLIB =
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
QMAKE = qmake
TAR = tar -cf
GZIP = gzip -9f
COPY = cp -f
COPY_FILE= $(COPY) -p
COPY_DIR = $(COPY) -pR
DEL_FILE = rm -f
DEL_DIR = rmdir
MOVE = mv
####### Output directory
OBJECTS_DIR = $(OBJ_DIR)/
####### Files
HEADERS = include/license.h \
Gui/application.h \
Gui/FindDialog.h \
Gui/SpellDialog.h \
BanglaLine/BanglaLine.h \
BanglaLetter/BanglaLetter.h \
BanglaDocument/BanglaDocument.h \
BanglaTextEdit/BanglaTextEdit.h \
BanglaTextEdit/BanglaLineEdit.h \
BanglaTextEdit/LekhoRedoUndo.h \
BanglaSegment/BanglaSegment.h \
FontConverter/FontConverter.h \
FontConverter/LatexConverter.h \
CodeTreeElement/CodeTreeElement.h \
Banan/SearchDictionary.h \
SyntaxHighlighting/Highlight.h \
include/preferences.h \
include/lekhoprefs.h \
include/bangla.h \
include/startup.h \
Parser/parser.h
SOURCES = include/license.cpp \
Gui/main.cpp \
Gui/application.cpp \
Gui/FindDialog.cpp \
Gui/SpellDialog.cpp \
BanglaLine/BanglaLine.cpp \
BanglaLetter/BanglaLetter.cpp \
BanglaDocument/BanglaDocument.cpp \
BanglaTextEdit/BanglaTextEdit.cpp \
BanglaTextEdit/BanglaLineEdit.cpp \
BanglaTextEdit/LekhoRedoUndo.cpp \
BanglaSegment/BanglaSegment.cpp \
FontConverter/FontConverter.cpp \
FontConverter/LatexConverter.cpp \
CodeTreeElement/CodeTreeElement.cpp \
Banan/SearchDictionary.cpp \
SyntaxHighlighting/Highlight.cpp \
include/preferences.cpp \
include/lekhoprefs.cpp \
include/bangla.cpp \
include/startup.cpp \
Parser/parser.cpp
OBJECTS = $(OBJ_DIR)/license.o \
$(OBJ_DIR)/main.o \
$(OBJ_DIR)/application.o \
$(OBJ_DIR)/FindDialog.o \
$(OBJ_DIR)/SpellDialog.o \
$(OBJ_DIR)/BanglaLine.o \
$(OBJ_DIR)/BanglaLetter.o \
$(OBJ_DIR)/BanglaDocument.o \
$(OBJ_DIR)/BanglaTextEdit.o \
$(OBJ_DIR)/BanglaLineEdit.o \
$(OBJ_DIR)/LekhoRedoUndo.o \
$(OBJ_DIR)/BanglaSegment.o \
$(OBJ_DIR)/FontConverter.o \
$(OBJ_DIR)/LatexConverter.o \
$(OBJ_DIR)/CodeTreeElement.o \
$(OBJ_DIR)/SearchDictionary.o \
$(OBJ_DIR)/Highlight.o \
$(OBJ_DIR)/preferences.o \
$(OBJ_DIR)/lekhoprefs.o \
$(OBJ_DIR)/bangla.o \
$(OBJ_DIR)/startup.o \
$(OBJ_DIR)/parser.o
FORMS =
UICDECLS =
UICIMPLS =
SRCMOC = Gui/moc_application.cpp \
Gui/moc_FindDialog.cpp \
Gui/moc_SpellDialog.cpp \
BanglaTextEdit/moc_BanglaTextEdit.cpp \
BanglaTextEdit/moc_BanglaLineEdit.cpp
OBJMOC = $(OBJ_DIR)/moc_application.o \
$(OBJ_DIR)/moc_FindDialog.o \
$(OBJ_DIR)/moc_SpellDialog.o \
$(OBJ_DIR)/moc_BanglaTextEdit.o \
$(OBJ_DIR)/moc_BanglaLineEdit.o
DIST =
QMAKE_TARGET = lekho
DESTDIR = $(BIN_DIR)/
TARGET = $(BIN_DIR)/lekho
first: all
####### Implicit rules
.SUFFIXES: .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
####### Build rules
all: Makefile $(TARGET)
$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
touch include/license.cpp
test -d $(BIN_DIR)/ || mkdir -p $(BIN_DIR)/
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)
mocables: $(SRCMOC)
$(MOC):
( cd $(QTDIR)/src/moc ; $(MAKE) )
Makefile: Lekho.pro
# $(QMAKE) Lekho.pro
qmake:
@$(QMAKE) Lekho.pro
dist:
@mkdir -p $(OBJ_DIR)/lekho && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) $(OBJ_DIR)/lekho/ && ( cd `dirname $(OBJ_DIR)/lekho` && $(TAR) lekho.tar lekho && $(GZIP) lekho.tar ) && mv `dirname $(OBJ_DIR)/lekho`/lekho.tar.gz . && rm -rf $(OBJ_DIR)/lekho
mocclean:
-rm -f $(OBJMOC)
-rm -f $(SRCMOC)
uiclean:
clean: mocclean
-rm -f $(OBJECTS)
-rm -f *~ core *.core
####### Sub-libraries
distclean: clean
-rm -f $(BIN_DIR)/$(TARGET) $(TARGET)
FORCE:
####### Compile
$(OBJ_DIR)/main.o: Gui/main.cpp Gui/application.h Banan/SearchDictionary.h include/license.h
test -d $(OBJ_DIR)/ || mkdir -p $(OBJ_DIR)/
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/main.o Gui/main.cpp
$(OBJ_DIR)/application.o: Gui/application.cpp Gui/application.h \
include/bangla.h \
include/startup.h \
Gui/lekho.xpm \
Gui/filesave.xpm \
Gui/fileopen.xpm \
Gui/fileprint.xpm \
Gui/findinfile.xpm \
Gui/spell.xpm \
Gui/undoxpm.xpm \
Gui/redoxpm.xpm \
include/license.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/application.o Gui/application.cpp
$(OBJ_DIR)/license.o: include/license.cpp include/license.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/license.o include/license.cpp
$(OBJ_DIR)/FindDialog.o: Gui/FindDialog.cpp Gui/FindDialog.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/FindDialog.o Gui/FindDialog.cpp
$(OBJ_DIR)/SpellDialog.o: Gui/SpellDialog.cpp Gui/SpellDialog.h BanglaTextEdit/BanglaLineEdit.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/SpellDialog.o Gui/SpellDialog.cpp
$(OBJ_DIR)/SearchDictionary.o: Banan/SearchDictionary.cpp Banan/SearchDictionary.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/SearchDictionary.o Banan/SearchDictionary.cpp
$(OBJ_DIR)/Highlight.o: SyntaxHighlighting/Highlight.cpp SyntaxHighlighting/Highlight.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/Highlight.o SyntaxHighlighting/Highlight.cpp
$(OBJ_DIR)/BanglaLine.o: BanglaLine/BanglaLine.cpp BanglaLine/BanglaLine.h BanglaLetter/BanglaLetter.h include/bangla.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/BanglaLine.o BanglaLine/BanglaLine.cpp
$(OBJ_DIR)/BanglaLetter.o: BanglaLetter/BanglaLetter.cpp BanglaLetter/BanglaLetter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/BanglaLetter.o BanglaLetter/BanglaLetter.cpp
$(OBJ_DIR)/BanglaDocument.o: BanglaDocument/BanglaDocument.cpp BanglaDocument/BanglaDocument.h BanglaLine/BanglaLine.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/BanglaDocument.o BanglaDocument/BanglaDocument.cpp
$(OBJ_DIR)/BanglaTextEdit.o: BanglaTextEdit/BanglaTextEdit.cpp BanglaTextEdit/BanglaTextEdit.h BanglaTextEdit/LekhoRedoUndo.h include/bangla.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/BanglaTextEdit.o BanglaTextEdit/BanglaTextEdit.cpp
$(OBJ_DIR)/BanglaLineEdit.o: BanglaTextEdit/BanglaLineEdit.cpp BanglaTextEdit/BanglaLineEdit.h BanglaTextEdit/BanglaTextEdit.cpp BanglaTextEdit/BanglaTextEdit.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/BanglaLineEdit.o BanglaTextEdit/BanglaLineEdit.cpp
$(OBJ_DIR)/LekhoRedoUndo.o: BanglaTextEdit/LekhoRedoUndo.cpp BanglaTextEdit/LekhoRedoUndo.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/LekhoRedoUndo.o BanglaTextEdit/LekhoRedoUndo.cpp
$(OBJ_DIR)/BanglaSegment.o: BanglaSegment/BanglaSegment.cpp BanglaSegment/BanglaSegment.h include/bangla.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/BanglaSegment.o BanglaSegment/BanglaSegment.cpp
$(OBJ_DIR)/FontConverter.o: FontConverter/FontConverter.cpp FontConverter/FontConverter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/FontConverter.o FontConverter/FontConverter.cpp
$(OBJ_DIR)/LatexConverter.o: FontConverter/LatexConverter.cpp FontConverter/LatexConverter.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/LatexConverter.o FontConverter/LatexConverter.cpp
$(OBJ_DIR)/CodeTreeElement.o: CodeTreeElement/CodeTreeElement.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/CodeTreeElement.o CodeTreeElement/CodeTreeElement.cpp
$(OBJ_DIR)/lekhoprefs.o: include/lekhoprefs.cpp include/lekhoprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/lekhoprefs.o include/lekhoprefs.cpp
$(OBJ_DIR)/bangla.o: include/bangla.cpp include/bangla.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/bangla.o include/bangla.cpp
$(OBJ_DIR)/startup.o: include/startup.cpp include/startup.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/startup.o include/startup.cpp
$(OBJ_DIR)/preferences.o: include/preferences.cpp include/preferences.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/preferences.o include/preferences.cpp
$(OBJ_DIR)/parser.o: Parser/parser.cpp Parser/parser.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/parser.o Parser/parser.cpp
$(OBJ_DIR)/moc_application.o: Gui/moc_application.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/moc_application.o Gui/moc_application.cpp
$(OBJ_DIR)/moc_FindDialog.o: Gui/moc_FindDialog.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/moc_FindDialog.o Gui/moc_FindDialog.cpp
$(OBJ_DIR)/moc_SpellDialog.o: Gui/moc_SpellDialog.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/moc_SpellDialog.o Gui/moc_SpellDialog.cpp
$(OBJ_DIR)/moc_BanglaTextEdit.o: BanglaTextEdit/moc_BanglaTextEdit.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/moc_BanglaTextEdit.o BanglaTextEdit/moc_BanglaTextEdit.cpp
$(OBJ_DIR)/moc_BanglaLineEdit.o: BanglaTextEdit/moc_BanglaLineEdit.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $(OBJ_DIR)/moc_BanglaLineEdit.o BanglaTextEdit/moc_BanglaLineEdit.cpp
#the file startup.cpp is made automatically by a small c program
#include/startup.cpp: .lekho/shor.txt .lekho/kar.txt .lekho/jukto.txt .lekho/adarshalipi.txt .lekho/bangtex.txt
# $(MAKESTARTUP) .lekho/shor.txt .lekho/kar.txt .lekho/jukto.txt .lekho/adarshalipi.txt .lekho/bangtex.txt include/startup.cpp
Gui/moc_application.cpp: $(MOC) Gui/application.h
$(MOC) Gui/application.h -o Gui/moc_application.cpp
Gui/moc_FindDialog.cpp: $(MOC) Gui/FindDialog.h
$(MOC) Gui/FindDialog.h -o Gui/moc_FindDialog.cpp
Gui/moc_SpellDialog.cpp: $(MOC) Gui/SpellDialog.h
$(MOC) Gui/SpellDialog.h -o Gui/moc_SpellDialog.cpp
BanglaTextEdit/moc_BanglaTextEdit.cpp: $(MOC) BanglaTextEdit/BanglaTextEdit.h
$(MOC) BanglaTextEdit/BanglaTextEdit.h -o BanglaTextEdit/moc_BanglaTextEdit.cpp
BanglaTextEdit/moc_BanglaLineEdit.cpp: $(MOC) BanglaTextEdit/BanglaLineEdit.h
$(MOC) BanglaTextEdit/BanglaLineEdit.h -o BanglaTextEdit/moc_BanglaLineEdit.cpp
####### Install
install: all
@echo "##########################################"
@echo
@echo "Making $(INSTALL_DIR) if necessary"
@test -d $(INSTALL_DIR)/ || mkdir -p $(INSTALL_DIR)/
@echo "Copying the executable file lekho"
cp -f $(BIN_DIR)/lekho $(INSTALL_DIR)/lekho
@echo "Copying the initialisation file .lekhorc"
cp -f $(PWD)/.lekhorc $(HOME)/.lekhorc
@echo "Copying the initialisation directory .lekho"
cp -r -f $(PWD)/.lekho $(HOME)/.lekho
@echo "Copying the dictionary"
cp -r -f $(PWD)/Dict $(LIB_DIR)/Dict
@echo "Copying the examples directory"
cp -r -f $(PWD)/examples $(LIB_DIR)/examples
@echo "Copying the fonts"
cp -r -f $(PWD)/fonts/* $(FONTS_DIR)
@echo "To install the fonts "
@echo "a) run kfontinst or whatever your distro supports"
@echo "b) restart your GUI"
@echo "c) wait a bit :) "
@echo
@echo "Making softlinks from $(HOME)"
ln -s -f $(LIB_DIR)/Dict $(HOME)/Dict
ln -s -f $(INSTALL_DIR)/lekho $(HOME)/lekho
#ln -s -f $(INSTALL_DIR)/.lekho $(HOME)/.lekho
#ln -s -f $(INSTALL_DIR)/.lekhorc $(HOME)/.lekhorc
@echo
@echo "Install complete ! #####################"
@echo "You should be all set. Type lekho"
@echo "Lekho should start up with defaults"
@echo "Look at the help.txt file in the examples directory to get started"
@echo "Look at the Personalisation section of the README file to learn"
@echo "how to change .lekhorc to suit your taste"
@echo "Computer-e bangla lekha upobhog korun !"
@echo
uninstall:
@echo "Deleting lekho executable";
@rm -i $(INSTALL_DIR)/lekho
@echo "Remove the ttf fonts manually if you wish";