equal
deleted
inserted
replaced
79 ############################################################################## |
79 ############################################################################## |
80 # |
80 # |
81 # Configuration |
81 # Configuration |
82 # |
82 # |
83 |
83 |
|
84 # Makefile version tag |
|
85 # it checks if the version tag in makefile.config is the same and force update outdated config files |
|
86 MAKEFILE_VERSION:=1 |
|
87 |
84 # CONFIG_WRITER have to be found even for manual configuration |
88 # CONFIG_WRITER have to be found even for manual configuration |
85 CONFIG_WRITER=makefiledir/Makefile.config_writer |
89 CONFIG_WRITER=makefiledir/Makefile.config_writer |
86 |
90 |
87 ifndef MANUAL_CONFIG |
91 ifndef MANUAL_CONFIG |
88 # Automatic configuration |
92 # Automatic configuration |
97 -include $(MAKE_CONFIG) |
101 -include $(MAKE_CONFIG) |
98 else |
102 else |
99 CONFIG_INCLUDED:=1 |
103 CONFIG_INCLUDED:=1 |
100 endif |
104 endif |
101 |
105 |
102 # tests if makefile.config contains the new needed SDL-CONFIG |
106 # updates makefile.config if it's outdated |
103 # it updates makefile.config if needed. Flags like ENABLE_NETWORK are remembered |
107 ifneq ($(MAKEFILE_VERSION),$(CONFIG_VERSION)) |
104 ifndef SDL-CONFIG |
|
105 ifdef WITH_SDL |
|
106 ifndef MANUAL_CONFIG |
|
107 #network is enabled by default |
|
108 ENABLE_NETWORK:=1 |
|
109 UPDATECONFIG:=upgradeconf |
108 UPDATECONFIG:=upgradeconf |
110 CONFIG_INCLUDED:= |
109 CONFIG_INCLUDED:= |
111 else |
110 else |
112 # this should define SDL-CONFIG for manual configuration |
111 # this should define SDL-CONFIG for manual configuration |
113 ifeq ($(shell uname),FreeBSD) |
112 ifeq ($(shell uname),FreeBSD) |
114 SDL-CONFIG:=sdl11-config |
113 SDL-CONFIG:=sdl11-config |
115 else |
114 else |
116 SDL-CONFIG:=sdl-config |
115 SDL-CONFIG:=sdl-config |
117 endif |
116 endif |
118 endif |
117 endif |
119 endif |
|
120 endif |
|
121 |
118 |
122 ifndef CONFIG_INCLUDED |
119 ifndef CONFIG_INCLUDED |
123 -include $(LIB_DETECTION) |
120 -include $(LIB_DETECTION) |
124 endif |
121 endif |
125 |
122 |
134 ifdef DISPLAY_WARNINGS |
131 ifdef DISPLAY_WARNINGS |
135 WARNING_DISPLAY:=-fstrict-aliasing |
132 WARNING_DISPLAY:=-fstrict-aliasing |
136 VERBOSE_FILTER = |
133 VERBOSE_FILTER = |
137 else |
134 else |
138 WARNING_DISPLAY:=-fno-strict-aliasing |
135 WARNING_DISPLAY:=-fno-strict-aliasing |
|
136 endif |
|
137 |
|
138 ifdef SUPRESS_LANG_ERRORS |
|
139 ifndef VERBOSE_FILTER |
|
140 LANG_ERRORS = >/dev/null 2>&1 |
|
141 endif |
139 endif |
142 endif |
140 |
143 |
141 ifdef STATIC |
144 ifdef STATIC |
142 ifndef WIN32 |
145 ifndef WIN32 |
143 ifndef OSX |
146 ifndef OSX |
544 |
547 |
545 table/strings.h: lang/english.lng |
548 table/strings.h: lang/english.lng |
546 |
549 |
547 lang/%.lng: lang/%.txt $(STRGEN) |
550 lang/%.lng: lang/%.txt $(STRGEN) |
548 @echo 'Generating $@'; \ |
551 @echo 'Generating $@'; \ |
549 $(STRGEN) $(STRGEN_FLAGS) $< $(VERBOSE_FILTER) |
552 $(STRGEN) $(STRGEN_FLAGS) $< $(VERBOSE_FILTER) $(LANG_ERRORS) |
550 |
553 |
551 winres.o: ttd.rc |
554 winres.o: ttd.rc |
552 windres -o $@ $< |
555 windres -o $@ $< |
553 |
556 |
554 |
557 |