aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-11-27 21:49:31 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-11-27 21:49:31 +0500
commitf33e9646043c0a00f6d6f03fcdde9726d7123581 (patch)
tree5233127875130cabf7810d8dd493671b927b2109 /util-src
parent2fdb13c54d3257984b8e1e6885d5f7c6d5580f18 (diff)
downloadprosody-f33e9646043c0a00f6d6f03fcdde9726d7123581.tar.gz
prosody-f33e9646043c0a00f6d6f03fcdde9726d7123581.zip
Makefile now works on windows with Microsoft's compiler
Diffstat (limited to 'util-src')
-rw-r--r--util-src/Makefile5
-rw-r--r--util-src/Makefile.win29
2 files changed, 34 insertions, 0 deletions
diff --git a/util-src/Makefile b/util-src/Makefile
index 28dc88fa..205e51d2 100644
--- a/util-src/Makefile
+++ b/util-src/Makefile
@@ -1,4 +1,8 @@
+!IFDEF WINDIR
+!INCLUDE Makefile.win
+!ELSE
+
LUA_INCLUDE=/usr/include/lua5.1
LUA_LIB=lua5.1
@@ -22,3 +26,4 @@ encodings.so: encodings.c
hashes.so: hashes.c
gcc -shared hashes.c -I$(LUA_INCLUDE) -l$(LUA_LIB) -l$(OPENSSL_LIB) -o hashes.so
+!ENDIF
diff --git a/util-src/Makefile.win b/util-src/Makefile.win
new file mode 100644
index 00000000..d76aaccb
--- /dev/null
+++ b/util-src/Makefile.win
@@ -0,0 +1,29 @@
+
+LUA_PATH=$(LUA_DEV)
+IDN_PATH=.\libidn-1.9
+OPENSSL_PATH=.\openssl-0.9.8i
+
+LUA_INCLUDE=$(LUA_PATH)\include
+LUA_LIB=$(LUA_PATH)\lib\lua5.1.lib
+
+IDN_LIB=$(IDN_PATH)\win32\lib\libidn.lib
+IDN_INCLUDE1=$(IDN_PATH)\lib
+IDN_INCLUDE2=$(IDN_PATH)\win32\include
+OPENSSL_LIB=$(OPENSSL_PATH)\out32dll\libeay32.lib
+OPENSSL_INCLUDE=$(OPENSSL_PATH)\include
+
+all: encodings.dll hashes.dll
+
+install: encodings.dll hashes.dll
+ copy /Y *.dll ..\util\
+
+clean:
+ del encodings.dll encodings.exp encodings.lib encodings.obj
+ del hashes.dll hashes.exp hashes.lib hashes.obj
+
+encodings.dll: encodings.c
+ cl /LD /nologo encodings.c /I"$(LUA_INCLUDE)" /I"$(IDN_INCLUDE1)" /I"$(IDN_INCLUDE2)" /link "$(LUA_LIB)" "$(IDN_LIB)" /export:luaopen_util_encodings
+
+hashes.dll: hashes.c
+ cl /LD /nologo hashes.c /I"$(LUA_INCLUDE)" /I"$(OPENSSL_INCLUDE)" /link "$(LUA_LIB)" "$(OPENSSL_LIB)" /export:luaopen_util_hashes
+