|
|
@ -107,6 +107,14 @@
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# VERBOSE: show full compiler invocations instead of brief progress messages
|
|
|
|
# VERBOSE: show full compiler invocations instead of brief progress messages
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
# Special for crosscompiling there are some commands available:
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# ENDIAN_FORCE: forces the endian-check to give a certain result. Can be either BE or LE.
|
|
|
|
|
|
|
|
# WINDRES: the location of your windres
|
|
|
|
|
|
|
|
# CC_HOST: the gcc of your localhost if you are making a target that produces incompatible executables
|
|
|
|
|
|
|
|
# CFLAGS_HOST: cflags used for CC_HOST. Make it something if you are getting errors when you try to compi
|
|
|
|
|
|
|
|
# windows executables on linux. (just: CFLAGS_HOST:='-I' or something)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Experimental (does not work properly):
|
|
|
|
# Experimental (does not work properly):
|
|
|
|
# WITH_DIRECTMUSIC: enable DirectMusic MIDI support
|
|
|
|
# WITH_DIRECTMUSIC: enable DirectMusic MIDI support
|
|
|
|
|
|
|
|
|
|
|
@ -119,7 +127,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
# Makefile version tag
|
|
|
|
# Makefile version tag
|
|
|
|
# it checks if the version tag in Makefile.config is the same and force update outdated config files
|
|
|
|
# it checks if the version tag in Makefile.config is the same and force update outdated config files
|
|
|
|
MAKEFILE_VERSION:=6
|
|
|
|
MAKEFILE_VERSION:=7
|
|
|
|
|
|
|
|
|
|
|
|
# CONFIG_WRITER has to be found even for manual configuration
|
|
|
|
# CONFIG_WRITER has to be found even for manual configuration
|
|
|
|
CONFIG_WRITER=makefiledir/Makefile.config_writer
|
|
|
|
CONFIG_WRITER=makefiledir/Makefile.config_writer
|
|
|
@ -261,6 +269,23 @@ endwarnings:=endwarnings
|
|
|
|
BASECFLAGS += -m64
|
|
|
|
BASECFLAGS += -m64
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if there is a windres override
|
|
|
|
|
|
|
|
ifndef WINDRES
|
|
|
|
|
|
|
|
WINDRES = windres
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if we have a new target
|
|
|
|
|
|
|
|
ifdef CC_TARGET
|
|
|
|
|
|
|
|
CC = $(CC_TARGET)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if CC_HOST is defined. If not, it is CC
|
|
|
|
|
|
|
|
ifndef CC_HOST
|
|
|
|
|
|
|
|
CC_HOST = $(CC)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CFLAGS_HOST
|
|
|
|
|
|
|
|
CFLAGS_HOST = $(BASECFLAGS)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# When calling the compiler, use these flags
|
|
|
|
# When calling the compiler, use these flags
|
|
|
|
# -g debugging symbols
|
|
|
|
# -g debugging symbols
|
|
|
@ -520,7 +545,10 @@ CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ifdef WIN32
|
|
|
|
ifdef WIN32
|
|
|
|
LIBS += -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -lstdc++
|
|
|
|
LIBS += -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32
|
|
|
|
|
|
|
|
ifdef WITH_DIRECTMUSIC
|
|
|
|
|
|
|
|
LIBS += -lstdc++
|
|
|
|
|
|
|
|
endif
|
|
|
|
TTDLDFLAGS += -Wl,--subsystem,windows
|
|
|
|
TTDLDFLAGS += -Wl,--subsystem,windows
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
@ -723,7 +751,7 @@ cmd = @$(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
|
|
|
|
# nothing will be shown in the non-verbose mode.
|
|
|
|
# nothing will be shown in the non-verbose mode.
|
|
|
|
|
|
|
|
|
|
|
|
quiet_cmd_compile_link = '===> Compiling and Linking $@'
|
|
|
|
quiet_cmd_compile_link = '===> Compiling and Linking $@'
|
|
|
|
cmd_compile_link = $(CC) $(BASECFLAGS) $(CDEFS) $< -o $@
|
|
|
|
cmd_compile_link = $(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@
|
|
|
|
|
|
|
|
|
|
|
|
quiet_cmd_ttd_link = '===> Linking $@'
|
|
|
|
quiet_cmd_ttd_link = '===> Linking $@'
|
|
|
|
cmd_ttd_link = $(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@
|
|
|
|
cmd_ttd_link = $(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@
|
|
|
@ -755,7 +783,7 @@ all: endian.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) $(endwarnings)
|
|
|
|
|
|
|
|
|
|
|
|
endian.h: $(ENDIAN_CHECK)
|
|
|
|
endian.h: $(ENDIAN_CHECK)
|
|
|
|
@echo '===> Testing endianness'
|
|
|
|
@echo '===> Testing endianness'
|
|
|
|
$(Q)./$(ENDIAN_CHECK) > $@
|
|
|
|
$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@
|
|
|
|
|
|
|
|
|
|
|
|
$(ENDIAN_CHECK): endian_check.c
|
|
|
|
$(ENDIAN_CHECK): endian_check.c
|
|
|
|
$(call cmd,compile_link)
|
|
|
|
$(call cmd,compile_link)
|
|
|
@ -800,7 +828,7 @@ lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt
|
|
|
|
|
|
|
|
|
|
|
|
winres.o: ttd.rc
|
|
|
|
winres.o: ttd.rc
|
|
|
|
@echo '===> Compiling resource $<'
|
|
|
|
@echo '===> Compiling resource $<'
|
|
|
|
$(Q)windres -o $@ $<
|
|
|
|
$(Q)$(WINDRES) -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
ifdef MORPHOS
|
|
|
|
ifdef MORPHOS
|
|
|
|
release: all
|
|
|
|
release: all
|
|
|
|