* avoid as much code and linker information as possible
[olsrd.git] / make / Makefile.osx
index f69a17d..69ff7e7 100644 (file)
@@ -2,15 +2,31 @@
 # MAC OSX SPECIFIC CONFIGURATION
 #
 
-INSTALL_PREFIX ?=
-LIBDIR =       $(INSTALL_PREFIX)/usr/lib
+# don't strip executables and bundles for now until we figure out the proper way
+# to do it (flags).
+STRIP = \#
+
+DESTDIR ?=
+LIBDIR =       $(DESTDIR)/usr/lib
 
 SRCS +=                $(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
 HDRS +=                $(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
 
 DEFINES =      -D__MacOSX__
-LIBS =         -lm -ldl
+LIBS =         
 
 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
-INSTALL_LIB =  install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
-               /sbin/ldconfig
\ No newline at end of file
+INSTALL_LIB =  install -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME)
+
+ifdef OLSRD_PLUGIN
+LDFLAGS = -bundle -flat_namespace -undefined suppress
+else
+LDFLAGS = -dynamic
+endif
+
+OS_LIB_PTHREAD =
+OS_LIB_DYNLOAD =
+
+# Local Variables:
+# mode: makefile
+# End: