forked from Paxa/fast_excel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 loc) · 973 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Q=@
ifdef V
Q=
endif
UNAME := $(shell uname)
LIBXLSXWRITER_SO = libxlsxwriter.so
ifeq ($(UNAME), Darwin)
LIBXLSXWRITER_SO = libxlsxwriter.dylib
endif
# Check for MinGW/MinGW64/Cygwin environments.
ifneq (,$(findstring MINGW, $(UNAME)))
MING_LIKE = y
endif
ifneq (,$(findstring MSYS, $(UNAME)))
MING_LIKE = y
endif
ifneq (,$(findstring CYGWIN, $(UNAME)))
MING_LIKE = y
endif
ifdef MING_LIKE
LIBXLSXWRITER_SO = libxlsxwriter.dll
endif
# with xcode better to use cmake
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),"Darwin")
USE_CMAKE := $(shell command -v cmake 2> /dev/null)
endif
ifndef ($(sitearchdir))
sitearchdir = './lib'
endif
all :
# @echo "Compiling ext/text_width ..."
# rake compile
@echo "Compiling libxlsxwriter ..."
ifdef USE_CMAKE
@echo "run cmake libxlsxwriter ..."
cmake libxlsxwriter
else
$(Q)$(MAKE) -C libxlsxwriter
endif
clean :
$(Q)$(MAKE) clean -C libxlsxwriter
install :
$(Q)cp libxlsxwriter/lib/$(LIBXLSXWRITER_SO) $(sitearchdir)