1
Description: Sort source files for deterministic linking order
2
Author: Reiner Herrmann <reiner@reiner-h.de>
7
# (ADD_SOURCES can optionally be set at make command line)
10
-SOURCES = $(wildcard *.cc common/*.cc) $(ADD_SOURCES)
11
+SOURCES = $(sort $(wildcard *.cc common/*.cc)) $(ADD_SOURCES)
12
INCLUDE = -I. -Icommon -Ilib
14
-hoichess_SOURCES = $(SOURCES) $(wildcard chess/*.cc)
15
+hoichess_SOURCES = $(SOURCES) $(sort $(wildcard chess/*.cc))
16
all-hoichess: override CXXFLAGS += -DHOICHESS
17
all-hoichess: override INCLUDE += -Ichess
19
-hoixiangqi_SOURCES = $(SOURCES) $(wildcard xiangqi/*.cc)
20
+hoixiangqi_SOURCES = $(SOURCES) $(sort $(wildcard xiangqi/*.cc))
21
all-hoixiangqi: override CXXFLAGS += -DHOIXIANGQI
22
all-hoixiangqi: override INCLUDE += -Ixiangqi
25
ifneq (,$(findstring mingw32,$(TARGET)))
26
override INCLUDE += -Iwin32 -Ilib
27
override LDFLAGS += -static-libgcc -static-libstdc++
28
-SOURCES += $(wildcard win32/*.cc)
29
+SOURCES += $(sort $(wildcard win32/*.cc))
30
SOURCES += lib/snprintf.cc lib/strtok_r.cc
34
override INCLUDE += -Isparc32
35
ifneq (,$(shell echo '' | $(CXX) -E -dM - | grep __leonbare__))
36
override INCLUDE += -Isparc32/leon
37
-SOURCES += $(wildcard sparc32/leon/*.cc)
38
+SOURCES += $(sort $(wildcard sparc32/leon/*.cc))
40
-SOURCES += $(wildcard sparc32/*.cc)
41
+SOURCES += $(sort $(wildcard sparc32/*.cc))
42
SOURCES += lib/snprintf.cc