Current section

Files

Jump to
comeonin Makefile.win
Raw

Makefile.win

!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: priv\bcrypt_nif.dll
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