From 436f0f980fb1f3b371222b87541a44a720be5c64 Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 30 May 2012 09:28:34 +0000 Subject: [PATCH] fix linkage for solaris: needs -lsocket -lnsl -lresolv for network git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@678 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile | 31 +++++++------------------------ Quake/Makefile.darwin | 36 ++++++------------------------------ Quake/Makefile.w32 | 8 +++----- Quake/Makefile.w64 | 8 +++----- 4 files changed, 19 insertions(+), 64 deletions(-) diff --git a/Quake/Makefile b/Quake/Makefile index 6c10d3d8..457aaa93 100644 --- a/Quake/Makefile +++ b/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/Quake/Makefile.darwin b/Quake/Makefile.darwin index 2bb9769a..a69fba78 100644 --- a/Quake/Makefile.darwin +++ b/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/Quake/Makefile.w32 b/Quake/Makefile.w32 index ae2a6a6a..948f4bf4 100644 --- a/Quake/Makefile.w32 +++ b/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/Quake/Makefile.w64 b/Quake/Makefile.w64 index 80bb7c17..67e0b04f 100644 --- a/Quake/Makefile.w64 +++ b/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