|
Line
Link Here
|
| 0 |
-- Makefile |
0 |
++ Makefile |
|
Lines 111-117
Link Here
|
| 111 |
|
111 |
|
| 112 |
else |
112 |
else |
| 113 |
|
113 |
|
| 114 |
CFOPTIMIZE := -O2 |
114 |
CFOPTIMIZE = $(CXXFLAGS) |
| 115 |
|
115 |
|
| 116 |
endif # USE_ICC |
116 |
endif # USE_ICC |
| 117 |
|
117 |
|
|
Lines 119-139
Link Here
|
| 119 |
CFOPTIMIZE += -flto=jobserver -fwhole-program |
119 |
CFOPTIMIZE += -flto=jobserver -fwhole-program |
| 120 |
endif |
120 |
endif |
| 121 |
|
121 |
|
| 122 |
CFOTHERS := -pipe $(EXTERNAL_FLAGS) |
122 |
CFOTHERS := $(EXTERNAL_FLAGS) |
| 123 |
CFWARN := -Wall -Wformat-security |
123 |
CFWARN := -Wall -Wformat-security |
| 124 |
CFWARN_L := -Wundef |
124 |
CFWARN_L := -Wundef |
| 125 |
|
125 |
|
| 126 |
DEFINES := $(EXTERNAL_DEFINES) |
126 |
DEFINES := $(EXTERNAL_DEFINES) |
| 127 |
|
127 |
|
| 128 |
LDFLAGS := $(EXTERNAL_LDFLAGS) |
|
|
| 129 |
|
| 130 |
# |
128 |
# |
| 131 |
# The GCC and GXX variables are set later. |
129 |
# The GCC and GXX variables are set later. |
| 132 |
# |
130 |
# |
| 133 |
AR = ar |
131 |
AR ?= ar |
| 134 |
RANLIB = ranlib |
132 |
RANLIB ?= ranlib |
| 135 |
CC = $(GCC) |
133 |
CC ?= $(GCC) |
| 136 |
CXX = $(GXX) |
134 |
CXX ?= $(GXX) |
| 137 |
RM = rm -f |
135 |
RM = rm -f |
| 138 |
COPY = cp |
136 |
COPY = cp |
| 139 |
COPY_R = cp -r |
137 |
COPY_R = cp -r |
|
Lines 144-150
Link Here
|
| 144 |
PNGCRUSH = $(COPY) |
142 |
PNGCRUSH = $(COPY) |
| 145 |
PNGCRUSH_LABEL = COPY |
143 |
PNGCRUSH_LABEL = COPY |
| 146 |
ADVPNG = advpng -z -4 |
144 |
ADVPNG = advpng -z -4 |
| 147 |
PKGCONFIG = pkg-config |
145 |
PKGCONFIG ?= pkg-config |
| 148 |
DOXYGEN = doxygen |
146 |
DOXYGEN = doxygen |
| 149 |
DOXYGEN_SIMPLE_CONF = crawl_simple.doxy |
147 |
DOXYGEN_SIMPLE_CONF = crawl_simple.doxy |
| 150 |
DOXYGEN_ALL_CONF = crawl_all.doxy |
148 |
DOXYGEN_ALL_CONF = crawl_all.doxy |
|
Lines 1143-1149
Link Here
|
| 1143 |
endif |
1141 |
endif |
| 1144 |
[ -d $(prefix_fp)/$(bin_prefix) ] || mkdir -p $(prefix_fp)/$(bin_prefix) |
1142 |
[ -d $(prefix_fp)/$(bin_prefix) ] || mkdir -p $(prefix_fp)/$(bin_prefix) |
| 1145 |
$(COPY) $(GAME) $(prefix_fp)/$(bin_prefix)/ |
1143 |
$(COPY) $(GAME) $(prefix_fp)/$(bin_prefix)/ |
| 1146 |
$(STRIP) $(prefix_fp)/$(bin_prefix)/$(GAME) |
|
|
| 1147 |
mkdir -p $(datadir_fp)/dat/des |
1144 |
mkdir -p $(datadir_fp)/dat/des |
| 1148 |
mkdir -p $(datadir_fp)/dat/dlua |
1145 |
mkdir -p $(datadir_fp)/dat/dlua |
| 1149 |
mkdir -p $(datadir_fp)/dat/lua |
1146 |
mkdir -p $(datadir_fp)/dat/lua |
|
Lines 1339-1345
Link Here
|
| 1339 |
|
1336 |
|
| 1340 |
.PHONY: build-rltiles |
1337 |
.PHONY: build-rltiles |
| 1341 |
build-rltiles: .contrib-libs $(RLTILES)/dc-unrand.txt |
1338 |
build-rltiles: .contrib-libs $(RLTILES)/dc-unrand.txt |
| 1342 |
+$(MAKE) -C $(RLTILES) all ARCH=$(ARCH) TILES=$(TILES)$(WEBTILES) |
1339 |
+$(MAKE) -C $(RLTILES) all ARCH=$(ARCH) DEBUG=$(DEBUG) TILES=$(TILES)$(WEBTILES) |
| 1343 |
|
1340 |
|
| 1344 |
$(TILEDEFSRCS) $(TILEDEFHDRS) $(ORIGTILEFILES): build-rltiles |
1341 |
$(TILEDEFSRCS) $(TILEDEFHDRS) $(ORIGTILEFILES): build-rltiles |
| 1345 |
|
1342 |
|
| 1346 |
-- rltiles/Makefile |
1343 |
++ rltiles/Makefile |
|
Lines 1-7
Link Here
|
| 1 |
uname_S := $(shell uname -s) |
1 |
uname_S := $(shell uname -s) |
| 2 |
|
2 |
|
| 3 |
ifneq (,$(findstring MINGW,$(uname_S))) |
3 |
ifneq (,$(findstring MINGW,$(uname_S))) |
| 4 |
LDFLAGS += -lmingw32 |
4 |
LIBS += -lmingw32 |
| 5 |
endif |
5 |
endif |
| 6 |
|
6 |
|
| 7 |
# Note: since generation of tiles is done on the host, we don't care about |
7 |
# Note: since generation of tiles is done on the host, we don't care about |
|
Lines 10-16
Link Here
|
| 10 |
# Also, cross-compilation with no system libraries for host rather than target |
10 |
# Also, cross-compilation with no system libraries for host rather than target |
| 11 |
# is not supported. If host=target, contribs are enough. |
11 |
# is not supported. If host=target, contribs are enough. |
| 12 |
|
12 |
|
| 13 |
CFLAGS := -O2 -g -Wall -Wextra -Wno-parentheses -Wno-unused-parameter |
13 |
CXXFLAGS += -Wall -Wextra -Wno-parentheses -Wno-unused-parameter |
| 14 |
|
14 |
|
| 15 |
ifdef TILES |
15 |
ifdef TILES |
| 16 |
ifndef CONTRIB_SDL |
16 |
ifndef CONTRIB_SDL |
|
Lines 29-52
Link Here
|
| 29 |
PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a |
29 |
PNG_LIB := ../contrib/install/$(ARCH)/lib/libpng.a ../contrib/install/$(ARCH)/lib/libz.a |
| 30 |
endif |
30 |
endif |
| 31 |
|
31 |
|
| 32 |
CFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE) |
32 |
CXXFLAGS += $(SDL_CFLAGS) $(PNG_INCLUDE) |
| 33 |
LDFLAGS += $(SDL_LDFLAGS) $(PNG_LIB) |
33 |
LIBS += $(SDL_LDFLAGS) $(PNG_LIB) |
| 34 |
|
34 |
|
| 35 |
CFLAGS += -DUSE_TILE |
35 |
CXXFLAGS += -DUSE_TILE |
| 36 |
endif |
36 |
endif |
| 37 |
|
37 |
|
| 38 |
ifdef DEBUG |
38 |
ifdef DEBUG |
| 39 |
CFLAGS += -O0 -DDEBUG -ggdb |
39 |
CXXFLAGS += -DDEBUG |
| 40 |
endif |
40 |
endif |
| 41 |
|
41 |
|
| 42 |
ifneq (,$(findstring MINGW,$(uname_S))) |
42 |
ifneq (,$(findstring MINGW,$(uname_S))) |
| 43 |
LDFLAGS += -lgdi32 -lwinmm |
43 |
LIBS += -lgdi32 -lwinmm |
| 44 |
endif |
44 |
endif |
| 45 |
ifeq ($(uname_S),Darwin) |
45 |
ifeq ($(uname_S),Darwin) |
| 46 |
LDFLAGS += -framework AppKit -framework AudioUnit -framework Carbon -framework IOKit -framework OpenGL |
46 |
LIBS += -framework AppKit -framework AudioUnit -framework Carbon -framework IOKit -framework OpenGL |
| 47 |
endif |
47 |
endif |
| 48 |
ifeq ($(uname_S),Linux) |
48 |
ifeq ($(uname_S),Linux) |
| 49 |
LDFLAGS += -ldl -lpthread |
49 |
LIBS += -ldl -lpthread |
| 50 |
endif |
50 |
endif |
| 51 |
|
51 |
|
| 52 |
# Attempt to use a full compiler name, to make |
52 |
# Attempt to use a full compiler name, to make |
|
Lines 129-137
Link Here
|
| 129 |
distclean: clean |
129 |
distclean: clean |
| 130 |
|
130 |
|
| 131 |
%.o: %.cc .cflags |
131 |
%.o: %.cc .cflags |
| 132 |
$(QUIET_HOSTCXX)$(HOSTCXX) $(CFLAGS) -Wp,-MD,$*.d,-MT,$@ -c $< -o $@ |
132 |
$(CXX) $(CXXFLAGS) -Wp,-MD,$*.d,-MT,$@ -c $< -o $@ |
| 133 |
|
133 |
|
| 134 |
$(TILEGEN): $(OBJECTS) |
134 |
$(TILEGEN): $(OBJECTS) |
| 135 |
$(QUIET_HOSTLINK)$(HOSTCXX) $(OBJECTS) -o $@ $(LDFLAGS) |
135 |
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(LDFLAGS) $(LIBS) |
| 136 |
|
136 |
|
| 137 |
.PHONY: all clean distclean |
137 |
.PHONY: all clean distclean |