forked from msikma/allegro-4.2.2-xc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.in
715 lines (575 loc) · 24.7 KB
/
makefile.in
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
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
#
# Rules for building the Allegro library on Unix. This file is processed
# by the configure script, to produce the real makefile that does the work.
INSTALL_TARGETS = full-install
DEFAULT_TARGETS = full-build
srcdir = @srcdir@
builddir = .
include $(srcdir)/makefile.ver
SHELL = /bin/sh
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
infodir = @infodir@
mandir = @mandir@
libdir = @libdir@
modulebasedir = $(libdir)/allegro
moduledir = $(modulebasedir)/$(shared_version)
EXE =
OBJ = .o
OBJDIR = obj/unix
LIBDIR = lib/unix
INFO_DIR = $(infodir)/dir
DESTDIR =
ACLOCAL = aclocal
AUTOCONF = autoconf
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
transform = @program_transform_name@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
MAKEINFO = @MAKEINFO@
AR = @AR@
LIBS = @LIBS@
LDCONFIG = @LDCONFIG@
mkinstalldirs = $(SHELL) $(srcdir)/misc/mkdirs.sh
CONFIG_H = include/allegro/platform/alunixac.h
CONFIG_H_IN = include/allegro/platform/alunixac.hin
CONFIGURE = configure
CONFIGURE_IN = configure.in
ACLOCAL_M4 = aclocal.m4
INCLUDES = -I. -Iinclude -Iinclude/allegro -I$(srcdir)/include -I$(srcdir)/include/allegro
DEFS = -DALLEGRO_MODULES_PATH=\"$(libdir)/allegro\" @DEFS@
CPPFLAGS = @CPPFLAGS@
override LDFLAGS += @LDFLAGS@
PROG_LDFLAGS = @PROG_LDFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(PROG_LDFLAGS)
override CFLAGS += @CFLAGS@
ALLEGRO_DEBUG_CFLAGS = @ALLEGRO_DEBUG_CFLAGS@
ALLEGRO_PROFILE_CFLAGS = @ALLEGRO_PROFILE_CFLAGS@
ALLEGRO_SHAREDLIB_CFLAGS = @ALLEGRO_SHAREDLIB_CFLAGS@
COMPILE_NORMAL = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
COMPILE_DEBUG = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALLEGRO_DEBUG_CFLAGS)
COMPILE_PROFILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALLEGRO_PROFILE_CFLAGS)
CXXFLAGS = @CXXFLAGS@
ALLEGRO_DEBUG_CXXFLAGS = @ALLEGRO_DEBUG_CXXFLAGS@
ALLEGRO_PROFILE_CXXFLAGS = @ALLEGRO_PROFILE_CXXFLAGS@
COMPILE_CXX_NORMAL = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
COMPILE_CXX_DEBUG = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALLEGRO_DEBUG_CXXFLAGS)
COMPILE_CXX_PROFILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALLEGRO_PROFILE_CXXFLAGS)
ALLEGRO_SFLAGS = @ALLEGRO_SFLAGS@
COMPILE_S_NORMAL = $(COMPILE_NORMAL) $(ALLEGRO_SFLAGS)
COMPILE_S_DEBUG = $(COMPILE_DEBUG) $(ALLEGRO_SFLAGS)
COMPILE_S_PROFILE = $(COMPILE_PROFILE) $(ALLEGRO_SFLAGS)
COMPILE_PROGRAM = $(@COMPILE_PROGRAM@)
COMPILE_CXX_PROGRAM = $(@COMPILE_CXX_PROGRAM@)
COMPILE_S_PROGRAM = $(@COMPILE_S_PROGRAM@)
LIBALLEG = @LIBALLEG@
LINK_LIBALLEG = @LINK_LIBALLEG@
ALLEGRO_LIB_TARGETS = @ALLEGRO_LIB_TARGETS@
ALLEGRO_MODULE_TARGETS = @ALLEGRO_MODULE_TARGETS@
PLUGIN_LIB = @PLUGIN_LIB@
obj_unix_plugins_h = $(OBJDIR)/plugins.h
default: $(DEFAULT_TARGETS)
.SUFFIXES:
makefile: $(srcdir)/makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
config.status: $(srcdir)/$(CONFIGURE)
$(SHELL) ./config.status --recheck
$(srcdir)/$(CONFIGURE): $(srcdir)/$(CONFIGURE_IN) $(srcdir)/$(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) $(CONFIGURE_IN) >$(CONFIGURE)
$(CONFIG_H): stamp-h
stamp-h: $(srcdir)/$(CONFIG_H_IN) config.status
CONFIG_FILES= CONFIG_HEADERS="$(CONFIG_H):$(CONFIG_H_IN)" \
$(SHELL) ./config.status
@echo timestamp > stamp-h
$(srcdir)/$(CONFIG_H_IN): $(srcdir)/stamp-h.in
$(srcdir)/stamp-h.in: $(srcdir)/$(CONFIGURE_IN) $(srcdir)/$(ACLOCAL_M4)
@echo timestamp > $(srcdir)/stamp-h.in
@SET_MAKE@
# -------- list of sources for libraries and programs --------
include $(srcdir)/makefile.lst
ifneq (,$(CXX))
ALLEGRO_LIB_EXE_SOURCES += $(ALLEGRO_LIB_CPP_EXE_SOURCES)
ALLEGRO_LIB_EXES += $(ALLEGRO_LIB_CPP_EXES)
endif
ALLEGRO_EMPTY_LIST =
ALLEGRO_LIBRARY_SOURCES = \
$(ALLEGRO_SRC_FILES) \
$(ALLEGRO_SRC_UNIX_FILES) \
$(@ALLEGRO_MAYBE_ASM_FILES@) \
$(@ALLEGRO_MAYBE_XWINDOWS_FILES@) \
$(@ALLEGRO_MAYBE_LINUX_FILES@)
ALLEGRO_EXE_TARGETS = \
$(ALLEGRO_LIB_EXES) \
$(@ALLEGRO_MAYBE_LIB_X_EXES@) \
$(ALLEGRO_DATAFILE_EXES) \
$(ALLEGRO_EXAMPLE_EXES) \
demo/demo
# Header files (look in makefile.dep for "Headers referred by symbols").
ALLEGRO_EXTRA_HEADER = $(srcdir)/include/allegro/platform/alunix.h
ALLEGRO_INTERNAL_HEADER = $(srcdir)/include/allegro/platform/aintunix.h
ALLEGRO_MMX_HEADER =
allegro_alconfig_h = $(srcdir)/include/allegro/internal/alconfig.h \
$(srcdir)/include/allegro/platform/alucfg.h \
$(CONFIG_H)
allegro_alinline_h = $(srcdir)/include/allegro/alinline.h \
$(srcdir)/include/allegro/platform/al386gcc.h \
$(srcdir)/include/allegro/platform/al386vc.h \
$(srcdir)/include/allegro/platform/al386wat.h
allegro_h = $(srcdir)/include/allegro.h \
$(allegro_alconfig_h) \
$(allegro_alinline_h) \
$(srcdir)/include/allegro/3d.h \
$(srcdir)/include/allegro/3dmaths.h \
$(srcdir)/include/allegro/alcompat.h \
$(srcdir)/include/allegro/alinline.h \
$(srcdir)/include/allegro/base.h \
$(srcdir)/include/allegro/color.h \
$(srcdir)/include/allegro/compiled.h \
$(srcdir)/include/allegro/config.h \
$(srcdir)/include/allegro/datafile.h \
$(srcdir)/include/allegro/debug.h \
$(srcdir)/include/allegro/digi.h \
$(srcdir)/include/allegro/draw.h \
$(srcdir)/include/allegro/file.h \
$(srcdir)/include/allegro/fix.h \
$(srcdir)/include/allegro/fixed.h \
$(srcdir)/include/allegro/fli.h \
$(srcdir)/include/allegro/fmaths.h \
$(srcdir)/include/allegro/gfx.h \
$(srcdir)/include/allegro/gui.h \
$(srcdir)/include/allegro/joystick.h \
$(srcdir)/include/allegro/keyboard.h \
$(srcdir)/include/allegro/matrix.h \
$(srcdir)/include/allegro/midi.h \
$(srcdir)/include/allegro/mouse.h \
$(srcdir)/include/allegro/palette.h \
$(srcdir)/include/allegro/quat.h \
$(srcdir)/include/allegro/rle.h \
$(srcdir)/include/allegro/sound.h \
$(srcdir)/include/allegro/stream.h \
$(srcdir)/include/allegro/system.h \
$(srcdir)/include/allegro/text.h \
$(srcdir)/include/allegro/timer.h \
$(srcdir)/include/allegro/unicode.h \
$(srcdir)/include/allegro/graphics.h \
$(srcdir)/include/allegro/inline/3dmaths.inl \
$(srcdir)/include/allegro/inline/asm.inl \
$(srcdir)/include/allegro/inline/color.inl \
$(srcdir)/include/allegro/inline/draw.inl \
$(srcdir)/include/allegro/inline/fix.inl \
$(srcdir)/include/allegro/inline/fmaths.inl \
$(srcdir)/include/allegro/inline/gfx.inl \
$(srcdir)/include/allegro/inline/matrix.inl \
$(srcdir)/include/allegro/inline/rle.inl \
$(srcdir)/include/allegro/inline/system.inl \
$(ALLEGRO_EXTRA_HEADER)
allegro_internal_aintern_h = $(srcdir)/include/allegro/internal/aintern.h
allegro_aintdos_h = $(srcdir)/include/allegro/platform/aintdos.h \
$(srcdir)/include/allegro/internal/aintvga.h
obj_unix_asmdef_inc = $(OBJDIR)/asmdef.inc
xalleg_h = $(srcdir)/include/xalleg.h
# required to get asmdef.inc to be built automatically
$(ALLEGRO_SRC_I386_FILES): $(obj_unix_asmdef_inc)
ifdef CROSSCOMPILE
$(OBJDIR)/asmdef.s: src/i386/asmdef.c include/*.h include/allegro/*.h
$(CC) $(INCLUDES) `echo $(CFLAGS) | sed -e "s/.*\(-DALLEGRO_NO_ASM\).*/\1/"` -S -o $(OBJDIR)/asmdef.s src/i386/asmdef.c
$(obj_unix_asmdef_inc): $(OBJDIR)/asmdef.s
@if [ ! -x misc/asmdef.sh ]; then chmod a+x misc/asmdef.sh; fi
misc/asmdef.sh $(OBJDIR)/asmdef.s $(obj_unix_asmdef_inc)
else
$(obj_unix_asmdef_inc): $(OBJDIR)/asmdef$(EXE)
$(OBJDIR)/asmdef$(EXE) $(obj_unix_asmdef_inc)
$(OBJDIR)/asmdef$(EXE): $(srcdir)/src/i386/asmdef.c $(ALLEGRO_ASMCAPA_HEADER) $(allegro_h)
$(COMPILE_PROGRAM) $(srcdir)/src/i386/asmdef.c -o $(OBJDIR)/asmdef$(EXE)
endif
# -------- documentation --------
# XXX this is duplicated in makefile.all
DOCBASEFILES = ahack changes faq mistakes help thanks allegro const abi api packfile \
readme makedoc datafile grabber dat dat2c dat2s license
DOCBUILDFILES = bcc32 beos darwin djgpp dmc linux macosx mingw32 msvc qnx unix watcom
DOCTXTBUILDFILES = $(addprefix docs/build/,$(addsuffix .txt,$(DOCBUILDFILES)))
DOCS = $(addprefix docs/txt/,$(addsuffix .txt,$(filter-out changes thanks readme, $(DOCBASEFILES))))
DOCS += $(addprefix docs/rtf/,$(addsuffix .rtf,$(DOCBASEFILES)))
DOCS += $(addprefix docs/html/,$(addsuffix .html,index $(DOCBASEFILES)))
DOCS += $(addprefix docs/html/build/,$(addsuffix .html,$(DOCBUILDFILES)))
DOCS += docs/texi/allegro.texi docs/info/allegro.info docs/man/install_allegro.3
DOCS += CHANGES AUTHORS THANKS readme.txt
DOCS += docs/scite/allegro.api
DEVHELPDOCS = $(addprefix docs/devhelp/,$(addsuffix .html,$(DOCBASEFILES)))
DEVHELPDOCS += $(addprefix docs/devhelp/build/,$(addsuffix .html,$(DOCBUILDFILES)))
MAKEDOC = docs/makedoc$(EXE)
docs: $(DOCS) $(DOCTXTBUILDFILES)
docs-dvi: $(srcdir)/docs/allegro.dvi
@echo "Device independant documentation generated: docs/allegro.dvi"
@echo "Run make docs-ps if you wish to generate Postscript documentation (you need dvips)."
docs-ps: $(srcdir)/docs/allegro.ps
@echo "Postscript documentation generated: docs/allegro.ps"
@echo "You can compress it with gzip by running make docs-gzipped-ps,"
@echo "or with bzip2 by running make docs-bzipped-ps."
docs-pdf: $(srcdir)/docs/allegro.pdf
@echo "PDF documentation generated: docs/allegro.pdf"
docs-gzipped-ps: $(srcdir)/docs/allegro.ps
gzip -9 docs/allegro.ps
@echo "Compressed postscript documentation generated: docs/allegro.ps.gz"
docs-bzipped-ps: $(srcdir)/docs/allegro.ps
bzip2 -9 docs/allegro.ps
@echo "Compressed postscript documentation generated: docs/allegro.ps.bz2"
docs-devhelp: docs/devhelp/allegro.devhelp
@echo "DevHelp documentation generated: docs/devhelp/allegro.devhelp"
@echo "To use, please install the above file."
$(filter %.txt,$(filter-out readme.txt, $(DOCS))): docs/txt/%.txt: docs/src/%._tx $(MAKEDOC)
$(MAKEDOC) -ascii $@ $<
$(DOCTXTBUILDFILES): docs/build/%.txt: docs/src/build/%._tx $(MAKEDOC)
$(MAKEDOC) -ascii $@ $<
$(filter %.rtf,$(DOCS)): docs/rtf/%.rtf: docs/src/%._tx $(MAKEDOC)
$(MAKEDOC) -rtf $@ $<
$(filter %.texi,$(DOCS)): docs/texi/%.texi: docs/src/%._tx $(MAKEDOC)
$(MAKEDOC) -texi $@ $<
$(filter %.info,$(DOCS)): docs/info/%.info: docs/texi/%.texi $(MAKEDOC)
$(MAKEINFO) --no-split -o $@ $<
$(filter %.html,$(DOCS)): docs/html/%.html: docs/src/%._tx $(MAKEDOC)
$(MAKEDOC) -html $@ $<
$(filter %.html,$(DEVHELPDOCS)): docs/devhelp/%.html: docs/src/%._tx $(MAKEDOC)
$(MAKEDOC) -odevhelp -html $@ $<
$(filter %.api,$(DOCS)): docs/scite/%.api: docs/src/%._tx $(MAKEDOC)
$(MAKEDOC) -scite $@ $<
docs/man/install_allegro.3: docs/src/allegro._tx $(MAKEDOC)
$(MAKEDOC) -man docs/man/dummyname.3 $<
AUTHORS: docs/src/thanks._tx $(MAKEDOC)
$(MAKEDOC) -part -ascii $@ $<
cp AUTHORS docs/txt/authors.txt
THANKS: docs/src/thanks._tx $(MAKEDOC)
$(MAKEDOC) -part -ascii $@ $<
cp THANKS docs/txt/thanks.txt
CHANGES: docs/src/changes._tx $(MAKEDOC)
$(MAKEDOC) -ascii $@ $<
cp CHANGES docs/txt/changes.txt
readme.txt: docs/src/readme._tx $(MAKEDOC)
$(MAKEDOC) -ascii $@ $<
cp readme.txt docs/txt/readme.txt
docs/allegro.dvi: docs/texi/allegro.texi
cd docs && texi2dvi -c texi/allegro.texi && cd ..
docs/allegro.ps: docs/allegro.dvi
cd docs && dvips -o allegro.ps allegro.dvi && cd ..
docs/allegro.pdf: docs/texi/allegro.texi
cd docs && texi2pdf --texinfo='@topandbottommargin=.75in' texi/allegro.texi && cd ..
docs/devhelp/allegro.devhelp: $(filter %.html,$(DEVHELPDOCS)) docs/src/allegro._tx $(MAKEDOC)
$(MAKEDOC) -devhelp docs/devhelp/allegro.html docs/src/allegro._tx
info:
@cat makefile.info
# -------- dependencies and rules for building libraries and simple programs --------
-include makefile.dep
# required to fix parallel make builds, makes the lib targets a dependency of the exe targets
# XXX this is a little bit of a hack. Ideally youd want only the debug exes to depend on the debug libs,
# not all of them.
$(ALLEGRO_EXE_TARGETS): $(ALLEGRO_LIB_TARGETS)
ifdef CROSSCOMPILE
full-build: lib modules programs
else
full-build: lib modules programs docs
endif
lib: $(ALLEGRO_LIB_TARGETS)
modules: $(ALLEGRO_MODULE_TARGETS)
programs: $(ALLEGRO_EXE_TARGETS)
suid: $(ALLEGRO_EXE_TARGETS)
chown root.allegro $?
chmod 4750 $?
touch suid
# -------- shortcuts for building various programs --------
demo: demo/demo$(EXE)
makedoc: docs/makedoc$(EXE)
keyconf: setup/keyconf$(EXE)
setup: setup/setup$(EXE)
afinfo: tests/afinfo$(EXE)
akaitest: tests/akaitest$(EXE)
digitest: tests/digitest$(EXE)
filetest: tests/filetest$(EXE)
gfxinfo: tests/gfxinfo$(EXE)
mathtest: tests/mathtest$(EXE)
miditest: tests/miditest$(EXE)
play: tests/play$(EXE)
playfli: tests/playfli$(EXE)
test: tests/test$(EXE)
vesainfo: tests/vesainfo$(EXE)
colormap: tools/colormap$(EXE)
dat: tools/dat$(EXE)
dat2c: tools/dat2c$(EXE)
dat2s: tools/dat2s$(EXE)
exedat: tools/exedat$(EXE)
grabber: tools/grabber$(EXE)
pack: tools/pack$(EXE)
pat2dat: tools/pat2dat$(EXE)
rgbmap: tools/rgbmap$(EXE)
textconv: tools/textconv$(EXE)
examples: $(EXAMPLE_FILES)
# -------- rules for deleting the generated files --------
clean:
define RM_OBJ_CLEAN_FILES
$(foreach file, $(OBJ_CLEAN_FILES), rm -f $(file)
)
endef
define RM_OTHER_CLEAN_FILES
$(foreach file, $(OTHER_CLEAN_FILES), rm -f $(file)
)
endef
$(RM_OBJ_CLEAN_FILES)
$(RM_OTHER_CLEAN_FILES)
distclean: clean
define RM_DISTCLEAN_FILES
$(foreach file, $(DISTCLEAN_FILES) $(ALLEGRO_LIB_X_EXES), rm -f $(file)
)
endef
$(RM_DISTCLEAN_FILES)
veryclean: distclean
define RM_VERYCLEAN_FILES
$(foreach file, $(VERYCLEAN_FILES), rm -f $(file)
)
endef
$(RM_VERYCLEAN_FILES)
rm -f makefile
maintainer-clean: veryclean
rm -f configure include/allegro/platform/alunixac.hin
rm -rf autom4te*
# -------- rules for installing the files --------
install: $(INSTALL_TARGETS)
mini-install: install-headers install-lib
@echo "Your end-user version of Allegro is now installed"
full-install: install-headers install-programs install-lib
@echo ""
@echo "Run make docs-dvi if you wish to generate dvi documentation (you need texi2dvi)."
@echo "Run make docs-pdf if you wish to generate PDF documentation (you need texi2pdf)."
@echo "Run make install-man if you wish to install the man pages."
@echo "Run make install-info if you wish to install the info documentation."
@echo "You may conserve space by instead running make install-gzipped-man"
@echo "and/or make install-gzipped-info. Or install-bzipped-man,"
@echo "install-bzipped-info to use bzip2 instead of gzip."
install-lib: lib modules
$(mkinstalldirs) $(DESTDIR)$(libdir)
@for l in alleg alld allp; do \
if test -f $(LIBDIR)/lib$${l}.a; then \
echo Installing $(LIBDIR)/lib$${l}.a to $(DESTDIR)$(libdir); \
$(INSTALL_DATA) $(LIBDIR)/lib$${l}.a $(DESTDIR)$(libdir)/; \
fi; \
done
@for l in alleg alld allp; do \
if test -f $(LIBDIR)/lib$${l}-$(shared_version).so; then \
echo Installing $(LIBDIR)/lib$${l}-$(shared_version).so to $(DESTDIR)$(libdir); \
$(INSTALL_PROGRAM) $(LIBDIR)/lib$${l}-$(shared_version).so $(DESTDIR)$(libdir)/; \
$(INSTALL_DATA) $(LIBDIR)/lib$${l}_unsharable.a $(DESTDIR)$(libdir)/; \
fi; \
done
@if test -n "$(ALLEGRO_MODULE_TARGETS)"; then \
$(mkinstalldirs) $(DESTDIR)$(moduledir); \
for m in $(ALLEGRO_MODULE_TARGETS); do \
echo Installing $$m to $(DESTDIR)$(moduledir); \
$(INSTALL_PROGRAM) $$m $(DESTDIR)$(moduledir)/; \
done; \
$(INSTALL_DATA) modules.lst $(DESTDIR)$(moduledir)/; \
fi
$(mkinstalldirs) $(DESTDIR)$(bindir)
@echo Installing allegro-config to $(DESTDIR)$(bindir)
@$(INSTALL_PROGRAM) allegro-config $(DESTDIR)$(bindir)
@if test -n "$(LIBDIR)/liball*-$(shared_version).so"; then \
(cat /etc/ld.so.conf | grep $(libdir) >/dev/null || \
test $(libdir) = /lib || test $(libdir) = /usr/lib) \
&& ($(LDCONFIG) $(libdir) || true) || (\
echo "" ; \
echo "Warning: shared library destination $(libdir) is not in ldd search path." ; \
echo "Unless you add it to /etc/ld.so.conf, you must set LD_LIBRARY_PATH to include"; \
echo "$(libdir) each time you want to run an Allegro program." ; \
) ; \
fi
@for l in alleg alld allp; do \
if test -f $(DESTDIR)$(libdir)/lib$${l}-$(shared_version).so -a \! -h $(DESTDIR)$(libdir)/lib$${l}.so.${shared_major_minor}; then \
(cd $(DESTDIR)$(libdir); ln -s lib$${l}-$(shared_version).so lib$${l}.so.${shared_major_minor}); \
fi; \
done
$(mkinstalldirs) $(DESTDIR)$(prefix)/share/aclocal
@echo Installing allegro.m4 to $(DESTDIR)$(prefix)/share/aclocal
@$(INSTALL_DATA) misc/allegro.m4 $(DESTDIR)$(prefix)/share/aclocal
install-headers:
$(mkinstalldirs) $(DESTDIR)$(includedir)/allegro
$(mkinstalldirs) $(DESTDIR)$(includedir)/allegro/inline
$(mkinstalldirs) $(DESTDIR)$(includedir)/allegro/internal
$(mkinstalldirs) $(DESTDIR)$(includedir)/allegro/platform
$(INSTALL_DATA) $(srcdir)/include/allegro.h $(DESTDIR)$(includedir)/
$(INSTALL_DATA) $(srcdir)/include/xalleg.h $(DESTDIR)$(includedir)/
$(INSTALL_DATA) $(srcdir)/include/linalleg.h $(DESTDIR)$(includedir)/
$(INSTALL_DATA) $(CONFIG_H) $(DESTDIR)$(includedir)/allegro/
@for file in $(srcdir)/include/allegro/*.h; do \
echo Installing $$file to $(DESTDIR)$(includedir)/allegro; \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/allegro/; \
done
@for file in $(srcdir)/include/allegro/inline/*.inl; do \
echo Installing $$file to $(DESTDIR)$(includedir)/allegro/inline; \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/allegro/inline/; \
done
@for file in $(srcdir)/include/allegro/internal/*.h; do \
echo Installing $$file to $(DESTDIR)$(includedir)/allegro/internal; \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/allegro/internal/; \
done
@for file in $(srcdir)/include/allegro/platform/*.h; do \
echo Installing $$file to $(DESTDIR)$(includedir)/allegro/platform; \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/allegro/platform/; \
done
INSTALL_EXES = $(filter tools/%, $(ALLEGRO_LIB_EXES) $(ALLEGRO_DATAFILE_EXES))
install-programs: $(INSTALL_EXES)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@for prog in $^; do \
echo Installing $$prog to $(DESTDIR)$(bindir); \
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(bindir); \
done
install-info: docs
@echo Installing Allegro info documentation...
$(mkinstalldirs) $(DESTDIR)$(infodir)
@$(INSTALL_DATA) docs/info/allegro.info $(DESTDIR)$(infodir)
-@if $(SHELL) -c "$(INSTALL_INFO) --version" >/dev/null 2>&1; then \
if $(INSTALL_INFO) --version 2>&1 | grep "Debian" >/dev/null; then \
$(INSTALL_INFO) --section Development -- $(DESTDIR)$(infodir)/allegro.info; \
else \
$(INSTALL_INFO) $(DESTDIR)$(infodir)/allegro.info $(INFO_DIR); \
fi; \
else \
true; \
fi
install-gzipped-info: install-info
@echo Compressing documentation...
@gzip -9 -f $(DESTDIR)$(infodir)/allegro.info
install-bzipped-info: install-info
@echo Compressing documentation...
@bzip2 -9 -f $(DESTDIR)$(infodir)/allegro.info
install-man: docs
$(mkinstalldirs) $(DESTDIR)$(mandir)/man3
@for file in $(srcdir)/docs/man/*.3; do \
echo Installing $$file to $(DESTDIR)$(mandir)/man3; \
$(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man3/; \
done
install-gzipped-man: docs
$(mkinstalldirs) $(DESTDIR)$(mandir)/man3
@for file in $(srcdir)/docs/man/*.3; do \
echo Installing $$file.gz to $(DESTDIR)$(mandir)/man3; \
$(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man3/; \
gzip -9 -f $(DESTDIR)$(mandir)/man3/`echo $$file | sed -e "s:.*/::"`; \
done
install-bzipped-man: docs
$(mkinstalldirs) $(DESTDIR)$(mandir)/man3
@for file in $(srcdir)/docs/man/*.3; do \
echo Installing $$file.bz2 to $(DESTDIR)$(mandir)/man3; \
$(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man3/; \
bzip2 -9 -f $(DESTDIR)$(mandir)/man3/`echo $$file | sed -e "s:.*/::"`; \
done
# -------- rules for uninstalling the files --------
uninstall: uninstall-lib uninstall-modules uninstall-headers uninstall-programs uninstall-info uninstall-man uninstall-misc
@echo
@echo "All gone. Don't you feel sad now?"
@echo
@echo "Well, almost. Shared libraries are not uninstalled by default --"
@echo "use \"make uninstall-shared\" to remove them."
uninstall-lib:
@echo "Uninstalling libraries..."
@for l in alleg alld allp; do \
rm -f $(libdir)/lib$${l}_unsharable.a; \
rm -f $(libdir)/lib$${l}.a; \
done
rm -f $(bindir)/allegro-config
uninstall-shared:
@echo "Uninstalling shared libraries..."
@for l in alleg alld allp; do \
rm -f $(libdir)/lib$${l}-${shared_version}.so; \
rm -f $(libdir)/lib$${l}.so.${shared_major_minor}; \
done
-$(LDCONFIG) $(libdir) # update cache (only works if we're root)
uninstall-modules:
rm -rf $(modulebasedir) $(moduledir)
uninstall-headers:
rm -f $(includedir)/allegro.h
rm -f $(includedir)/xalleg.h
rm -f $(includedir)/linalleg.h
rm -rf $(includedir)/allegro
uninstall-programs:
@for prog in $(ALLEGRO_LIB_EXES) $(ALLEGRO_DATAFILE_EXES); do \
if test "X`echo $$prog | sed -e s,tools/.\*,,`" = X; then \
p=`echo $$prog | sed -e s,tools/,,`; \
echo rm -f $(bindir)/$$p; \
rm -f $(bindir)/$$p; \
fi; \
done
uninstall-info:
@if test -f $(infodir)/allegro.info.gz; then \
echo Decompressing documentation...; \
gunzip $(infodir)/allegro.info.gz; \
fi;
@if test -f $(infodir)/allegro.info.bz2; then \
echo Decompressing documentation...; \
bzip2 -d $(infodir)/allegro.info.bz2; \
fi;
-@if $(SHELL) -c "$(INSTALL_INFO) --version" >/dev/null 2>&1; then \
if $(INSTALL_INFO) --version 2>&1 | grep "Debian" >/dev/null; then \
$(INSTALL_INFO) --remove $(infodir)/allegro.info; \
else \
$(INSTALL_INFO) --remove $(infodir)/allegro.info $(INFO_DIR); \
fi; \
else \
true; \
fi
rm -f $(infodir)/allegro.info
uninstall-man:
sed -n -e "s,^@[@\\].*@\([a-zA-Z0-9_]*\)[^a-zA-Z0-9_*].*,$(mandir)/man3/\1.3,p" $(srcdir)/docs/src/allegro._tx \
| xargs -n 1 rm -f
sed -n -e "s,^@[@\\].*@\([a-zA-Z0-9_]*\)[^a-zA-Z0-9_*].*,$(mandir)/man3/\1.3.gz,p" $(srcdir)/docs/src/allegro._tx \
| xargs -n 1 rm -f
sed -n -e "s,^@[@\\].*@\([a-zA-Z0-9_]*\)[^a-zA-Z0-9_*].*,$(mandir)/man3/\1.3.bz2,p" $(srcdir)/docs/src/allegro._tx \
| xargs -n 1 rm -f
sed -n -e "s,^@@Example.*@\(ex.*\),$(mandir)/man3/\1.3,p" $(srcdir)/docs/src/allegro._tx \
| xargs -n 1 rm -f
sed -n -e "s,^@@\(struct\|typedef\).*@\([a-zA-Z0-9_]*\),$(mandir)/man3/\2.3,p" $(srcdir)/docs/src/allegro._tx \
| xargs -n 1 rm -f
uninstall-misc:
rm -f $(prefix)/share/aclocal/allegro.m4
# -------- generate automatic dependencies --------
depend:
rm -f makefile.dep
@echo "# Automatically generated." >makefile.dep
@echo "Generating dependencies for libraries"
$(SHELL) -c 'cd $(srcdir) && misc/deplib.sh $(ALLEGRO_LIBRARY_SOURCES)' >>makefile.dep
@echo "Generating dependencies for dynamically loaded modules"
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh vga -- $(ALLEGRO_MODULE_VGA_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh svgalib -lvga $(ALLEGRO_MODULE_SVGALIB_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh fbcon -- $(ALLEGRO_MODULE_FBCON_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh dga2 -lXxf86dga $(ALLEGRO_MODULE_DGA2_FILES)' >> makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh alsadigi -lasound $(ALLEGRO_MODULE_ALSADIGI_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh alsamidi -lasound $(ALLEGRO_MODULE_ALSAMIDI_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh esddigi "\`esd-config --libs\`" $(ALLEGRO_MODULE_ESD_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh artsdigi "\`artsc-config --libs\`" $(ALLEGRO_MODULE_ARTS_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh sgialdigi -laudio $(ALLEGRO_MODULE_SGIAL_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmod.sh jackdigi "\`pkg-config --libs jack\`" $(ALLEGRO_MODULE_JACK_FILES)' >>makefile.dep
@echo "Generating dependencies for simple programs"
$(SHELL) -c 'cd $(srcdir) && misc/deplexe.sh -- $(ALLEGRO_LIB_EXE_SOURCES) $(ALLEGRO_EXAMPLE_FILES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/deplexe.sh -lX11 $(@ALLEGRO_MAYBE_LIB_X_EXE_SOURCES@) ' >>makefile.dep
@echo "Generating dependencies for datafile plugins"
$(SHELL) -c 'cd $(srcdir) && misc/depdlib.sh tools/datedit.c' >>makefile.dep
@echo "Generating dependencies for datafile programs"
$(SHELL) -c 'cd $(srcdir) && misc/depdexe.sh $(ALLEGRO_DATAFILE_EXE_SOURCES)' >>makefile.dep
@echo "Generating dependencies for makedoc and demo"
$(SHELL) -c 'cd $(srcdir) && misc/depmexe.sh docs/makedoc $(ALLEGRO_MAKEDOC_SOURCES)' >>makefile.dep
$(SHELL) -c 'cd $(srcdir) && misc/depmexe.sh demo/demo $(ALLEGRO_DEMO_SOURCES)' >>makefile.dep
@echo "Dependency generation completed!"
.PHONY: default full-build lib programs docs docs-dvi docs-ps docs-pdf \
docs-gzipped-ps docs-bzipped-ps \
clean distclean veryclean maintainer-clean \
install full-install mini-install \
install-lib install-headers install-programs install-info \
install-gzipped-info install-bzipped-info install-man install-gzipped-man \
install-bzipped-man depend \
uninstall uninstall-lib uninstall-modules uninstall-headers \
uninstall-programs uninstall-info uninstall-man
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: