Now we build the Makefile includes for user modules as well.
authorDave West <davew@uncensored.citadel.org>
Sun, 14 Oct 2007 15:45:34 +0000 (15:45 +0000)
committerDave West <davew@uncensored.citadel.org>
Sun, 14 Oct 2007 15:45:34 +0000 (15:45 +0000)
citadel/mk_module_init.sh

index 49c0f47dd6c4e93b1e47510a5f15c69dc6bcad56..b75365be3cd05e9d95d092a7c337122959382d7a 100755 (executable)
@@ -176,8 +176,17 @@ if [ -d "user_modules" ] ; then
                                if [ -f "$k" ] ; then
 # Add this .c file to the Makefile included list of SOURCES
 cat <<EOF >> $SRC_FILE
-SOURCES=\$(SOURCES) $k
+SOURCES=\$(SOURCES) user_modules/$j/$k
 EOF
+
+# Generate a .o file name
+O_FILE=`basename $k .c`
+O_FILE="$O_FILE.o"
+# Add this .o file to the Makefile included list of SERV_MODULES
+cat <<EOF >> $MOD_FILE
+SERV_MODULES += user_modules/$j/$O_FILE
+EOF
+       
                                        RES=X`grep CTDL_MODULE_INIT $k | cut -f2 -d\( | cut -f1 -d\)`
                                        if [ $RES != "X" ] ; then
                                                RES_OUT=`echo $RES | cut -b2-`