Changeset

987:d55ec60331e7

Makefiles, util.signal: Add lsignal library for catching POSIX signals
author Matthew Wild <mwild1@gmail.com>
date Sun, 12 Apr 2009 02:53:00 +0100
parents 986:ebd94ad97b75
children 988:8cb9a0d59e78
files Makefile util-src/Makefile
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Apr 11 23:23:35 2009 +0100
+++ b/Makefile	Sun Apr 12 02:53:00 2009 +0100
@@ -43,6 +43,9 @@
 util/pposix.so:
 	$(MAKE) install -C util-src
 
+util/signal.so:
+	$(MAKE) install -C util-src
+
 prosody.install: prosody
 	sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
 		s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \
--- a/util-src/Makefile	Sat Apr 11 23:23:35 2009 +0100
+++ b/util-src/Makefile	Sun Apr 12 02:53:00 2009 +0100
@@ -10,7 +10,7 @@
 LD?=gcc
 
 
-all: encodings.so hashes.so pposix.so
+all: encodings.so hashes.so pposix.so signal.so
 
 install: encodings.so hashes.so pposix.so
 	install *.so ../util/
@@ -37,3 +37,8 @@
 pposix.so: pposix.o
 	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o pposix.so pposix.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX)
 	
+lsignal.o: lsignal.c
+	$(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o lsignal.o lsignal.c
+signal.so: lsignal.o
+	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o signal.so lsignal.o
+