fix linkage for solaris: needs -lsocket -lnsl -lresolv for network

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@678 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2012-05-30 09:28:34 +00:00
parent 5c87f99ad5
commit c06d6fa200
4 changed files with 19 additions and 64 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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