mirror of https://github.com/OpenTTD/OpenTTD
(svn r655) Add the necessary bits to make building on SunOS/Solaris work
parent
13f0b6c0cf
commit
87adce3ca0
10
Makefile
10
Makefile
|
@ -45,6 +45,7 @@
|
||||||
# OSX: building on Mac OS X
|
# OSX: building on Mac OS X
|
||||||
# MORPHOS: building on MorphOS
|
# MORPHOS: building on MorphOS
|
||||||
# BEOS: building on BeOS
|
# BEOS: building on BeOS
|
||||||
|
# SUNOS: building on SunOS (Solaris)
|
||||||
#
|
#
|
||||||
# Summary of library choice defines
|
# Summary of library choice defines
|
||||||
# WITH_ZLIB: savegames using zlib
|
# WITH_ZLIB: savegames using zlib
|
||||||
|
@ -242,7 +243,7 @@ REV_NUMBER := $(shell if test -d .svn; then svnversion . | tr -dc 0-9; fi)
|
||||||
ifdef RELEASE
|
ifdef RELEASE
|
||||||
REV:=$(RELEASE)
|
REV:=$(RELEASE)
|
||||||
else
|
else
|
||||||
REV := $(shell if test -d .svn; then echo -n r; svnversion .; fi)
|
REV := $(shell if test -d .svn; then svnversion . | awk '{ print "r"$0 }'; fi)
|
||||||
tmp_test:=$(shell echo "$(REV)" | grep "M" )
|
tmp_test:=$(shell echo "$(REV)" | grep "M" )
|
||||||
ifdef tmp_test
|
ifdef tmp_test
|
||||||
REV_NUMBER:=1
|
REV_NUMBER:=1
|
||||||
|
@ -341,6 +342,13 @@ ifdef WITH_NETWORK
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef SUNOS
|
||||||
|
CDEFS += -DSUNOS
|
||||||
|
ifdef WITH_NETWORK
|
||||||
|
LDFLAGS += -lnsl -lsocket
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# SDL config
|
# SDL config
|
||||||
ifdef WITH_SDL
|
ifdef WITH_SDL
|
||||||
CDEFS += -DWITH_SDL
|
CDEFS += -DWITH_SDL
|
||||||
|
|
|
@ -77,6 +77,7 @@ $(MAKE_CONFIG):
|
||||||
$(call CONFIG_LINE,FREEBSD:=$(FREEBSD))
|
$(call CONFIG_LINE,FREEBSD:=$(FREEBSD))
|
||||||
$(call CONFIG_LINE,MORPHOS:=$(MORPHOS))
|
$(call CONFIG_LINE,MORPHOS:=$(MORPHOS))
|
||||||
$(call CONFIG_LINE,BEOS:=$(BEOS))
|
$(call CONFIG_LINE,BEOS:=$(BEOS))
|
||||||
|
$(call CONFIG_LINE,SUNOS:=$(SUNOS))
|
||||||
$(call CONFIG_LINE,CYGWIN:=$(CYGWIN))
|
$(call CONFIG_LINE,CYGWIN:=$(CYGWIN))
|
||||||
$(call CONFIG_LINE,MINGW:=$(MINGW))
|
$(call CONFIG_LINE,MINGW:=$(MINGW))
|
||||||
$(call CONFIG_LINE,)
|
$(call CONFIG_LINE,)
|
||||||
|
|
|
@ -39,6 +39,13 @@ BEOS_NET_SERVER:=1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Automatically recognize if building on SunOS/Solaris
|
||||||
|
ifeq ($(shell uname), SunOS)
|
||||||
|
SUNOS:=1
|
||||||
|
# SunOS uses UNIX setup too
|
||||||
|
UNIX:=1
|
||||||
|
endif
|
||||||
|
|
||||||
# FreeBSD uses sdl11 instead of sdl
|
# FreeBSD uses sdl11 instead of sdl
|
||||||
ifdef FREEBSD
|
ifdef FREEBSD
|
||||||
SDL-CONFIG:=sdl11-config
|
SDL-CONFIG:=sdl11-config
|
||||||
|
|
4
stdafx.h
4
stdafx.h
|
@ -28,6 +28,10 @@
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SUNOS
|
||||||
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BSWAP32(x) ((((x) >> 24) & 0xFF) | (((x) >> 8) & 0xFF00) | (((x) << 8) & 0xFF0000) | (((x) << 24) & 0xFF000000))
|
#define BSWAP32(x) ((((x) >> 24) & 0xFF) | (((x) >> 8) & 0xFF00) | (((x) << 8) & 0xFF0000) | (((x) << 24) & 0xFF000000))
|
||||||
#define BSWAP16(x) ((x) >> 8 | (x) << 8)
|
#define BSWAP16(x) ((x) >> 8 | (x) << 8)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue