Skip to content

Commit

Permalink
Make libtuv library path portable
Browse files Browse the repository at this point in the history
  • Loading branch information
marktwtn committed Feb 12, 2019
1 parent b4faea1 commit 728aa2a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mk/submodule.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# Copy from the Makefile of libtuv to support different platforms
UNAME_M := $(shell uname -m)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
UNAME_S := linux
endif
ifeq ($(UNAME_S),Darwin)
# macOS
UNAME_S := darwin
endif

# libtuv related variables
LIBTUV_PATH = deps/libtuv
LIBTUV_INCLUDE := -I $(LIBTUV_PATH)/include
LIBTUV_PLATFORM := $(UNAME_M)-$(UNAME_S)
# PIC (Position-Independent-Code) library
LIBTUV_LIBRARY := $(LIBTUV_PATH)/build/x86_64-linux/release/lib/libtuv.o
LIBTUV_LIBRARY := $(LIBTUV_PATH)/build/$(LIBTUV_PLATFORM)/release/lib/libtuv.o

$(LIBTUV_LIBRARY):
git submodule update --init $(LIBTUV_PATH)
Expand Down

0 comments on commit 728aa2a

Please sign in to comment.