Subversion Repositories eduke32

Rev

Rev 5028 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5028 Rev 5037
Line 100... Line 100...
100
# Detect the platform if it wasn't explicitly given to us from
100
# Detect the platform if it wasn't explicitly given to us from
101
# the outside world. This allows cross-compilation by overriding
101
# the outside world. This allows cross-compilation by overriding
102
# CC and giving us PLATFORM specifically.
102
# CC and giving us PLATFORM specifically.
103
#
103
#
104
ifndef HOST
104
ifndef HOSTPLATFORM
105
    uname:=$(strip $(shell uname -s))
105
    uname:=$(strip $(shell uname -s))
106
    HOST=UNKNOWN
106
    HOSTPLATFORM=UNKNOWN
107
    ifeq ($(findstring Linux,$(uname)),Linux)
107
    ifeq ($(findstring Linux,$(uname)),Linux)
108
        HOST=LINUX
108
        HOSTPLATFORM=LINUX
109
    endif
109
    endif
110
    ifeq ($(findstring BSD,$(uname)),BSD)
110
    ifeq ($(findstring BSD,$(uname)),BSD)
111
        HOST=BSD
111
        HOSTPLATFORM=BSD
112
    endif
112
    endif
113
    ifeq ($(findstring MINGW,$(uname)),MINGW)
113
    ifeq ($(findstring MINGW,$(uname)),MINGW)
114
        HOST=WINDOWS
114
        HOSTPLATFORM=WINDOWS
115
    endif
115
    endif
116
    ifeq ($(findstring Darwin,$(uname)),Darwin)
116
    ifeq ($(findstring Darwin,$(uname)),Darwin)
117
        HOST=DARWIN
117
        HOSTPLATFORM=DARWIN
118
    endif
118
    endif
119
    ifeq ($(findstring BeOS,$(uname)),BeOS)
119
    ifeq ($(findstring BeOS,$(uname)),BeOS)
120
        HOST=BEOS
120
        HOSTPLATFORM=BEOS
121
    endif
121
    endif
122
    ifeq ($(findstring skyos,$(uname)),skyos)
122
    ifeq ($(findstring skyos,$(uname)),skyos)
123
        HOST=SKYOS
123
        HOSTPLATFORM=SKYOS
124
    endif
124
    endif
125
    ifeq ($(findstring QNX,$(uname)),QNX)
125
    ifeq ($(findstring QNX,$(uname)),QNX)
126
        HOST=QNX
126
        HOSTPLATFORM=QNX
127
    endif
127
    endif
128
    ifeq ($(findstring SunOS,$(uname)),SunOS)
128
    ifeq ($(findstring SunOS,$(uname)),SunOS)
129
        HOST=SUNOS
129
        HOSTPLATFORM=SUNOS
130
    endif
130
    endif
131
    ifeq ($(findstring syllable,$(uname)),syllable)
131
    ifeq ($(findstring syllable,$(uname)),syllable)
132
        HOST=SYLLABLE
132
        HOSTPLATFORM=SYLLABLE
133
    endif
133
    endif
134
endif
134
endif
135
ifndef PLATFORM
135
ifndef PLATFORM
136
    PLATFORM=$(HOST)
136
    PLATFORM=$(HOSTPLATFORM)
137
endif
137
endif
138
138
139
ifndef SUBPLATFORM
139
ifndef SUBPLATFORM
140
    SUBPLATFORM=
140
    SUBPLATFORM=
141
    ifeq ($(PLATFORM),LINUX)
141
    ifeq ($(PLATFORM),LINUX)
142
        SUBPLATFORM=LINUX
142
        SUBPLATFORM=LINUX
Line 296... Line 296...
296
    M_STACKREALIGN := -mstackrealign
296
    M_STACKREALIGN := -mstackrealign
297
    W_STRICT_OVERFLOW := -Wno-strict-overflow
297
    W_STRICT_OVERFLOW := -Wno-strict-overflow
298
endif
298
endif
299
299
300
ifeq ($(HOST),WINDOWS)
300
ifeq ($(HOSTPLATFORM),WINDOWS)
301
# MSYS2 lets you create files named NUL but has a /dev/null. Go figure.
301
# MSYS2 lets you create files named NUL but has a /dev/null. Go figure.
302
    ifeq (,$(wildcard /dev/null))
302
    ifeq (,$(wildcard /dev/null))
303
        DONT_PRINT = > NUL 2>&1
303
        DONT_PRINT = > NUL 2>&1
304
	endif
304
    endif
305
endif
305
endif
306
306
Line 784... Line 784...
784
784
785
    COMMONFLAGS += -fno-pic
785
    COMMONFLAGS += -fno-pic
786
endif
786
endif
787
ifeq ($(PLATFORM),BSD)
787
ifeq ($(PLATFORM),BSD)
788
    COMPILERFLAGS+= -I/usr/X11R6/include
788
    COMPILERFLAGS+= -I/usr/local/include
789
789
790
    RENDERTYPE=SDL
790
    RENDERTYPE=SDL
791
    MIXERTYPE=SDL
791
    MIXERTYPE=SDL
792
    COMPILERFLAGS+= -DHAVE_INTTYPES
792
    COMPILERFLAGS+= -DHAVE_INTTYPES
793
    ifneq ($(findstring i386,$(SYSARCH)),i386)
793
    ifneq ($(findstring i386,$(SYSARCH)),i386)
794
        override NOASM=1
794
        override NOASM=1
Line 993... Line 993...
993
993
994
994
995
ifneq ($(PLATFORM),WINDOWS)
995
ifneq ($(PLATFORM),WINDOWS)
996
    ifneq ($(PLATFORM),WII)
996
    ifneq ($(PLATFORM),WII)
997
        LIBS+= -ldl
997
        ifneq ($(PLATFORM),BSD)
-
 
998
            LIBS+= -ldl
998
        ifneq ($(PLATFORM),DARWIN)
999
        endif
-
 
1000
        ifneq ($(PLATFORM),DARWIN)
999
            LIBS+= -pthread
1001
            LIBS+= -pthread
1000
        endif
1002
        endif
1001
    endif
1003
    endif
1002
endif
1004
endif
1003
1005