--- Makefile.org	2006-05-07 18:20:59.000000000 -0700
+++ Makefile	2006-05-07 18:23:07.000000000 -0700
@@ -7,7 +7,7 @@
 CC = gcc
 # dynamic libraries compilation options:
 CFLAGS = -O2
-TCLLIBDIR = /usr/lib
+TCLLIBDIR = __PREFIX__/lib
 # optionally add Tcl includes path (use -Idirectory syntax):
 INCLUDES =
 # optionally include SQLite package (set to true or false):
@@ -18,15 +18,15 @@
 
 # only use as the temporary installation directory, such as from a rpm
 # specification file, otherwise change the directories below instead:
-ROOTDIR =
+ROOTDIR = __DESTROOT__
 
 # you may change the directories below:
 BASEDIR =
-BINDIR = $(BASEDIR)/usr/bin
-LIBDIR = $(BASEDIR)/usr/lib
-MANDIR = $(BASEDIR)/usr/share/man
-DOCDIR = $(BASEDIR)/usr/share/doc
-MOODSSLIBDIR = $(LIBDIR)/moodss
+BINDIR = __PREFIX__/bin
+LIBDIR = __PREFIX__/lib
+MANDIR = __PREFIX__/share/man
+DOCDIR = __PREFIX__/share/doc
+MOODSSLIBDIR = __PREFIX__/lib/moodss
 # where the modules will be finally installed (useful in rpm specification):
 MODULESDIR = $(MOODSSLIBDIR)
 MOODSSDOCDIR = $(DOCDIR)/moodss-$(VERSION)
@@ -36,11 +36,11 @@
 # uncomment the MODULES entries for your platform below,
 # while obviously commenting those entries for all the other platforms:
 # Linux:
-MODULES = apache apachex arp cpustats disks diskstats formulas hddtemp interrupts kernmods log memstats minimal mounts myerrorlog myhealth myprocs myquery myreplication myshow mystatus myvars nagios netdev odbcquery partitions pci peer ping ps psbyname psbyuser random route sensors smithy snmp snmptrap system trace usb Log Minimal Random Threaded minipy randpy
+#MODULES = apache apachex arp cpustats disks diskstats formulas hddtemp interrupts kernmods log memstats minimal mounts myerrorlog myhealth myprocs myquery myreplication myshow mystatus myvars nagios netdev odbcquery partitions pci peer ping ps psbyname psbyuser random route sensors smithy snmp snmptrap system trace usb Log Minimal Random Threaded minipy randpy
 # Solaris:
 #MODULES = apache apachex formulas log minimal mounts myerrorlog myhealth myprocs myquery myreplication myshow mystatus myvars nagios odbcquery peer ping random smithy snmp snmptrap trace Log Minimal Random minipy randpy
 # FreeBSD:
-#MODULES = apache apachex cpustats formulas log memstats minimal mounts myerrorlog myhealth myprocs myquery myreplication myshow mystatus myvars nagios odbcquery peer ping ps psbyname psbyuser random smithy snmp snmptrap trace Log Minimal Random minipy randpy
+MODULES = apache apachex cpustats formulas log memstats minimal mounts myerrorlog myhealth myprocs myquery myreplication myshow mystatus myvars nagios odbcquery peer ping ps psbyname psbyuser random smithy snmp snmptrap trace Log Minimal Random minipy randpy
 
 
 ### You should not need to change anything below this line ###
@@ -158,10 +158,10 @@
 		rm -f $@; test -f $$LIBRARY && ln -s $$LIBRARY $@ || ln -s $(TCLLIBDIR)/$@ $@
 
 packlibs/libfilesystem.so.1.1: packlibs/filesystem.c libtclstub.a
-	$(CC) -shared -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
+	$(CC) -dynamic -bundle -undefined suppress -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
 
 packlibs/libnetwork.so.1.23: packlibs/network.c libtclstub.a
-	$(CC) -shared -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $? $(EXTRALIBS)
+	$(CC) -dynamic -bundle -undefined suppress -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $? $(EXTRALIBS)
 
 packlibs/liblogging.so.1.0: packlibs/logging.c libtclstub.a
-	$(CC) -shared -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
+	$(CC) -dynamic -bundle -undefined suppress -force_flat_namespace -fPIC -DUSE_TCL_STUBS $(CFLAGS) $(INCLUDES) -o $@ $?
