Make it possible to build under Solaris make as well as FreeBSD and Linux. Also add...
authorRichard Sharpe <realrichardsharpe@gmail.com>
Sun, 3 Jun 2012 05:27:22 +0000 (22:27 -0700)
committerRichard Sharpe <realrichardsharpe@gmail.com>
Wed, 1 Aug 2012 02:24:12 +0000 (19:24 -0700)
examples/VFS/Makefile.in

index db787de390604eb7974ae1799d5167176bd5a430..ba419231925dfd1fceef91c960eb5bd8e6dd1ed3 100644 (file)
@@ -27,6 +27,13 @@ libdir               = @libdir@
 
 VFS_LIBDIR     = $(libdir)/vfs
 
+# Note, if make fails, it might be because your version of make does not
+# support what we need. Try installing GNU make and rerun make.
+#
+# Note also, that if your module requires more than one object file to be
+# linked in you will have to modify Makefile.in to accommodate your needs and
+# then rerun configure before you can build.
+
 # Change these targets to the names of your modules if building out of tree
 MODULES                = skel_opaque.@SHLIBEXT@ shadow_copy_test.@SHLIBEXT@ \
                skel_transparent.@SHLIBEXT@
@@ -37,13 +44,19 @@ all: $(MODULES)
 
 .SUFFIXES: .@SHLIBEXT@
 
-.@OBJEXT@.@SHLIBEXT@:
-       @echo "Linking $<"
-       @$(CC) $(LDSHFLAGS) $(LDFLAGS) $*.@OBJEXT@ -o $*.@SHLIBEXT@
+# You might need to create an explicit rule for your shared object if your
+# shared object is built from multiple .c files.
 
-.c.@OBJEXT@:
+.c.@SHLIBEXT@:
        @echo "Compiling $<"
        @$(CC) $(FLAGS) -c $< -D$*_init=samba_init_module
+       @echo "Linking $@"
+       @$(CC) $(LDSHFLAGS) $(LDFLAGS) $*.@OBJEXT@ -o $*.@SHLIBEXT@
+
+# You might need to uncomment this if you have other .c files to compile
+#.c.@OBJEXT@:
+#      @echo "Compiling $<"
+#      @$(CC) $(FLAGS) -c $< -D$*_init=samba_init_module
 
 install: default
        $(INSTALLCMD) -d $(VFS_LIBDIR)