diff -ruN remotetimers-0.0.2/Makefile remotetimers-0.0.2-darwin/Makefile
--- remotetimers-0.0.2/Makefile	2008-03-28 13:07:34.000000000 +0200
+++ remotetimers-0.0.2-darwin/Makefile	2008-03-28 18:15:38.000000000 +0200
@@ -9,6 +9,8 @@
 #
 PLUGIN = remotetimers
 
+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++
+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
+endif
 
 ### The directory environment:
 
@@ -43,6 +49,9 @@
 ### Includes and Defines (add further entries here):
 
 INCLUDES += -I$(VDRDIR)/include
+ifeq ($(APPLE_DARWIN), 1)
+INCLUDES += -I/sw/include
+endif
 
 DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
 
@@ -103,7 +112,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

