Changeset - r2500:4297cb3c6bc0
[Not reviewed]
master
0 2 0
bjarni - 19 years ago 2005-10-07 16:48:53
bjarni@openttd.org
(svn r3026) -Fix: [OSX] fixed bug that prevented dedicated servers from compiling (introduced in r3022)
2 files changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
Makefile
Show inline comments
 
@@ -383,48 +383,53 @@ CDEFS += -DBEOS
 
LDFLAGS += -lmidi -lbe -lpthread
 
ifdef WITH_NETWORK
 
	ifdef BEOS_NET_SERVER
 
		CDEFS += -DBEOS_NET_SERVER
 
		LDFLAGS += -lnet
 
	else
 
		# BONE needs a few more libraries than R5
 
		LDFLAGS += -lbind -lsocket
 
	endif
 
endif
 
endif
 

	
 
ifdef MORPHOS
 
# -Wstrict-prototypes generates much noise because of system headers
 
CFLAGS += -Wno-strict-prototypes
 
endif
 

	
 
ifdef SUNOS
 
CDEFS += -DSUNOS
 
ifdef WITH_NETWORK
 
LDFLAGS += -lnsl -lsocket
 
endif
 
endif
 

	
 
# tell the source that we are building a dedicated server
 
ifdef DEDICATED
 
CDEFS += -DDEDICATED
 
endif
 

	
 
# SDL config
 
ifdef WITH_SDL
 
CDEFS += -DWITH_SDL
 
CFLAGS += $(shell $(SDL-CONFIG) --cflags)
 
ifdef STATIC
 
LIBS += $(shell $(SDL-CONFIG) --static-libs)
 
else
 
LIBS += $(shell $(SDL-CONFIG) --libs)
 
endif
 
endif
 

	
 

	
 
# zlib config
 
ifdef WITH_ZLIB
 
	CDEFS +=  -DWITH_ZLIB
 
	ifdef STATIC
 
		ifdef OSX
 
# zlib is default on OSX, so everybody have it. No need for static linking
 
			LIBS += -lz
 
		else
 
			ifndef STATIC_ZLIB_PATH
 
				ifndef MANUAL_CONFIG
 
					# updates Makefile.config with the zlib path
 
					UPDATECONFIG:=upgradeconf
 
@@ -477,51 +482,53 @@ 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
 
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
 

	
 
@@ -691,50 +698,52 @@ C_SOURCES += ai/trolly/pathfinder.c
 
C_SOURCES += ai/trolly/shared.c
 

	
 
CXX_SOURCES =
 

	
 
OBJC_SOURCES =
 

	
 
ifdef WITH_SDL
 
C_SOURCES += sdl.c
 
C_SOURCES += sound/sdl_s.c
 
C_SOURCES += video/sdl_v.c
 
endif
 

	
 
ifdef WIN32
 
C_SOURCES += win32.c
 
C_SOURCES += music/win32_m.c
 
C_SOURCES += sound/win32_s.c
 
C_SOURCES += video/win32_v.c
 
else
 
C_SOURCES += unix.c
 
C_SOURCES += music/extmidi.c
 
endif
 

	
 
ifdef OSX
 
OBJC_SOURCES += os/macosx/macos.m
 
ifndef DEDICATED
 
C_SOURCES    += music/qtmidi.c
 
endif
 
endif
 

	
 
OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o) $(OBJC_SOURCES:%.m=%.o)
 

	
 
ifdef BEOS
 
CXX_SOURCES += music/bemidi.cpp
 
endif
 

	
 
ifdef WIN32
 
# Resource file
 
OBJS += winres.o
 
endif
 

	
 
ifdef WITH_DIRECTMUSIC
 
CXX_SOURCES += music/dmusic.cpp
 
endif
 

	
 
DEPS = $(OBJS:%.o=.deps/%.d)
 

	
 
LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))
 
LANGS = $(LANG_TXT:%.txt=%.lng)
 

	
 

	
 
##############################################################################
 
#
driver.c
Show inline comments
 
@@ -31,49 +31,49 @@ typedef struct DriverDesc {
 
	const HalCommonDriver* drv;
 
} DriverDesc;
 

	
 
typedef struct DriverClass {
 
	const DriverDesc *descs;
 
	const char *name;
 
	const HalCommonDriver** drv;
 
} DriverClass;
 

	
 

	
 
#define M(x, y, z) { x, y, (const HalCommonDriver*)z }
 
static const DriverDesc _music_driver_descs[] = {
 
#ifdef __BEOS__
 
	M("bemidi",  "BeOS MIDI Driver",        &_bemidi_music_driver),
 
#endif
 
#ifdef __OS2__
 
	M("os2",     "OS/2 Music Driver",       &_os2_music_driver),
 
#endif
 
#ifdef WIN32_ENABLE_DIRECTMUSIC_SUPPORT
 
	M("dmusic",  "DirectMusic MIDI Driver", &_dmusic_midi_driver),
 
#endif
 
#ifdef WIN32
 
	M("win32",   "Win32 MIDI Driver",       &_win32_music_driver),
 
#endif
 
#ifdef __APPLE__
 
#if defined(__APPLE__) && !defined(DEDICATED)
 
	M("qt",      "QuickTime MIDI Driver",   &_qtime_music_driver),
 
#endif
 
#ifdef UNIX
 
#if !defined(__MORPHOS__) && !defined(__AMIGA__)
 
	M("extmidi", "External MIDI Driver",    &_extmidi_music_driver),
 
#endif
 
#endif
 
	M("null",    "Null Music Driver",       &_null_music_driver),
 
	M(NULL, NULL, NULL)
 
};
 

	
 
static const DriverDesc _sound_driver_descs[] = {
 
#ifdef WIN32
 
	M("win32", "Win32 WaveOut Driver", &_win32_sound_driver),
 
#endif
 
#ifdef WITH_SDL
 
	M("sdl",   "SDL Sound Driver",     &_sdl_sound_driver),
 
#endif
 
	M("null",  "Null Sound Driver",    &_null_sound_driver),
 
	M(NULL, NULL, NULL)
 
};
 

	
 
static const DriverDesc _video_driver_descs[] = {
 
#ifdef WIN32
0 comments (0 inline, 0 general)