Makefile in fast_excel-0.4.0 vs Makefile in fast_excel-0.4.1

- old
+ new

@@ -1,16 +1,43 @@ 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 @@ -22,6 +49,6 @@ clean : $(Q)$(MAKE) clean -C libxlsxwriter install : - @echo "Nothing to install" \ No newline at end of file + $(Q)cp libxlsxwriter/lib/$(LIBXLSXWRITER_SO) $(sitearchdir)