diff -ruN epgsync-0.0.3/Makefile epgsync-0.0.3-darwin/Makefile
--- epgsync-0.0.3/Makefile	2009-01-31 22:27:58.000000000 +0200
+++ epgsync-0.0.3-darwin/Makefile	2009-02-12 18:25:33.000000000 +0200
@@ -9,6 +9,8 @@
 #
 PLUGIN = epgsync
 
+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
+else
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+endif
 
 ### The directory environment:
 
@@ -103,7 +109,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

