-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakefile
151 lines (113 loc) · 3.49 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
# ------------------------------------------------------------------------
# Makefile
# ------------------------------------------------------------------------
# from "Makeproject" (http://www.burdjia.com/proyectos/makeproject/)
# This file defines the tarjet platform, and is modified by fix.bat,
# fix.cmd or fix.sh script. See it's sources.
include target.os
# Suggested by "GNU Coding Stardards"
SHELL = /bin/sh
# ===============================================
# Project name
PROJECT = Allegro.pas 5.2.0
# ===============================================
# --------------------------------------
# -- Platform dependent configuration --
# --------------------------------------
# ------------------
# Windows
# ------------------
ifeq ($(TARGET),WIN)
# Platform name.
PLATFORM=Windows
# Binary sufix.
BINSUF = .exe
# Extra flags.
# EFLAGS = -WG
EFLAGS =
# File management.
# TODO: Detect MSys, Cywing and such...
DELETE = del
COPY = copy
endif
# ------------------
# Linux
# ------------------
ifeq ($(TARGET),LINUX)
# Platform name.
PLATFORM=GNU/Linux
# Binary sufix.
BINSUF =
# Extra flags.
EFLAGS =
# File management.
DELETE = rm -rf
COPY = cp
endif
# ----------------------------
# -- Optimization specifics --
# ----------------------------
# Optimization options, including "smart linking".
OPTOPT = -O3 -CX -Xs -XX
# Enable inline.
OPTOPT += -Si
# Next can be used to optimize for almost any current 32bit PC with Linux or
# Windows, doing it pretty well. Of course, it will prevent your executable to
# run in anything older than PentiumIII.
# OPTOPT += -CpPENTIUM3
# Next one can be used to optimize for 64bit PC with Linux or Windows.
# OPTOPT += -CpATHLON64
# Do not show Hint:
# Parameter "..." not used
# OPTOPT += -vm5024
# Do not show Note:
# Call to subroutine "...;" marked as inline is not inlined
# (In FPC 3.3.1, not in FPC 3.1.1 rev 38027)
OPTOPT += -vm6058
# ---------------------
# -- Debug specifics --
# ---------------------
# Debugging options.
DBGOPT = -O1 -g -gl
# Save debug information in an external file (.dbg).
DBGOPT += -Xg
# Show warnings + notes, but do not show hints.
# DBGOPT += -vwn
# Adds some code to check ranges and overflows.
DBGOPT += -Ci -Co -Cr -CR
# Adds code for valgrind
# DBGOPT += -gv
# Use heaptrace unit (for memory leak/corruption debugging).
DBGOPT += -gh
# Define symbol AL_DEBUGMODE to link with the "-debug" version of Allegro.
# Note you need to build the "-debug" version of Allegro.
# DBGOPT += -dAL_DEBUGMODE
# --------------------------
# -- No platform specific --
# --------------------------
# Pascal dialect.
# This is to make it more easy to write code that works on both Delphi and FPC
# compilers. Actually you can use Allegro.pas in any of the dialects
# supported by FPC.
CPFLAGS = -Mdelphi
# Force use of AnsiStrings.
# CPFLAGS += -Sh
# Pascal flags.
PFLAGS = $(CPFLAGS)
# Optimized compilation.
FLAGS = $(OPTOPT) $(PFLAGS) $(EFLAGS)
# Use next line instead to activate debug.
#FLAGS = $(DBGOPT) $(PFLAGS) $(EFLAGS)
# If you're using Windows, the examples will link with the "monolith" version
# of Allegro by default. If you want to link with the no-monolith version then
# use next line (read "docs/build/windows.txt" for more information).
# FLAGS += -dNO_MONOLITH
# -------------------
# -- Documentation --
# -------------------
DOCFMT = -O html -L en
DOCOPTS = --staronly --auto-abstract --include-creation-time --use-tipue-search
# -- Source files list --
include makefile.list
# -- Build rules --
include makefile.all