Skip to content

Commit

Permalink
make: Refactor Makefile variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dalcinl committed Mar 18, 2024
1 parent 06a678e commit e6b3698
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ RANLIB = ranlib
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
SED_I = sed -i
LIBFILE = lib$(LIBNAME).so.$(VERSION)
libfilename = lib$1.so.$2
soname = -Wl,-soname,$1
endif
ifeq ($(UNAME_S),Darwin)
SED_I = sed -i''
LIBFILE = lib$(LIBNAME).$(VERSION).dylib
libfilename = lib$1.$2.dylib
soname = -Wl,-install_name,@rpath/$1
endif
LIBFILE = $(call libfilename,$(LIBNAME),$(VERSION))
LIBLINK = $(subst .$(VERSION),,$(LIBFILE))

ifndef CFLAGS
Expand Down

0 comments on commit e6b3698

Please sign in to comment.