Fix Makefile for GNU make 3.80

"else ifeq" on the same line is not compatible with GNU Make 3.80
This commit is contained in:
Thomas BERNARD 2018-02-03 18:29:35 +01:00
parent b11ed5a37e
commit 348e5c405a
2 changed files with 10 additions and 4 deletions

View File

@ -28,12 +28,14 @@ ifneq (, $(findstring linux, $(OS)))
endif endif
ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
LDLIBS += -lfreebsd-glue LDLIBS += -lfreebsd-glue
else ifneq (, $(findstring sun, $(OS))) else
ifneq (, $(findstring sun, $(OS)))
CFLAGS += -D_XOPEN_SOURCE CFLAGS += -D_XOPEN_SOURCE
CFLAGS += -D_XOPEN_SOURCE_EXTENDED=1 CFLAGS += -D_XOPEN_SOURCE_EXTENDED=1
CFLAGS += -D__EXTENSIONS__ CFLAGS += -D__EXTENSIONS__
LDFLAGS += -lsocket -lnsl -lresolv LDFLAGS += -lsocket -lnsl -lresolv
endif endif
endif
#EXECUTABLES = minissdpd testminissdpd listifaces #EXECUTABLES = minissdpd testminissdpd listifaces
EXECUTABLES = minissdpd testminissdpd testcodelength \ EXECUTABLES = minissdpd testminissdpd testcodelength \

View File

@ -16,9 +16,11 @@ VERSION = $(shell cat VERSION)
ifneq (, $(findstring darwin, $(OS))) ifneq (, $(findstring darwin, $(OS)))
JARSUFFIX=mac JARSUFFIX=mac
LIBTOOL ?= $(shell which libtool) LIBTOOL ?= $(shell which libtool)
else ifneq (, $(findstring linux, $(OS))) endif
ifneq (, $(findstring linux, $(OS)))
JARSUFFIX=linux JARSUFFIX=linux
else ifneq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS))) endif
ifneq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS)))
JARSUFFIX=win32 JARSUFFIX=win32
endif endif
@ -104,13 +106,15 @@ ifneq (, $(findstring darwin, $(OS)))
SHAREDLIBRARY = libminiupnpc.dylib SHAREDLIBRARY = libminiupnpc.dylib
SONAME = $(basename $(SHAREDLIBRARY)).$(APIVERSION).dylib SONAME = $(basename $(SHAREDLIBRARY)).$(APIVERSION).dylib
CFLAGS := -D_DARWIN_C_SOURCE $(CFLAGS) CFLAGS := -D_DARWIN_C_SOURCE $(CFLAGS)
else ifeq ($(JARSUFFIX), win32) else
ifeq ($(JARSUFFIX), win32)
SHAREDLIBRARY = miniupnpc.dll SHAREDLIBRARY = miniupnpc.dll
else else
# Linux/BSD/etc. # Linux/BSD/etc.
SHAREDLIBRARY = libminiupnpc.so SHAREDLIBRARY = libminiupnpc.so
SONAME = $(SHAREDLIBRARY).$(APIVERSION) SONAME = $(SHAREDLIBRARY).$(APIVERSION)
endif endif
endif
EXECUTABLES = upnpc-static listdevices EXECUTABLES = upnpc-static listdevices
EXECUTABLES_ADDTESTS = testminixml minixmlvalid testupnpreplyparse \ EXECUTABLES_ADDTESTS = testminixml minixmlvalid testupnpreplyparse \