Skip to content

Commit e6b3698

Browse files
committed
make: Refactor Makefile variables
1 parent 06a678e commit e6b3698

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ RANLIB = ranlib
2323
UNAME_S := $(shell uname -s)
2424
ifeq ($(UNAME_S),Linux)
2525
SED_I = sed -i
26-
LIBFILE = lib$(LIBNAME).so.$(VERSION)
26+
libfilename = lib$1.so.$2
2727
soname = -Wl,-soname,$1
2828
endif
2929
ifeq ($(UNAME_S),Darwin)
3030
SED_I = sed -i''
31-
LIBFILE = lib$(LIBNAME).$(VERSION).dylib
31+
libfilename = lib$1.$2.dylib
3232
soname = -Wl,-install_name,@rpath/$1
3333
endif
34+
LIBFILE = $(call libfilename,$(LIBNAME),$(VERSION))
3435
LIBLINK = $(subst .$(VERSION),,$(LIBFILE))
3536

3637
ifndef CFLAGS

0 commit comments

Comments
 (0)