-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
31 lines (22 loc) · 849 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
LOCAL_LD_PATH ?= `pwd`/dynlib
LIBSASS_VERSION ?= 3.4.5
BUILD ?= shared
dep: $(LOCAL_LD_PATH)/lib
$(LOCAL_LD_PATH)/lib: libsass-$(LIBSASS_VERSION)/lib
BUILD="$(BUILD)" PREFIX="$(LOCAL_LD_PATH)" make -C "libsass-$(LIBSASS_VERSION)" install
install-libsass: libsass-$(LIBSASS_VERSION)/lib
BUILD="$(BUILD)" make -C "libsass-$(LIBSASS_VERSION)" install
ldconfig
libsass-$(LIBSASS_VERSION)/lib: libsass-$(LIBSASS_VERSION)
BUILD="$(BUILD)" make -C "libsass-$(LIBSASS_VERSION)" -j5
libsass-$(LIBSASS_VERSION):
curl -L "https://github.com/sass/libsass/archive/$(LIBSASS_VERSION).tar.gz" | tar -xz
.PHONY: test
test:
LIBRARY_PATH="$(LOCAL_LD_PATH)/lib" LD_LIBRARY_PATH="$(LOCAL_LD_PATH)/lib" crystal spec
clean: clean-dep
rm -rf libsass-$(LIBSASS_VERSION)
clean-dep:
rm -rf $(LOCAL_LD_PATH)
clean-all: clean-dep
rm -rf libsass-*