File: Makefile.in

package info (click to toggle)
gle-graphics 4.2.4c-6
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,156 kB
  • ctags: 11,510
  • sloc: cpp: 76,204; sh: 3,151; makefile: 590; perl: 486; lisp: 142; ansic: 8; xml: 7
file content (536 lines) | stat: -rw-r--r-- 17,852 bytes parent folder | download | duplicates (2)
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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
########################################################################
#                                                                      #
# GLE - Graphics Layout Engine <http://www.gle-graphics.org/>          #
#                                                                      #
# Modified BSD License                                                 #
#                                                                      #
# Copyright (C) 2009 GLE.                                              #
#                                                                      #
# Redistribution and use in source and binary forms, with or without   #
# modification, are permitted provided that the following conditions   #
# are met:                                                             #
#                                                                      #
#    1. Redistributions of source code must retain the above copyright #
# notice, this list of conditions and the following disclaimer.        #
#                                                                      #
#    2. Redistributions in binary form must reproduce the above        #
# copyright notice, this list of conditions and the following          #
# disclaimer in the documentation and/or other materials provided with #
# the distribution.                                                    #
#                                                                      #
#    3. The name of the author may not be used to endorse or promote   #
# products derived from this software without specific prior written   #
# permission.                                                          #
#                                                                      #
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR   #
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED       #
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   #
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY       #
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL   #
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE    #
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS        #
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER #
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR      #
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN  #
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                        #
#                                                                      #
########################################################################

# global makefile for gle
# @configure_input@

.PHONY : all
.PHONY : clean
.PHONY : distclean
.PHONY : cleansrc
.PHONY : cleandoc
.PHONY : cleanfonts
.PHONY : install
.PHONY : uninstall
.PHONY : bundle
.PHONY : glegs
.PHONY : qmake
.PHONY : gui
.PHONY : strip
.PHONY : finddeps
.PHONY : doc
.PHONY : license
.PHONY : qgle

.PHONY : make_all
.PHONY : pre_install
.PHONY : post_install
.PHONY : install_script
.PHONY : install_noscript
.PHONY : nsis
.PHONY : snapshot
.PHONY : nosnapshot

.PHONY : zipsrc
.PHONY : zipexe
.PHONY : tarsrc
.PHONY : tarsrcf

include config.i
include config.aconf

export RUNBUILD=1
export GLE_SNAPSHOT=@GLE_SNAPSHOT@
export HAVE_EXTRA_FONTS=@HAVE_EXTRA_FONTS@
export HAVE_CAIRO=@HAVE_CAIRO@

CXX=@CXX@
CXXFLAGS=@CXXFLAGS@
CPPFLAGS=@CPPFLAGS@

LDFLAGS=@LDFLAGS@
LIBS=@LIBS@

PACKAGE_TARNAME=@PACKAGE_TARNAME@
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
docdir=@docdir@

INSTALL_LIB=@libdir@
INSTALL_BIN=@GLE_INSTALL_BIN@
INSTALL_DIR=@GLE_INSTALL_DATA@

INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
MKDIR_P=@MKDIR_P@

PKGCONFIGDIR=$(INSTALL_LIB)/pkgconfig
MANDIR=@mandir@

GLE_VERSION=@GLE_VERSION@

INSTALL_METHOD=install_script
ifeq (@HAVE_NOSCRIPTS@,1)
	INSTALL_METHOD=install_noscript
endif

ifeq (@HAVE_QT@,1)
ifeq (@HAVE_MAC@,1)
	INSTALL_METHOD:=$(INSTALL_METHOD) install_qgle_mac_default
	RUN_QGLE:=./build/bin/QGLE.app/Contents/MacOS/QGLE 
else
	INSTALL_METHOD:=$(INSTALL_METHOD) install_qgle
	RUN_QGLE:=./build/bin/qgle
endif
endif

ifeq (@HAVE_AUTOPACKAGE@,1)
	INSTALL_METHOD:=$(INSTALL_METHOD) install_ap
endif

ifeq (@HAVE_LIBGLE@,1)
	INSTALL_METHOD:=install_libgle $(INSTALL_METHOD)
else
	ifeq (@HAVE_LIBGLE_STATIC@,1)
		INSTALL_METHOD:=install_libgle $(INSTALL_METHOD)
	endif
endif

GLE_SRC_LIB_DIR:=build/lib
ifeq (@HAVE_WIN32@,1)
	GLE_SRC_LIB_DIR:=build/bin
endif

DO_ALL=make_all
ifeq (@MAKE_AUTOPACKAGE@,1)
	DO_ALL=autopackage
endif

WIN32_INSTALL_NAME = gle-graphics-$(GLE_VERSION)$(GLE_SNAPSHOT)-exe-win32.exe
RELEASE_DIR = ./release
NSIS_SCRIPT_DIR = ./contrib\packagers\nsis

all: $(DO_ALL)

make_all: configure
	-$(MKDIR_P) build
	-$(MKDIR_P) build/bin
	-$(MKDIR_P) build/lib
	-$(MKDIR_P) build/doc
	-$(MKDIR_P) build/gleinc
	$(MAKE) -C src/gle make_glebtool
	$(MAKE) -C src/gle/bitmap
	$(MAKE) -C src/gle/surface
	$(MAKE) -C src/gle/letzfitz
	$(MAKE) -C src/gle/tokens
	$(MAKE) -C src/gle
	$(MAKE) -C src/fbuild
	$(MAKE) -C src/makefmt
	$(MAKE) -C src/manip
	$(MAKE) -C src/gui -f MakefileAC
	$(MAKE) -C src/fonts -f Makefile.gcc
	$(MAKE) -C src/lib -f Makefile.gcc
	$(MAKE) -C src/TeX
	@echo ""
	@echo "********************************************************************"
	@echo "Type \"make doc\" to build the GLE reference manual (requires LaTeX)"
	@echo "Type \"make install\" to install GLE $(GLE_VERSION)$(GLE_SNAPSHOT)"
	@echo "Install data into: $(INSTALL_DIR)"
	@echo "Install library into: $(INSTALL_LIB)"
	@echo "Install binary into: $(INSTALL_BIN)"
	@echo "********************************************************************"
	@echo ""

cleansrc:
	$(MAKE) -C src/gle/bitmap clean
	$(MAKE) -C src/gle/surface clean
	$(MAKE) -C src/gle/letzfitz clean
	$(MAKE) -C src/gle/tokens clean
	$(MAKE) -C src/gle clean
	$(MAKE) -C src/fbuild clean
	$(MAKE) -C src/makefmt clean
	$(MAKE) -C src/manip clean
	$(MAKE) -C src/gui -f MakefileAC clean
	$(MAKE) -C src/fonts -f Makefile.gcc clean
	$(MAKE) -C src/TeX clean
	-@$(RM) config.status
	-@$(RM) config.log
	-@$(RMDIR) build/bin
	-@$(RMDIR) build/lib
	-@$(RMDIR) build/font
	-@$(RMDIR) build/gleinc
	-@$(RM) build/glerc
	-@$(RM) build/init.tex
	-@$(RM) build/inittex.ini
	-@$(RM) build/manip.hlp

clean: cleansrc	cleandoc cleanfonts clean_dmg
	-@$(RMDIR) build

distclean: clean
	-@$(RM) platform/autoconf/gle-graphics.pc
	-@$(RM) platform/autopackage/gle4.apspec
	-@$(RM) src/config.h
	-@$(RM) src/doc/gle.1
	-@$(RM) src/fbuild/Makefile
	-@$(RM) src/gle/bitmap/Makefile
	-@$(RM) src/gle/letzfitz/Makefile
	-@$(RM) src/gle/Makefile
	-@$(RM) src/gle/surface/Makefile
	-@$(RM) src/gle/tokens/Makefile
	-@$(RM) src/gui/MakefileAC
	-@$(RM) src/gui/qgle.pro
	-@$(RM) src/makefmt/Makefile
	-@$(RM) src/manip/Makefile
	-@$(RM) src/TeX/Makefile
	-@$(RM) Makefile

install: clean_install pre_install $(INSTALL_METHOD) post_install

pre_install:
	-$(MKDIR_P) $(DESTDIR)$(INSTALL_DIR)
	-$(MKDIR_P) $(DESTDIR)$(INSTALL_BIN)
	-$(MKDIR_P) $(DESTDIR)$(MANDIR)/man1
	-$(MKDIR_P) $(DESTDIR)$(docdir)
	-$(MKDIR_P) $(DESTDIR)$(PKGCONFIGDIR)
	-$(INSTALL_DATA) build/glerc $(DESTDIR)$(INSTALL_DIR)
	-$(INSTALL_DATA) build/inittex.ini $(DESTDIR)$(INSTALL_DIR)
	-$(INSTALL_DATA) build/init.tex $(DESTDIR)$(INSTALL_DIR)
	-$(INSTALL_DATA) build/manip.hlp $(DESTDIR)$(INSTALL_DIR)
	-$(INSTALL_DATA) src/doc/gle.1 $(DESTDIR)$(MANDIR)/man1/
	-$(INSTALL_DATA) platform/autoconf/gle-graphics.pc $(DESTDIR)$(PKGCONFIGDIR)/
	-cp -p -r build/font $(DESTDIR)$(INSTALL_DIR)
	-cp -p -r build/doc/* $(DESTDIR)$(docdir)
	-cp -p -r build/gleinc $(DESTDIR)$(INSTALL_DIR)
	-chmod -R a+rX $(DESTDIR)$(INSTALL_DIR)/font
	-chmod -R a+rX $(DESTDIR)$(INSTALL_DIR)/gleinc
	-chmod -R a+rX $(DESTDIR)$(docdir)

post_install:
	@echo ""
	@echo "****************************************************************"
	@echo "GLE $(GLE_VERSION)$(GLE_SNAPSHOT) has been installed"
	@echo "You can use GLE now by entering the command \"gle\""
	@echo "(Provided that $(DESTDIR)$(INSTALL_BIN) is in your PATH.)"
	@echo "****************************************************************"
	@echo ""

# noscript version: do not put scripts in bin directory that set up GLE_TOP
# gle does not need GLE_TOP anymore on most operating systems

install_noscript:
	-$(INSTALL_PROGRAM) -m 755 build/bin/gle* $(DESTDIR)$(INSTALL_BIN)/
	-$(INSTALL_PROGRAM) -m 755 build/bin/manip* $(DESTDIR)$(INSTALL_BIN)/

# script version: put scripts in bin directory that set up GLE_TOP

install_script:
	-$(MKDIR_P) $(DESTDIR)$(INSTALL_DIR)/bin
	-cp -p build/bin/gle* $(DESTDIR)$(INSTALL_DIR)/bin/
	-cp -p build/bin/manip* $(DESTDIR)$(INSTALL_DIR)/bin/
	-echo "#!/bin/sh" > $(DESTDIR)$(INSTALL_BIN)/gle
	-echo "GLE_TOP=$(INSTALL_DIR)" >> $(DESTDIR)$(INSTALL_BIN)/gle
	-echo "export GLE_TOP" >> $(DESTDIR)$(INSTALL_BIN)/gle
	-echo "$(INSTALL_DIR)/bin/gle \$$@" >> $(DESTDIR)$(INSTALL_BIN)/gle
	-chmod 755 $(DESTDIR)$(INSTALL_BIN)/gle
	-echo "#!/bin/sh" > $(DESTDIR)$(INSTALL_BIN)/manip
	-echo "GLE_TOP=$(INSTALL_DIR)" >> $(DESTDIR)$(INSTALL_BIN)/manip
	-echo "export GLE_TOP" >> $(DESTDIR)$(INSTALL_BIN)/manip
	-echo "$(INSTALL_DIR)/bin/manip \$$@" >> $(DESTDIR)$(INSTALL_BIN)/manip
	-chmod 755 $(DESTDIR)$(INSTALL_BIN)/manip

install_qgle:
	-$(INSTALL_PROGRAM) -m 755 build/bin/qgle $(DESTDIR)$(INSTALL_BIN)/
	-@echo ""
	-@echo "****************************************************************"
	-@echo "QGLE has been installed in: $(DESTDIR)$(INSTALL_BIN)"
	-@echo "****************************************************************"

install_libgle:
	-$(MKDIR_P) $(DESTDIR)$(INSTALL_LIB)/
	-$(INSTALL_PROGRAM) -m 755 build/lib/libgle* $(DESTDIR)$(INSTALL_LIB)/

#####################
# Code for Mac OS/X #
#####################

install_qgle_mac_default:
	bash platform/script/install_qgle_mac

GLE_BUNDLE_TOP:=build/bin/QGLE.app/Contents/share/gle-graphics/$(GLE_VERSION)

bundle:
	-$(MKDIR_P) build/bin/QGLE.app/Contents/bin
	-cp -p build/bin/gle build/bin/QGLE.app/Contents/bin/
	-cp -p build/bin/glegs build/bin/QGLE.app/Contents/bin/glegs
	-cp -p -r build/lib build/bin/QGLE.app/Contents/
	-$(MKDIR_P) $(GLE_BUNDLE_TOP)/
	-cp -p build/glerc $(GLE_BUNDLE_TOP)/
	-echo "begin config gle" > $(GLE_BUNDLE_TOP)/glerc
	-echo "   current = $(VERSION_NUMBER).$(BUILD_NUMBER)" >> $(GLE_BUNDLE_TOP)/glerc
	-echo "end config" >> $(GLE_BUNDLE_TOP)/glerc
	-echo "begin config tools" >> $(GLE_BUNDLE_TOP)/glerc
	-echo "   ghostscript = \"\$$EXELOC/../bin/glegs\"">> $(GLE_BUNDLE_TOP)/glerc
	-echo "   libgs = \"/Library/Frameworks/Ghostscript.framework\"">> $(GLE_BUNDLE_TOP)/glerc
	-echo "end config" >> $(GLE_BUNDLE_TOP)/glerc
	-cp -p build/inittex.ini $(GLE_BUNDLE_TOP)/
	-cp -p build/init.tex $(GLE_BUNDLE_TOP)/
	-cp -p -r build/font $(GLE_BUNDLE_TOP)/
	-cp -p -r build/doc $(GLE_BUNDLE_TOP)/
	-cp -p -r build/gleinc $(GLE_BUNDLE_TOP)/
	install_name_tool -change $(DESTDIR)$(INSTALL_LIB)/libgle-graphics-@GLE_VERSION@.dylib @executable_path/../lib/libgle-graphics-@GLE_VERSION@.dylib build/bin/QGLE.app/Contents/MacOS/QGLE

LIBPNG_PATH=$(HOME)/staticlibs/lib/libpng14.14.dylib

bundle_libpng:
	-cp -p $(LIBPNG_PATH) build/bin/QGLE.app/Contents/lib/libpng.dylib
	install_name_tool -id @executable_path/../lib/libpng.dylib build/bin/QGLE.app/Contents/lib/libpng.dylib
	install_name_tool -change $(LIBPNG_PATH) @executable_path/../lib/libpng.dylib build/bin/QGLE.app/Contents/MacOS/QGLE
	install_name_tool -change $(LIBPNG_PATH) @executable_path/../lib/libpng.dylib build/bin/QGLE.app/Contents/lib/libgle-graphics-@GLE_VERSION@.dylib

otool:
	@echo "GLE"
	otool -L build/bin/QGLE.app/Contents/bin/gle
	@echo "GLEGS"
	otool -L build/bin/QGLE.app/Contents/bin/glegs
	@echo "MANIP"
	otool -L build/bin/manip
	@echo "LIBGLE-GRPAPHICS"
	otool -L build/bin/QGLE.app/Contents/lib/libgle-graphics-@GLE_VERSION@.dylib
	@echo "QGLE"
	otool -L build/bin/QGLE.app/Contents/MacOS/QGLE

#####################
# Begin build DMG   #
#####################
#
# Build file for creating DMG files.
#
# The DMG packager looks for a template.dmg.bz2 for using as its
# DMG template. If it doesn't find one, it generates a clean one.
#
# If you create a DMG template, you should make one containing all
# the files listed in $(SOURCE_FILES) below, and arrange everything to suit
# your style. The contents of the files themselves does not matter, so
# they can be empty (they will be overwritten later).
#
# Remko Tronçon
# http://el-tramo.be/about
# Licensed under the MIT License. See LICENSE.txt for details.

################################################################################
# Customizable variables
################################################################################

SOURCE_DIR ?= build/bin
SOURCE_FILES ?= QGLE.app
TEMPLATE_DMG ?= template.dmg

################################################################################
# DMG building. No editing should be needed beyond this point.
################################################################################

MASTER_DMG=gle-graphics-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)-exe-mac.dmg
WC_DMG=wc.dmg
WC_DIR=wc

.PHONY: dmg
dmg: $(MASTER_DMG)

$(TEMPLATE_DMG): $(TEMPLATE_DMG).bz2
	bunzip2 -k $<

$(TEMPLATE_DMG).bz2:
	@echo
	@echo --------------------- Generating empty template --------------------
	mkdir template
	hdiutil create -fs HFSX -layout SPUD -size 60m "$(TEMPLATE_DMG)" -srcfolder template -format UDRW -volname "gle-graphics-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)" -quiet
	rmdir template
	bzip2 "$(TEMPLATE_DMG)"
	@echo

$(WC_DMG): $(TEMPLATE_DMG)
	cp $< $@

$(MASTER_DMG): $(WC_DMG) $(addprefix $(SOURCE_DIR)/,$(SOURCE_FILES))
	@echo
	@echo --------------------- Creating Disk Image --------------------
	mkdir -p $(WC_DIR)
	hdiutil attach "$(WC_DMG)" -noautoopen -quiet -mountpoint "$(WC_DIR)"
	for i in $(SOURCE_FILES); do  \
		rm -rf "$(WC_DIR)/$$i"; \
		ditto -rsrc "$(SOURCE_DIR)/$$i" "$(WC_DIR)/$$i"; \
	done
	#rm -f "$@"
	#hdiutil create -srcfolder "$(WC_DIR)" -format UDZO -imagekey zlib-level=9 "$@" -volname "gle-graphics-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)" -scrub -quiet
	WC_DEV=`hdiutil info | grep "$(WC_DIR)" | grep "Apple_HFS" | awk '{print $$1}'` && \
	hdiutil detach $$WC_DEV -quiet -force
	rm -f "$(MASTER_DMG)"
	hdiutil convert "$(WC_DMG)" -quiet -format UDZO -imagekey zlib-level=9 -o "$@"
	rm -rf $(WC_DIR)
	@echo

.PHONY: clean_dmg
clean_dmg:
	-rm -rf $(TEMPLATE_DMG) $(MASTER_DMG) $(WC_DMG)

#####################
# End build DMG     #
#####################

#####################
# Make glegs        #
#####################

glegs:
	$(MAKE) -C src/gui -f MakefileAC $(PROJECT_BINDIR)/bin/glegs

#####################
# Rerun qmake       #
#####################

qmake:
	$(MAKE) -C src/gui -f MakefileAC qmake
	
qgle:
	$(RUN_QGLE)

# Code for Autopackage

install_ap:
	-$(INSTALL_DATA) platform/autopackage/gle.desktop $(DESTDIR)$(INSTALL_DIR)
	-$(INSTALL_DATA) platform/autopackage/gle.xml $(DESTDIR)$(INSTALL_DIR)
	-$(INSTALL_DATA) platform/autopackage/gle.png $(DESTDIR)$(INSTALL_DIR)

uninstall: clean_install

clean_install:
	-@$(RM) $(DESTDIR)$(INSTALL_BIN)/gle*
	-@$(RM) $(DESTDIR)$(INSTALL_BIN)/manip*
	-@$(RM) $(DESTDIR)$(INSTALL_BIN)/qgle*
	-@$(RM) $(DESTDIR)$(INSTALL_DIR)/bin/*
	-@$(RMDIR) $(DESTDIR)$(INSTALL_DIR)/bin
	-@$(RM) $(DESTDIR)$(INSTALL_DIR)/font/*
	-@$(RMDIR) $(DESTDIR)$(INSTALL_DIR)/font
	-@$(RM) $(DESTDIR)$(INSTALL_DIR)/doc/*
	-@$(RMDIR) $(DESTDIR)$(INSTALL_DIR)/doc
	-@$(RM) $(DESTDIR)$(INSTALL_DIR)/gleinc/*
	-@$(RMDIR) $(DESTDIR)$(INSTALL_DIR)/gleinc
	-@$(RM) $(DESTDIR)$(INSTALL_DIR)/*

configure: configure.ac
	aclocal
	autoconf
	-@echo ""
	-@echo "****************************************************************"
	-@echo "Error: configure.ac changed, please reconfigure with ./configure"
	-@echo "****************************************************************"
	false

gui:
	$(MAKE) -C src/gui -f MakefileAC

zipsrc:
	$(MAKE) -f Makefile.gcc zipsrc

tarsrc:
	$(MAKE) -f Makefile.gcc tarsrc

tarsrcf:
	$(MAKE) -f Makefile.gcc tarsrcf

zipexe:
	zip -r $(BASE_NAME)-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)-exe.zip build
	echo "Created: $(BASE_NAME)-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)-exe.zip"

license:
	cat srcfiles.txt | xargs perl platform/script/checklicense.pl

# *** WARNING ***
# Don't add "strip" to the default install target:
# This breaks creating "debug" packages on openSUSE and Fedora.
strip:
	-strip build/bin/gle*
	-strip build/bin/fbuild*
	-strip build/bin/makefmt*
	-strip build/bin/glegs*
	-strip $(GLE_SRC_LIB_DIR)/libgle*
	-strip build/bin/qgle*
	-strip build/bin/manip*

finddeps:
	./build/bin/gle -finddeps

cleandoc:
	$(MAKE) -C gle-refman -f Makefile.gcc clean

cleanfonts:
	$(MAKE) -C gle-refman -f Makefile.gcc cfonts

doc:
	-$(MKDIR_P) build/doc
	$(MAKE) -C gle-refman -f Makefile.gcc fig
	$(MAKE) -C gle-refman -f Makefile.gcc fonts
	$(MAKE) -C gle-refman -f Makefile.gcc pdf
	$(MAKE) -C gle-refman -f Makefile.gcc pdf
	$(MAKE) -C gle-refman -f Makefile.gcc index
	$(MAKE) -C gle-refman -f Makefile.gcc pdf
	cp gle-refman/gle-manual.pdf build/doc/
	cp README.txt build/doc/
	cp LICENSE.txt build/doc/

autopackage:
	(export APBUILD_STATIC_LIBGCC=1; export APBUILD_STATIC="tiff png12 png jpeg z"; makepackage platform/autopackage/gle4.apspec)
	mv gle-@GLE_VERSION@.x86.package GLE-@GLE_VERSION@-x86-linux.package

nsis: strip
	-$(MKDIR_P) $(RELEASE_DIR)
	-@$(RM) $(RELEASE_DIR)/$(WIN32_INSTALL_NAME)
	-makensis /V1 /DGLE_VERSION=@GLE_VERSION@ /DOUTPUT_FILENAME=$(WIN32_INSTALL_NAME) contrib\\packagers\\nsis\\gle.nsi
	-mv contrib/packagers/nsis/$(WIN32_INSTALL_NAME) $(RELEASE_DIR)

snapshot:
	perl platform/script/makesnapshot.pl 1

nosnapshot:
	perl platform/script/makesnapshot.pl 0

unit-test:
	make -C src/gle $(PROJECT_BINDIR)/bin/gle-unit-test