summaryrefslogtreecommitdiffstats
path: root/src/Makefile.qt
blob: 1aaecff214d197e37b1e072c28741564d15666d2 (plain)
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
#############################################################################
# Makefile for building: kdiff3
# Generated by qmake (1.07a) (Qt 3.3.5) on: Sat Apr  8 20:11:51 2006
# Project:  kdiff3.pro
# Template: app
# Command: $(QMAKE) -o Makefile kdiff3.pro
#############################################################################

####### Compiler, tools and options

CC       = gcc
CXX      = g++
LEX      = flex
YACC     = yacc
CFLAGS   = -pipe -O2 -Wall -W -fPIC -D_REENTRANT  -DQT_NO_DEBUG -DTQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -D__USE_STD_IOSTREAM
CXXFLAGS = -pipe -O2 -Wall -W -fPIC -D_REENTRANT  -DQT_NO_DEBUG -DTQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -D__USE_STD_IOSTREAM
LEXFLAGS = 
YACCFLAGS= -d
INCPATH  = -I$(TQTDIR)/mkspecs/default -I. -Ikreplacements -I/usr/include -I$(TQTDIR)/include
LINK     = g++
LFLAGS   = 
LIBS     = $(SUBLIBS) -L/usr/lib/ -L$(TQTDIR)/lib/ -L/usr/X11R6/lib/ -lXext -lX11 -lm -lpthread
AR       = ar cqs
RANLIB   = 
MOC      = $(TQTDIR)/bin/moc
UIC      = $(TQTDIR)/bin/uic
QMAKE    = qmake
TAR      = tar -cf
GZIP     = gzip -9f
COPY     = cp -f
COPY_FILE= $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK  = ln -sf
DEL_DIR  = rmdir
MOVE     = mv -f
CHK_DIR_EXISTS= test -d
MKDIR    = mkdir -p

####### Output directory

OBJECTS_DIR = ./

####### Files

HEADERS = version.h \
		diff.h \
		difftextwindow.h \
		mergeresultwindow.h \
		kdiff3.h \
		merger.h \
		optiondialog.h \
		kreplacements/kreplacements.h \
		directorymergewindow.h \
		fileaccess.h \
		kdiff3_shell.h \
		kdiff3_part.h \
		smalldialogs.h
SOURCES = main.cpp \
		diff.cpp \
		difftextwindow.cpp \
		kdiff3.cpp \
		merger.cpp \
		mergeresultwindow.cpp \
		optiondialog.cpp \
		pdiff.cpp \
		directorymergewindow.cpp \
		fileaccess.cpp \
		smalldialogs.cpp \
		kdiff3_shell.cpp \
		kdiff3_part.cpp \
		gnudiff_analyze.cpp \
		gnudiff_io.cpp \
		gnudiff_xmalloc.cpp \
		common.cpp \
		kreplacements/kreplacements.cpp \
		kreplacements/ShellContextMenu.cpp
OBJECTS = main.o \
		diff.o \
		difftextwindow.o \
		kdiff3.o \
		merger.o \
		mergeresultwindow.o \
		optiondialog.o \
		pdiff.o \
		directorymergewindow.o \
		fileaccess.o \
		smalldialogs.o \
		kdiff3_shell.o \
		kdiff3_part.o \
		gnudiff_analyze.o \
		gnudiff_io.o \
		gnudiff_xmalloc.o \
		common.o \
		kreplacements.o \
		ShellContextMenu.o
FORMS = 
UICDECLS = 
UICIMPLS = 
SRCMOC   = moc_difftextwindow.cpp \
		moc_mergeresultwindow.cpp \
		moc_kdiff3.cpp \
		moc_optiondialog.cpp \
		kreplacements/moc_kreplacements.cpp \
		moc_directorymergewindow.cpp \
		moc_fileaccess.cpp \
		moc_kdiff3_shell.cpp \
		moc_kdiff3_part.cpp \
		moc_smalldialogs.cpp
OBJMOC = moc_difftextwindow.o \
		moc_mergeresultwindow.o \
		moc_kdiff3.o \
		moc_optiondialog.o \
		moc_kreplacements.o \
		moc_directorymergewindow.o \
		moc_fileaccess.o \
		moc_kdiff3_shell.o \
		moc_kdiff3_part.o \
		moc_smalldialogs.o
DIST	   = kdiff3.pro
QMAKE_TARGET = kdiff3
DESTDIR  = 
TARGET   = kdiff3

first: all
####### Implicit rules

.SUFFIXES: .c .o .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: $(TARGET)

$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC)  
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)

mocables: $(SRCMOC)
uicables: $(UICDECLS) $(UICIMPLS)

$(MOC): 
	( cd $(TQTDIR)/src/moc && $(MAKE) )

dist: 
	@mkdir -p .tmp/kdiff3 && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/kdiff3/ && ( cd `dirname .tmp/kdiff3` && $(TAR) kdiff3.tar kdiff3 && $(GZIP) kdiff3.tar ) && $(MOVE) `dirname .tmp/kdiff3`/kdiff3.tar.gz . && $(DEL_FILE) -r .tmp/kdiff3

mocclean:
	-$(DEL_FILE) $(OBJMOC)
	-$(DEL_FILE) $(SRCMOC)

uiclean:

yaccclean:
lexclean:
clean: mocclean
	-$(DEL_FILE) $(OBJECTS)
	-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
	-$(DEL_FILE) $(TARGET) $(TARGET)


FORCE:

####### Compile

main.o: main.cpp kdiff3_shell.h \
		version.h \
		optiondialog.h \
		common.h

diff.o: diff.cpp diff.h \
		fileaccess.h \
		optiondialog.h \
		common.h

difftextwindow.o: difftextwindow.cpp difftextwindow.h \
		merger.h \
		optiondialog.h \
		diff.h \
		common.h \
		fileaccess.h

kdiff3.o: kdiff3.cpp difftextwindow.h \
		mergeresultwindow.h \
		kdiff3.h \
		optiondialog.h \
		fileaccess.h \
		kdiff3_part.h \
		directorymergewindow.h \
		smalldialogs.h \
		xpm/downend.xpm \
		xpm/currentpos.xpm \
		xpm/down1arrow.xpm \
		xpm/down2arrow.xpm \
		xpm/upend.xpm \
		xpm/up1arrow.xpm \
		xpm/up2arrow.xpm \
		xpm/prevunsolved.xpm \
		xpm/nextunsolved.xpm \
		xpm/iconA.xpm \
		xpm/iconB.xpm \
		xpm/iconC.xpm \
		xpm/autoadvance.xpm \
		xpm/showwhitespace.xpm \
		xpm/showwhitespacechars.xpm \
		xpm/showlinenumbers.xpm \
		diff.h \
		common.h

merger.o: merger.cpp merger.h \
		diff.h \
		common.h \
		fileaccess.h \
		optiondialog.h

mergeresultwindow.o: mergeresultwindow.cpp mergeresultwindow.h \
		optiondialog.h \
		diff.h \
		common.h \
		fileaccess.h

optiondialog.o: optiondialog.cpp optiondialog.h \
		diff.h \
		smalldialogs.h \
		common.h \
		fileaccess.h

pdiff.o: pdiff.cpp difftextwindow.h \
		mergeresultwindow.h \
		directorymergewindow.h \
		smalldialogs.h \
		kdiff3.h \
		optiondialog.h \
		fileaccess.h \
		gnudiff_diff.h \
		diff.h \
		common.h \
		gnudiff_system.h

directorymergewindow.o: directorymergewindow.cpp directorymergewindow.h \
		optiondialog.h \
		xpm/link_arrow.xpm \
		xpm/file.xpm \
		xpm/folder.xpm \
		xpm/startmerge.xpm \
		xpm/showequalfiles.xpm \
		xpm/showfilesonlyina.xpm \
		xpm/showfilesonlyinb.xpm \
		xpm/showfilesonlyinc.xpm \
		common.h \
		fileaccess.h \
		diff.h

fileaccess.o: fileaccess.cpp fileaccess.h \
		optiondialog.h \
		common.h

smalldialogs.o: smalldialogs.cpp smalldialogs.h \
		optiondialog.h \
		diff.h \
		common.h \
		fileaccess.h

kdiff3_shell.o: kdiff3_shell.cpp kdiff3_shell.h \
		kdiff3.h \
		diff.h \
		common.h \
		fileaccess.h \
		optiondialog.h

kdiff3_part.o: kdiff3_part.cpp kdiff3_part.h \
		kdiff3.h \
		fileaccess.h \
		version.h \
		diff.h \
		common.h \
		optiondialog.h

gnudiff_analyze.o: gnudiff_analyze.cpp gnudiff_diff.h \
		gnudiff_system.h

gnudiff_io.o: gnudiff_io.cpp gnudiff_diff.h \
		gnudiff_system.h

gnudiff_xmalloc.o: gnudiff_xmalloc.cpp gnudiff_diff.h \
		gnudiff_system.h

common.o: common.cpp common.h

kreplacements.o: kreplacements/kreplacements.cpp kreplacements/kreplacements.h \
		common.h \
		xpm/fileopen.xpm \
		xpm/filesave.xpm \
		xpm/fileprint.xpm \
		kreplacements/kreplacements.moc
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o kreplacements.o kreplacements/kreplacements.cpp

ShellContextMenu.o: kreplacements/ShellContextMenu.cpp kreplacements/ShellContextMenu.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ShellContextMenu.o kreplacements/ShellContextMenu.cpp

moc_difftextwindow.o: moc_difftextwindow.cpp  difftextwindow.h diff.h \
		common.h \
		fileaccess.h \
		optiondialog.h

moc_mergeresultwindow.o: moc_mergeresultwindow.cpp  mergeresultwindow.h diff.h \
		common.h \
		fileaccess.h \
		optiondialog.h

moc_kdiff3.o: moc_kdiff3.cpp  kdiff3.h diff.h \
		common.h \
		fileaccess.h \
		optiondialog.h

moc_optiondialog.o: moc_optiondialog.cpp  optiondialog.h 

moc_kreplacements.o: kreplacements/moc_kreplacements.cpp  kreplacements/kreplacements.h common.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_kreplacements.o kreplacements/moc_kreplacements.cpp

moc_directorymergewindow.o: moc_directorymergewindow.cpp  directorymergewindow.h common.h \
		fileaccess.h \
		diff.h \
		optiondialog.h

moc_fileaccess.o: moc_fileaccess.cpp  fileaccess.h 

moc_kdiff3_shell.o: moc_kdiff3_shell.cpp  kdiff3_shell.h 

moc_kdiff3_part.o: moc_kdiff3_part.cpp  kdiff3_part.h 

moc_smalldialogs.o: moc_smalldialogs.cpp  smalldialogs.h diff.h \
		common.h \
		fileaccess.h \
		optiondialog.h

moc_difftextwindow.cpp: $(MOC) difftextwindow.h
	$(MOC) difftextwindow.h -o moc_difftextwindow.cpp

moc_mergeresultwindow.cpp: $(MOC) mergeresultwindow.h
	$(MOC) mergeresultwindow.h -o moc_mergeresultwindow.cpp

moc_kdiff3.cpp: $(MOC) kdiff3.h
	$(MOC) kdiff3.h -o moc_kdiff3.cpp

moc_optiondialog.cpp: $(MOC) optiondialog.h
	$(MOC) optiondialog.h -o moc_optiondialog.cpp

kreplacements/moc_kreplacements.cpp: $(MOC) kreplacements/kreplacements.h
	$(MOC) kreplacements/kreplacements.h -o kreplacements/moc_kreplacements.cpp

moc_directorymergewindow.cpp: $(MOC) directorymergewindow.h
	$(MOC) directorymergewindow.h -o moc_directorymergewindow.cpp

moc_fileaccess.cpp: $(MOC) fileaccess.h
	$(MOC) fileaccess.h -o moc_fileaccess.cpp

moc_kdiff3_shell.cpp: $(MOC) kdiff3_shell.h
	$(MOC) kdiff3_shell.h -o moc_kdiff3_shell.cpp

moc_kdiff3_part.cpp: $(MOC) kdiff3_part.h
	$(MOC) kdiff3_part.h -o moc_kdiff3_part.cpp

moc_smalldialogs.cpp: $(MOC) smalldialogs.h
	$(MOC) smalldialogs.h -o moc_smalldialogs.cpp

####### Install

install_documentation: all 
	@$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/" || $(MKDIR) "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/da" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/de" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/en" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/et" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/fr" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/it" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/pt" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
	-$(INSTALL_DIR) "../doc/sv" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"


uninstall_documentation: 
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/da"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/de"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/en"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/et"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/fr"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/it"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/pt"
	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/sv"
	-$(DEL_DIR) "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"


install_target: all 
	@$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/usr/local/bin/" || $(MKDIR) "$(INSTALL_ROOT)/usr/local/bin/"
	-$(INSTALL_FILE) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"

uninstall_target: 
	-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
	-$(DEL_DIR) "$(INSTALL_ROOT)/usr/local/bin/"


install: install_documentation install_target  

uninstall: uninstall_documentation uninstall_target