diff -ruN svdrpservice-0.0.4/Makefile svdrpservice-0.0.4-darwin/Makefile
--- svdrpservice-0.0.4/Makefile	2008-09-14 13:15:59.000000000 +0300
+++ svdrpservice-0.0.4-darwin/Makefile	2010-04-18 13:44:39.000000000 +0300
@@ -9,6 +9,8 @@
 #
 PLUGIN = svdrpservice
 
+APPLE_DARWIN = $(shell gcc -dumpmachine | grep -q 'apple-darwin' && echo "1" || echo "0")
+
 ### The version number of this plugin (taken from the main source file):
 
 VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
@@ -16,7 +18,11 @@
 ### The C++ compiler and options:
 
 CXX      ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+ifeq ($(APPLE_DARWIN), 1)
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -fno-common -bundle -flat_namespace -undefined suppress -arch i386
+else
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+endif
 
 ### The directory environment:
 
@@ -112,7 +118,11 @@
 ### Targets:
 
 libvdr-$(PLUGIN).so: $(OBJS)
+ifeq ($(APPLE_DARWIN), 1)
+	$(CXX) $(CXXFLAGS) $(OBJS) -o $@
+else
 	$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+endif
 	@cp $@ $(LIBDIR)/$@.$(APIVERSION)
 
 dist: clean

