forked from riverrun/bcrypt_elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.win
34 lines (27 loc) · 818 Bytes
/
Makefile.win
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
!IF [where /Q Makefile.auto.win]
# The file doesn't exist, so don't include it.
!ELSE
!INCLUDE Makefile.auto.win
!IF [del /Q /F Makefile.auto.win] == 0
!ENDIF
!ENDIF
BCRYPT_PATH = c_src
NMAKE = nmake /$(MAKEFLAGS)
CFLAGS = /O2 /EHsc /I"$(BCRYPT_PATH)"
NIF_SRC=\
c_src\bcrypt_nif.c\
c_src\blowfish.c
all: clean priv\bcrypt_nif.dll
clean:
del /Q /F priv
Makefile.auto.win:
erl -eval "io:format(\"~s~n\", [lists:concat([\"ERTS_INCLUDE_PATH=\", code:root_dir(), \"/erts-\", erlang:system_info(version), \"/include\"])])" -s init stop -noshell > $@
!IFDEF ERTS_INCLUDE_PATH
priv\bcrypt_nif.dll:
if NOT EXIST "priv" mkdir "priv"
$(CC) $(CFLAGS) /I"$(ERTS_INCLUDE_PATH)" /LD /MD /Fe$@ $(NIF_SRC)
!ELSE
priv\bcrypt_nif.dll: Makefile.auto.win
$(NMAKE) /F Makefile.win priv\bcrypt_nif.dll
!ENDIF
.PHONY: all clean