diff --git a/makefile b/makefile index fa48c560..047990c3 100644 --- a/makefile +++ b/makefile @@ -178,7 +178,7 @@ ifneq ($(findstring Windows,${OS}),) endif find_exe = $(abspath $(strip $(firstword $(foreach dir,$(strip $(subst :, ,${PATH})),$(wildcard $(dir)/$(1)))))) -find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(wildcard $(dir)/lib$(1).${LIBEXT}))))) +find_lib = $(firstword $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(foreach ext,$(strip ${LIBEXT}),$(wildcard $(dir)/lib$(1).$(ext)))))))) find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip ${INCPATH}),$(wildcard $(dir)/$(1).h))))) ifneq (0,$(TESTS)) find_test = RegisterSanityCheck $(abspath $(wildcard $(1)/tests/$(2)_test.ini)) /' | sed 's/^.* => //'),$(dir $(lib)))) endif endif - LIBEXT = so + LIBSOEXT = so + LIBEXT = $(LIBSOEXT) a else ifeq (SunOS,$(OSTYPE)) OSNAME = Solaris @@ -482,6 +483,9 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) endif endif endif + ifeq (,$(LIBSOEXT)) + LIBSOEXT = $(LIBEXT) + endif ifeq (,$(filter /lib/,$(LIBPATH))) ifeq (existlib,$(shell if $(TEST) -d /lib/; then echo existlib; fi)) LIBPATH += /lib/ @@ -573,7 +577,7 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) endif ifneq (,$(call find_include,dlfcn)) ifneq (,$(call find_lib,dl)) - OS_CCDEFS += -DHAVE_DLOPEN=${LIBEXT} + OS_CCDEFS += -DHAVE_DLOPEN=$(LIBSOEXT) OS_LDFLAGS += -ldl $(info using libdl: $(call find_lib,dl) $(call find_include,dlfcn)) else @@ -582,7 +586,7 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) $(info using libdl: $(call find_include,dlfcn)) else ifneq (,$(call find_lib,dld)) - OS_CCDEFS += -DHAVE_DLOPEN=${LIBEXT} + OS_CCDEFS += -DHAVE_DLOPEN=$(LIBSOEXT) OS_LDFLAGS += -ldld $(info using libdld: $(call find_lib,dld) $(call find_include,dlfcn)) else