63 # where it normally would print the revision number |
63 # where it normally would print the revision number |
64 # MIDI: if set, it will use it as custom path to midi player. |
64 # MIDI: if set, it will use it as custom path to midi player. |
65 # If unset, it will use the hardcoded path in the c code |
65 # If unset, it will use the hardcoded path in the c code |
66 # NOVERBOSE: supress all warnings and errors during compilation. |
66 # NOVERBOSE: supress all warnings and errors during compilation. |
67 # It looks nicer, but you will not know what went wrong. Use it on released (stable) sources only |
67 # It looks nicer, but you will not know what went wrong. Use it on released (stable) sources only |
|
68 # VERBOSE: actually show the commands used for compilation. |
68 # |
69 # |
69 # Paths: |
70 # Paths: |
70 # INSTALL: If not set, the game uses the directory of the binary to |
71 # INSTALL: If not set, the game uses the directory of the binary to |
71 # store everything (lang, data, gm, save and openttd.cfg), this is the `old' behaviour. |
72 # store everything (lang, data, gm, save and openttd.cfg), this is the `old' behaviour. |
72 # In this case, none of the following paths are used, you also should _not_ |
73 # In this case, none of the following paths are used, you also should _not_ |
595 @echo 'Compiling and Linking $@'; \ |
596 @echo 'Compiling and Linking $@'; \ |
596 $(CC) $(BASECFLAGS) $(CDEFS) endian_check.c -o $@ |
597 $(CC) $(BASECFLAGS) $(CDEFS) endian_check.c -o $@ |
597 |
598 |
598 |
599 |
599 $(TTD): table/strings.h $(ttd_OBJS) $(LANGS) $(MAKE_CONFIG) |
600 $(TTD): table/strings.h $(ttd_OBJS) $(LANGS) $(MAKE_CONFIG) |
600 @echo 'Compiling and Linking $@'; \ |
601 $(if $(VERBOSE),@echo '$(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS)';,@echo 'Compiling and Linking $@';) \ |
601 $(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS) $(VERBOSE_FILTER) |
602 $(C_LINK) $@ $(TTDLDFLAGS) $(ttd_OBJS) $(LIBS) $(VERBOSE_FILTER) |
602 |
603 |
603 $(OSX): |
604 $(OSX): |
604 @mkdir -p $(OSXAPP)/Contents/MacOS |
605 @mkdir -p $(OSXAPP)/Contents/MacOS |
605 @mkdir -p $(OSXAPP)/Contents/Resources |
606 @mkdir -p $(OSXAPP)/Contents/Resources |
606 @echo "APPL????" > $(OSXAPP)/Contents/PkgInfo |
607 @echo "APPL????" > $(OSXAPP)/Contents/PkgInfo |
736 |
737 |
737 #@echo '$(C_BUILD) $<'; \ |
738 #@echo '$(C_BUILD) $<'; \ |
738 |
739 |
739 |
740 |
740 %.o: %.c $(MAKE_CONFIG) |
741 %.o: %.c $(MAKE_CONFIG) |
741 @echo 'Compiling $(*F).o'; \ |
742 $(if $(VERBOSE),@echo '$(C_BUILD) $<',@echo 'Compiling $(*F).o'); \ |
742 $(C_BUILD) $< -Wp,-MD,.deps/$(*F).pp $(VERBOSE_FILTER) |
743 $(C_BUILD) $< -Wp,-MD,.deps/$(*F).pp $(VERBOSE_FILTER) |
743 @-cp .deps/$(*F).pp .deps/$(*F).P; \ |
744 @-cp .deps/$(*F).pp .deps/$(*F).P; \ |
744 tr ' ' '\012' < .deps/$(*F).pp \ |
745 tr ' ' '\012' < .deps/$(*F).pp \ |
745 | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ |
746 | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ |
746 >> .deps/$(*F).P; \ |
747 >> .deps/$(*F).P; \ |