-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile.in
197 lines (156 loc) · 5.11 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
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOHEADER = autoheader
INSTALL := @INSTALL@
INSTALL_PROGRAM := @INSTALL_PROGRAM@ -s
INSTALL_DATA := @INSTALL_DATA@
bindir := @bindir@
datapath := @DATAPATH@
CP := cp
CXX := @CXX@
CC := @CC@
MKDIR := @MKDIR@
RM := @RM@
EXEEXT := @EXEEXT@
EMPTY_FILE := @EMPTY_FILE@
CC_FOR_BUILD := @CC_FOR_BUILD@
BUILDEXEEXT := @BUILDEXEEXT@
DEPDIR := .deps
SDL_CFLAGS := @SDL_CFLAGS@
CPPFLAGS := @CPPFLAGS@ @DEFS@ -DDATA_PATH=\"@DATAPATH@\"
CXXFLAGS := -g @CXXFLAGS@ @PROFILE@
CFLAGS := -g @CFLAGS@ @PROFILE@
LDFLAGS := @LDFLAGS@ @PROFILE@
SYS_LIBS := @SYS_LIBS@
CON_LIBS := @CON_LIBS@
GUI_LIBS := @GUI_LIBS@
WARNINGS := @WARNINGS@
GIMPTOOL = @GIMPTOOL@
GIMP_INCLUDES = @GIMP_INCLUDES@
GIMP_LIBS = @GIMP_LIBS@
GIMP_PLUGIN_PREFIX = @GIMP_PLUGIN_PREFIX@
@GIMP_PLUGIN_TRUE@GIMP_PLUGIN_MODULES = tools/gimp-plugin
@GIMP_PLUGIN_FALSE@GIMP_PLUGIN_MODULES =
USE_BUILTIN_DATA := @USE_BUILTIN_DATA@
HOST_SYSTEM = @HOST_SYSTEM@
SYSTEM :=
SYSTEM_MODULES :=
ifeq ($(HOST_SYSTEM),MACOSX)
SYSTEM = $(SYSTEM_MACOSX)
SYSTEM_MODULES := system/macosx
OSX_CODE_SIGNATURE = @OSX_CODE_SIGNATURE@
endif
# List of all submodules
# The order is important, be careful if you change it
MODULES := tools/data2c convert convert/u8 convert/crusader misc \
data filesys filesys/zip \
tools tools/disasm tools/compile tools/flexpack tools/fold \
tools/shapeconv $(GIMP_PLUGIN_MODULES)\
kernel games graphics graphics/fonts graphics/scalers audio \
audio/midi audio/midi/timidity usecode world world/actors gumps \
gumps/widgets conf system $(SYSTEM_MODULES) .
# Default target. The other dependencies are added by the module.mk files
all: misc/config.h
# GCC 3.4+ precompiled header
ifeq (@USE_PCH@,yes)
PCHEADER := misc/pent_include.h.gch
clean-pch:
-$(RM) $(PCHEADER)
else
PCHEADER :=
clean-pch:
endif
# create built-in data file if required
ifeq (@USE_BUILTIN_DATA@,yes)
filesys/data.o: data/data.h
clean-datah:
-$(RM) data/data.h
else
clean-datah:
endif
# config.h will be in $(top_builddir)/misc (and so will the precompiled header)
CPPFLAGS += -I$(top_builddir)/misc
# look for include files in each of the modules
CPPFLAGS += $(patsubst %,-I$(top_srcdir)/%,$(MODULES)) -I.
# list of all .deps subdirs
DEPDIRS = $(patsubst %,%/$(top_builddir)/$(DEPDIR),$(MODULES))
# Clean all object files & binaries
clean: clean-pch clean-datah
# Clean *all*
distclean: clean
-$(RM) -r $(DEPDIRS)
-$(RM) $(top_builddir)/misc/config.h $(top_builddir)/misc/config.h.stamp
# reset variables
LSRC :=
LGUIPRODUCTS :=
LCONPRODUCTS :=
# Include list of objects
include $(top_srcdir)/objects.mk
# Include additional rules for each module
include $(patsubst %,$(top_srcdir)/%/module.mk,$(MODULES))
# cancel any built-in .cpp->.o rules
%.o: %.cpp
# custom compile rule which calculates dependencies
%.o: %.cpp $(PCHEADER)
@$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -c -o $@ $<
# cancel any built-in .m->.o rules
%.o: %.m
# custom compile rule which calculates dependencies
%.o: %.m $(PCHEADER)
@$(MKDIR) $(*D)/$(DEPDIR)
$(CC) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP $(WARNINGS) $(CPPFLAGS) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $<
# custom compile rule for the precompiled header
%.h.gch: %.h
@$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).h.gch.d" -MQ "$@" -MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -x c++-header -c -o $@ $<
# rule to rebuild Makefile if necessary
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=$@ \
$(SHELL) ./config.status
# rules to rebuild config.h if necessary
misc/config.h: misc/config.h.stamp
misc/config.h.stamp: $(srcdir)/misc/config.h.in $(top_builddir)/config.status
@$(RM) misc/config.h.stamp
cd $(top_builddir) && \
CONFIG_HEADERS=misc/config.h CONFIG_LINKS= CONFIG_FILES= \
$(SHELL) ./config.status
# including config.h.stamp lets make rescan all dependencies if
# config.h may have been changed.
-include misc/config.h.stamp
# rules to rebuild configure, config.status, aclocal.m4, config.h.in
$(top_builddir)/config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.ac $(top_srcdir)/aclocal.m4
cd $(srcdir) && $(AUTOCONF)
$(top_srcdir)/aclocal.m4: $(srcdir)/configure.ac $(srcdir)/acinclude.m4
cd $(srcdir) && $(ACLOCAL)
$(srcdir)/misc/config.h.in: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
cd $(top_srcdir) && $(AUTOHEADER)
touch $(srcdir)/misc/config.h.in
.PHONY: all clean distclean clean-pch clean-datah