Skip to content

Commit

Permalink
Makefile - works on windows + msys2
Browse files Browse the repository at this point in the history
  • Loading branch information
raghur committed Oct 7, 2018
1 parent 9de733f commit aa1727a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
.DEFAULT_GOAL := all
ifdef WINDIR
extn=pyd
else
extn=so
endif

src = rplugin/python3
relopt = -d:release -d:removelogger
infoopt = -d:release
native = FUZZY_CMOD=1
win = --os:windows --cpu:amd64 --gcc.exe:/usr/bin/x86_64-w64-mingw32-gcc --gcc.linkerexe:/usr/bin/x86_64-w64-mingw32-gcc
binary=fruzzy_mod.$(extn)

build-debug:
cd $(src) && \
nim c --app:lib --out:fruzzy_mod.so $(infoopt) fruzzy_mod
nim c --app:lib --out:$(binary) $(infoopt) fruzzy_mod

build:
cd $(src) && \
nim c --app:lib --out:fruzzy_mod.so $(relopt) fruzzy_mod
nim c --app:lib --out:$(binary) $(relopt) fruzzy_mod

debug-single: build-debug
@echo Testing native mod with minimal file
Expand All @@ -39,8 +45,11 @@ test-native: build
test: test-py test-native

win:
ifndef WINDIR
cd $(src) && \
nim c --app:lib $(win) --out:fruzzy_mod.pyd $(relopt) fruzzy_mod
endif

all: test build
rel: win build
ls -al $(src)/fruzzy_mod*

0 comments on commit aa1727a

Please sign in to comment.