summaryrefslogtreecommitdiff
path: root/vhook
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-11-23 01:29:25 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-11-23 01:29:25 +0000
commit47930f093e478dd600d0dd7bcfca0ab81e884ead (patch)
tree416dd1bccdd138c518d951b66d00b1a9cc81e29a /vhook
parent9c76bd48aa318eaf74a3d9c4cac3d8a9ada3fe04 (diff)
Applied changes to make it compile on darwin
Originally committed as revision 1270 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'vhook')
-rw-r--r--vhook/Makefile9
-rw-r--r--vhook/fish.c2
-rw-r--r--vhook/imlib2.c1
3 files changed, 8 insertions, 4 deletions
diff --git a/vhook/Makefile b/vhook/Makefile
index 5f198058f0..296127daec 100644
--- a/vhook/Makefile
+++ b/vhook/Makefile
@@ -2,6 +2,11 @@ include ../config.mak
CFLAGS=-fPIC $(OPTFLAGS) -g -Wall -I.. -I../libav -I../libavcodec -DHAVE_AV_CONFIG_H
+ifeq ($(CONFIG_DARWIN),yes)
+LDFLAGS+=-bundle -flat_namespace -undefined suppress
+else
+LDFLAGS+=-shared
+endif
HOOKS=null.so fish.so
ifeq ($(HAVE_IMLIB2),yes)
@@ -14,11 +19,11 @@ install:
install -s -m 755 $(HOOKS) $(INSTDIR)
imlib2.so: imlib2.o
- $(CC) -g -o $@ -shared $< -lImlib2
+ $(CC) -g -o $@ $(LDFLAGS) $< -lImlib2
rm $<
%.so: %.o
- $(CC) -g -o $@ -shared $<
+ $(CC) -g -o $@ $(LDFLAGS) $<
%.html: %.texi
texi2html -monolithic -number $<
diff --git a/vhook/fish.c b/vhook/fish.c
index c25ba60719..b966b9b120 100644
--- a/vhook/fish.c
+++ b/vhook/fish.c
@@ -35,7 +35,7 @@
*/
#include <stdlib.h>
#include <fcntl.h>
-#include <getopt.h>
+#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <sys/time.h>
diff --git a/vhook/imlib2.c b/vhook/imlib2.c
index 3e11d9c1b2..fcc09e17f3 100644
--- a/vhook/imlib2.c
+++ b/vhook/imlib2.c
@@ -45,7 +45,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
-#include <getopt.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>