projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_httpserver: Read files in binary mode; fixes issues with serving binary files.
[prosody.git]
/
util-src
/
Makefile
diff --git
a/util-src/Makefile
b/util-src/Makefile
index 205e51d210cd024e46ba66bef493b5002c0cdee3..4b2606dc77907ee88b404665dd43cedc4db47766 100644
(file)
--- a/
util-src/Makefile
+++ b/
util-src/Makefile
@@
-1,29
+1,29
@@
-!IFDEF WINDIR
-!INCLUDE Makefile.win
-!ELSE
+include ../config.unix
-LUA_INCLUDE=/usr/include/lua5.1
-LUA_LIB=lua5.1
+LUA_SUFFIX?=5.1
+LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX)
+LUA_LIB?=lua$(LUA_SUFFIX)
+IDN_LIB?=idn
+OPENSSL_LIB?=crypto
+CC?=gcc
+LD?=gcc
-IDN_LIB=idn
-OPENSSL_LIB=ssl
+.SUFFIXES: .c .o .so
+.c.o:
+ $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o $@ $<
-all: encodings.so hashes.so
+.o.so:
+ MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
+ $(LD) $(LDFLAGS) -o $@ $< -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lidn -lcrypto
-install: encodings.so hashes.so
- strip *.so
- cp *.so ../util/
-
+all: encodings.so hashes.so pposix.so signal.so
-clean:
- rm *.so
-
-encodings.so: encodings.c
- gcc -shared encodings.c -I$(LUA_INCLUDE) -l$(LUA_LIB) -l$(IDN_LIB) -o encodings.so
+install: encodings.so hashes.so pposix.so signal.so
+ install *.so ../util/
-hashes.so: hashes.c
-
gcc -shared hashes.c -I$(LUA_INCLUDE) -l$(LUA_LIB) -l$(OPENSSL_LIB) -o hashes.s
o
-
-!ENDIF
+clean:
+
rm -f *.
o
+ rm -f *.so
+ rm -f ../util/*.so