mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r1939) Revert part of r1938 which accidently crept in
This commit is contained in:
parent
aee2b0c50a
commit
3e142a6297
44
Makefile
44
Makefile
@ -687,14 +687,39 @@ LANGS = $(LANG_TXT:%.txt=%.lng)
|
|||||||
#
|
#
|
||||||
|
|
||||||
# If we are verbose, we will show commands prefixed by $(Q) (which acts as
|
# If we are verbose, we will show commands prefixed by $(Q) (which acts as
|
||||||
# @ in the non-verbose mode)
|
# @ in the non-verbose mode), and we will show the "real" cmds instead of
|
||||||
|
# their quiet versions (which are used in the non-verbose mode).
|
||||||
# Inspired by the Linux kernel build system.
|
# Inspired by the Linux kernel build system.
|
||||||
ifdef VERBOSE
|
ifdef VERBOSE
|
||||||
Q =
|
Q =
|
||||||
|
quiet =
|
||||||
else
|
else
|
||||||
Q = @
|
Q = @
|
||||||
|
quiet = quiet_
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Show the command (quiet or non-quiet version based on the assignment
|
||||||
|
# just above) and then execute it.
|
||||||
|
cmd = @$(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
|
||||||
|
|
||||||
|
|
||||||
|
# The build commands themselves. Note that if you omit the quiet version,
|
||||||
|
# nothing will be shown in the non-verbose mode.
|
||||||
|
|
||||||
|
quiet_cmd_compile_link = '===> Compiling and Linking $@'
|
||||||
|
cmd_compile_link = $(CC) $(BASECFLAGS) $(CDEFS) $< -o $@
|
||||||
|
|
||||||
|
quiet_cmd_ttd_link = '===> Linking $@'
|
||||||
|
cmd_ttd_link = $(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@
|
||||||
|
|
||||||
|
COMPILE_PARAMS=$(CFLAGS) $(CDEFS) -MD -c $< -o $@
|
||||||
|
|
||||||
|
quiet_cmd_c_compile = '===> Compiling $<'
|
||||||
|
cmd_c_compile = $(CC) $(COMPILE_PARAMS)
|
||||||
|
|
||||||
|
quiet_cmd_cxx_compile = '===> Compiling $<'
|
||||||
|
cmd_cxx_compile = $(CXX) $(COMPILE_PARAMS)
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -717,13 +742,11 @@ endian.h: $(ENDIAN_CHECK)
|
|||||||
$(Q)./$(ENDIAN_CHECK) > $@
|
$(Q)./$(ENDIAN_CHECK) > $@
|
||||||
|
|
||||||
$(ENDIAN_CHECK): endian_check.c
|
$(ENDIAN_CHECK): endian_check.c
|
||||||
@echo '===> Compiling and Linking $@'
|
$(call cmd,compile_link)
|
||||||
$(Q)$(CC) $(BASECFLAGS) $(CDEFS) $< -o $@
|
|
||||||
|
|
||||||
|
|
||||||
$(TTD): table/strings.h $(OBJS) $(MAKE_CONFIG)
|
$(TTD): table/strings.h $(OBJS) $(MAKE_CONFIG)
|
||||||
@echo '===> Linking $@'
|
$(call cmd,ttd_link)
|
||||||
$(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@
|
|
||||||
|
|
||||||
$(OSX): $(TTD)
|
$(OSX): $(TTD)
|
||||||
$(Q)rm -fr "$(OSXAPP)"
|
$(Q)rm -fr "$(OSXAPP)"
|
||||||
@ -749,8 +772,7 @@ $(64_bit_warnings):
|
|||||||
$(warning If you see any bugs, include in your bug report that you use a 64 bit CPU)
|
$(warning If you see any bugs, include in your bug report that you use a 64 bit CPU)
|
||||||
|
|
||||||
$(STRGEN): strgen/strgen.c endian.h
|
$(STRGEN): strgen/strgen.c endian.h
|
||||||
@echo '===> Compiling and Linking $@'
|
$(call cmd,compile_link)
|
||||||
$(Q)$(CC) $(BASECFLAGS) $(CDEFS) $< -o $@
|
|
||||||
|
|
||||||
table/strings.h: lang/english.txt $(STRGEN)
|
table/strings.h: lang/english.txt $(STRGEN)
|
||||||
@echo '===> Generating $@'
|
@echo '===> Generating $@'
|
||||||
@ -935,13 +957,11 @@ DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
|||||||
# therefore we do not need to watch deps.
|
# therefore we do not need to watch deps.
|
||||||
|
|
||||||
%.o: %.c $(MAKE_CONFIG) endian.h table/strings.h
|
%.o: %.c $(MAKE_CONFIG) endian.h table/strings.h
|
||||||
@echo '===> Compiling $<'
|
$(call cmd,c_compile)
|
||||||
$(Q)$(CC) $(CFLAGS) $(CDEFS) -MD -c $< -o $@
|
|
||||||
@mv $(<:%.c=%.d) $(<:%.c=.deps/%.d)
|
@mv $(<:%.c=%.d) $(<:%.c=.deps/%.d)
|
||||||
|
|
||||||
%.o: %.cpp $(MAKE_CONFIG) endian.h table/strings.h
|
%.o: %.cpp $(MAKE_CONFIG) endian.h table/strings.h
|
||||||
@echo '===> Compiling $<'
|
$(call cmd,cxx_compile)
|
||||||
$(Q)$(CXX) $(CFLAGS) $(CDEFS) -MD -c $< -o $@
|
|
||||||
@mv $(<:%.c=%.d) $(<:%.c=.deps/%.d)
|
@mv $(<:%.c=%.d) $(<:%.c=.deps/%.d)
|
||||||
|
|
||||||
# Silence stale header dependencies
|
# Silence stale header dependencies
|
||||||
@ -950,6 +970,6 @@ DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
|||||||
|
|
||||||
|
|
||||||
info:
|
info:
|
||||||
@echo 'CFLAGS = $(CFLAGS) $(CDEFS)'
|
@echo 'CFLAGS = $(CFLAGS)'
|
||||||
@echo 'LDFLAGS = $(LDFLAGS)'
|
@echo 'LDFLAGS = $(LDFLAGS)'
|
||||||
@echo 'LIBS = $(LIBS)'
|
@echo 'LIBS = $(LIBS)'
|
||||||
|
Loading…
Reference in New Issue
Block a user