Changeset - r2503:eebe5d422da5
[Not reviewed]
master
1 1 0
bjarni - 19 years ago 2005-10-10 15:22:47
bjarni@openttd.org
(svn r3029) -Change: [OSX] removed the buggy java midi player, which was rendered obsolite by r3022
2 files changed with 1 insertions and 61 deletions:
0 comments (0 inline, 0 general)
Makefile
Show inline comments
 
@@ -449,101 +449,98 @@ ifdef WITH_ZLIB
 
					endif
 
				endif
 
			endif
 
			LIBS += $(STATIC_ZLIB_PATH)
 
		endif
 
	else
 
		LIBS += -lz
 
	endif
 
endif
 

	
 
# libpng config
 
ifdef WITH_PNG
 
CDEFS += -DWITH_PNG
 
CFLAGS += $(shell $(LIBPNG-CONFIG) --cppflags --I_opts)
 

	
 
# seems like older libpng versions are broken and need this
 
PNGCONFIG_FLAGS = --ldflags --libs
 
ifdef STATIC
 
ifdef OSX
 
# Seems like we need a tiny hack for OSX static to work
 
LIBS += $(shell $(LIBPNG-CONFIG) --prefix)/lib/libpng.a
 
else
 
LIBS += $(shell $(LIBPNG-CONFIG) --static $(PNGCONFIG_FLAGS))
 
endif
 
else
 
LIBS += $(shell $(LIBPNG-CONFIG)  --L_opts $(PNGCONFIG_FLAGS))
 
endif
 
endif
 

	
 
# enables/disables assert()
 
ifdef DISABLE_ASSERTS
 
CFLAGS += -DNDEBUG
 
endif
 

	
 
# automatically disables asserts for release
 
ifdef RELEASE
 
ifndef ENABLE_ASSERTS
 
CFLAGS += -DNDEBUG
 
endif
 
endif
 

	
 
ifdef TRANSLATOR
 
STRGEN_FLAGS=-t
 
else
 
STRGEN_FLAGS=
 
endif
 

	
 

	
 
# MIDI setup
 
# OSX path setup
 
ifdef OSX
 
ifndef MIDI
 
MIDI:=$(OSXAPP)/Contents/MacOS/track_starter
 
endif
 
ifndef SECOND_DATA_PATH
 
SECOND_DATA_PATH:="$(OSXAPP)/Contents/Data/"
 
endif
 
ifndef CUSTOM_LANG_DIR
 
ifndef DEDICATED
 
CUSTOM_LANG_DIR:="$(OSXAPP)/Contents/Lang/"
 
endif
 
endif
 
endif
 

	
 
ifdef MIDI
 
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\"
 
ifdef MIDI_ARG
 
CDEFS += -DMIDI_ARG=\"$(MIDI_ARG)\"
 
endif
 
endif
 

	
 
ifdef WITH_NETWORK
 
CDEFS += -DENABLE_NETWORK
 
ifdef QNX
 
LIBS += -lsocket
 
endif
 
endif
 

	
 

	
 
ifdef SECOND_DATA_PATH
 
CDEFS += -DSECOND_DATA_DIR=\"$(SECOND_DATA_PATH)/\"
 
endif
 

	
 
ifdef CUSTOM_LANG_DIR
 
CDEFS += -DCUSTOM_LANG_DIR=\"$(CUSTOM_LANG_DIR)/\"
 
endif
 

	
 
ifdef WITH_DIRECTMUSIC
 
CDEFS += -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT
 
endif
 

	
 
ifdef WIN32
 
LIBS += -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32
 
ifdef WITH_DIRECTMUSIC
 
LIBS += -lstdc++
 
endif
 
TTDLDFLAGS += -Wl,--subsystem,windows
 
endif
 

	
 
ifndef DEST_DIR
 
DEST_DIR = $(DESTDIR)
 
endif
 
@@ -759,98 +756,96 @@ else
 
	Q = @
 
endif
 

	
 

	
 
##############################################################################
 
#
 
# Targets
 
#
 

	
 

	
 
### Normal build rules
 

	
 

	
 
ifdef OSX
 
OSX:=OSX
 
OSX_MIDI_PLAYER_FILE:=os/macos/OpenTTDMidi.class
 
endif
 

	
 

	
 
all: endian_target.h endian_host.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) $(endwarnings)
 

	
 
endian_host.h: $(ENDIAN_CHECK)
 
	@echo '===> Testing endianness for host'
 
	$(Q)./$(ENDIAN_CHECK) > $@
 

	
 
endian_target.h: $(ENDIAN_CHECK)
 
	@echo '===> Testing endianness for target'
 
	$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@
 

	
 
$(ENDIAN_CHECK): endian_check.c
 
	@echo '===> Compiling and Linking $@'
 
	$(Q)$(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@
 

	
 

	
 
$(TTD): $(OBJS) $(MAKE_CONFIG)
 
	@echo '===> Linking $@'
 
	$(Q)$(CC) $(LDFLAGS) $(TTDLDFLAGS) $(OBJS) $(LIBS) -o $@
 

	
 
$(OSX): $(TTD)
 
	$(Q)rm -fr "$(OSXAPP)"
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Resources
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Data
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Lang
 
	$(Q)echo "APPL????" > "$(OSXAPP)"/Contents/PkgInfo
 
	$(Q)cp os/macosx/openttd.icns "$(OSXAPP)"/Contents/Resources/openttd.icns
 
	$(Q)os/macosx/plistgen.sh "$(OSXAPP)" "$(REV)"
 
	$(Q)cp os/macosx/track_starter "$(OSXAPP)"/Contents/MacOS
 
	$(Q)ls os/macosx | grep -q "\.class" || \
 
	       javac os/macosx/OpenTTDMidi.java
 
	$(Q)cp os/macosx/OpenTTDMidi.class "$(OSXAPP)"/Contents/MacOS
 
	$(Q)cp data/* "$(OSXAPP)"/Contents/Data/
 
	$(Q)cp lang/*.lng "$(OSXAPP)"/Contents/Lang/
 
	$(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD)
 

	
 
$(endwarnings): $(64_bit_warnings)
 

	
 
$(64_bit_warnings):
 
	$(warning 64 bit CPUs will get some 64 bit specific bugs!)
 
	$(warning If you see any bugs, include in your bug report that you use a 64 bit CPU)
 

	
 
$(STRGEN): strgen/strgen.c endian_host.h
 
	@echo '===> Compiling and Linking $@'
 
	$(Q)$(CC_HOST) $(CFLAGS_HOST) $(CDEFS) $< -o $@
 

	
 
table/strings.h: lang/english.txt $(STRGEN)
 
	@echo '===> Generating $@'
 
	$(Q)$(STRGEN)
 

	
 
lang/%.lng: lang/%.txt $(STRGEN) lang/english.txt
 
	@echo '===> Compiling language $(*F)'
 
	$(Q)$(STRGEN) $(STRGEN_FLAGS) $< $(LANG_ERRORS) || rm -f $@
 

	
 
winres.o: openttd.rc
 
	@echo '===> Compiling resource $<'
 
	$(Q)$(WINDRES) -o $@ $<
 

	
 
ifdef MORPHOS
 
release: all
 
	$(Q)rm -fr "/t/openttd-$(RELEASE)-morphos.lha"
 
	$(Q)mkdir -p "/t/"
 
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos"
 
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/docs"
 
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/data"
 
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/lang"
 
	$(Q)mkdir -p "/t/openttd-$(RELEASE)-morphos/scenario"
 
	$(Q)cp -R $(TTD)                      "/t/openttd-$(RELEASE)-morphos/"
 
	$(Q)cp data/*                         "/t/openttd-$(RELEASE)-morphos/data/"
 
	$(Q)cp lang/*.lng                     "/t/openttd-$(RELEASE)-morphos/lang/"
 
	$(Q)cp scenario/*                     "/t/openttd-$(RELEASE)-morphos/scenario/"
 
	$(Q)cp readme.txt                     "/t/openttd-$(RELEASE)-morphos/docs/ReadMe"
 
	$(Q)cp docs/console.txt               "/t/openttd-$(RELEASE)-morphos/docs/Console"
 
	$(Q)cp COPYING                        "/t/openttd-$(RELEASE)-morphos/docs/"
 
	$(Q)cp changelog.txt                  "/t/openttd-$(RELEASE)-morphos/docs/ChangeLog"
 
	$(Q)cp known-bugs.txt				   "/t/openttd-$(RELEASE)-morphos/docs/known-bugs.txt"
 
	$(Q)cp os/morphos/icons/openttd.info  "/t/openttd-$(RELEASE)-morphos/$(TTD).info"
 
	$(Q)cp os/morphos/icons/docs.info     "/t/openttd-$(RELEASE)-morphos/docs.info"
 
	$(Q)cp os/morphos/icons/drawer.info   "/t/openttd-$(RELEASE)-morphos.info"
os/macosx/OpenTTDMidi.java
Show inline comments
 
deleted file
0 comments (0 inline, 0 general)