diff --git a/quakespasm/Quake/Makefile b/quakespasm/Quake/Makefile index 6c10d3d8..457aaa93 100644 --- a/quakespasm/Quake/Makefile +++ b/quakespasm/Quake/Makefile @@ -27,31 +27,10 @@ check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; # ============================================================================ -DEBUG ?= 0 -SDLNET ?= 0 +HOST_OS := $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]') -BUILDDIR := . - -SYSNAME := $(shell uname -s) - -ifneq (,$(findstring MINGW32,$(SYSNAME))) -HOST_OS = WIN32 -TOPDIR := $(shell pwd -W) -else -ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD OpenBSD)) -HOST_OS = UNIX -UNIX = bsd -TOPDIR := $(shell pwd) -else -ifneq (,$(findstring Linux,$(SYSNAME))) -HOST_OS = UNIX -UNIX = linux -TOPDIR := $(shell pwd) -else -$(error OS type not detected.) -endif -endif -endif +DEBUG ?= 0 +SDLNET ?= 0 # --------------------------------------- # build variables @@ -114,8 +93,12 @@ ifeq ($(SDLNET),1) NET_LIBS :=-lSDL_net CFLAGS +=-D_USE_SDLNET else +ifeq ($(HOST_OS),sunos) +NET_LIBS :=-lsocket -lnsl -lresolv +else NET_LIBS := endif +endif ifeq ($(USE_QS_CONBACK),1) CFLAGS+= -DUSE_QS_CONBACK diff --git a/quakespasm/Quake/Makefile.darwin b/quakespasm/Quake/Makefile.darwin index 2bb9769a..a69fba78 100644 --- a/quakespasm/Quake/Makefile.darwin +++ b/quakespasm/Quake/Makefile.darwin @@ -42,37 +42,13 @@ check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; # ============================================================================ -DEBUG ?= 0 -SDLNET ?= 0 +HOST_OS := $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]') +ifneq ($(HOST_OS),darwin)) +$(error This Makefile is for Darwin only) +endif -BUILDDIR := . - -SYSNAME := $(shell uname -s) - -ifneq (,$(findstring MINGW32,$(SYSNAME))) -HOST_OS = WIN32 -TOPDIR := $(shell pwd -W) -else -ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD OpenBSD)) -HOST_OS = UNIX -UNIX = bsd -TOPDIR := $(shell pwd) -else -ifneq (,$(findstring Darwin,$(SYSNAME))) -HOST_OS = UNIX -UNIX = darwin -TOPDIR := $(shell pwd) -else -ifneq (,$(findstring Linux,$(SYSNAME))) -HOST_OS = UNIX -UNIX = linux -TOPDIR := $(shell pwd) -else -$(error OS type not detected.) -endif -endif -endif -endif +DEBUG ?= 0 +SDLNET ?= 0 # --------------------------------------- # build variables diff --git a/quakespasm/Quake/Makefile.w32 b/quakespasm/Quake/Makefile.w32 index ae2a6a6a..948f4bf4 100644 --- a/quakespasm/Quake/Makefile.w32 +++ b/quakespasm/Quake/Makefile.w32 @@ -27,11 +27,9 @@ check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; # ============================================================================ -DEBUG ?= 0 -WINSOCK2 ?= 0 -SDLNET ?= 0 - -TOPDIR := $(shell pwd) +DEBUG ?= 0 +WINSOCK2?= 0 +SDLNET ?= 0 # --------------------------------------- # build variables diff --git a/quakespasm/Quake/Makefile.w64 b/quakespasm/Quake/Makefile.w64 index 80bb7c17..67e0b04f 100644 --- a/quakespasm/Quake/Makefile.w64 +++ b/quakespasm/Quake/Makefile.w64 @@ -27,11 +27,9 @@ check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; # ============================================================================ -DEBUG ?= 0 -WINSOCK2 ?= 1 -SDLNET ?= 0 - -TOPDIR := $(shell pwd) +DEBUG ?= 0 +WINSOCK2?= 1 +SDLNET ?= 0 # --------------------------------------- # build variables