From 16a8e9ed2bdc119c2078d262baef75fc78590698 Mon Sep 17 00:00:00 2001 From: Irsan van Wel Date: Wed, 4 Apr 2018 10:09:59 +0200 Subject: [PATCH] sign off --- c_src/Makefile | 13 +++++++------ src/erlsass.erl | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/c_src/Makefile b/c_src/Makefile index a2ddfb2..0212dc6 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -32,6 +32,7 @@ else endif BASEDIR := $(abspath $(CURDIR)/..) +PRIVDIR := $(abspath $(CURDIR)/../priv) PROJECT ?= $(notdir $(BASEDIR)) PROJECT := $(strip $(PROJECT)) @@ -67,17 +68,17 @@ CXXFLAGS ?= -O3 -finline-functions -Wall # # Compilation # -CFLAGS += -I "$(ERTS_INCLUDE_DIR)" -I "$(ERL_INTERFACE_INCLUDE_DIR)" -I "libsass/include" -I "libsass" -CXXFLAGS += -I "$(ERTS_INCLUDE_DIR)" -I "$(ERL_INTERFACE_INCLUDE_DIR)" -I "libsass/include" "../priv/libsass.dll" +CFLAGS += -I "$(ERTS_INCLUDE_DIR)" -I "$(ERL_INTERFACE_INCLUDE_DIR)" +CXXFLAGS += -I "$(ERTS_INCLUDE_DIR)" -I "$(ERL_INTERFACE_INCLUDE_DIR)" -I "libsass/include" "$(PRIVDIR)/libsass$(SLEXT)" LDLIBS += -L "$(ERL_INTERFACE_LIB_DIR)" -lerl_interface -lei LDFLAGS += -shared -# $(info ${OS}) -# $(info ${OSNAME}) -# $(info ${CURDIR}) -# $(info ${PROJECT}) +$(info ${OS}) +$(info ${OSNAME}) +$(info ${CURDIR}) +$(info ${PRIVDIR}) # $(info ${ERTS_INCLUDE_DIR}) # $(info ${ERL_INTERFACE_INCLUDE_DIR}) # $(info ${ERL_INTERFACE_LIB_DIR}) diff --git a/src/erlsass.erl b/src/erlsass.erl index cf63243..4354be3 100644 --- a/src/erlsass.erl +++ b/src/erlsass.erl @@ -55,7 +55,8 @@ init() -> case os:type() of {win32, _Osname} -> Path = os:getenv("PATH"), - os:putenv("PATH", Path ++ PrivDir ++ ";") + os:putenv("PATH", Path ++ PrivDir ++ ";"); + _True -> ok end, SharedLib = filename:join(PrivDir, ?LIBNAME),