diff options
-rwxr-xr-x | configure | 56 | ||||
-rw-r--r-- | src/modules/Makefile | 10 |
2 files changed, 55 insertions, 11 deletions
@@ -86,6 +86,34 @@ if [ "$1" = "-update" -o "$2" = "-update" ] ; then s%@MODULES@%$MODULES%g " .${file}.inc >> $file done + echo -e "\033[0;37mWriting \033[1;32msrc/modules/Makefile\033[0;37m" + rm -f src/modules/Makefile + + # Generate the Header.. + + echo "# (C) ChatSpike development team" >> src/modules/Makefile + echo "# Makefile by <Craig@ChatSpike.net>" >> src/modules/Makefile + echo "# Many Thanks to Andrew Church <achurch@achurch.org>" >> src/modules/Makefile + echo "# for assisting with making this work right." >> src/modules/Makefile + echo "#" >> src/modules/Makefile + echo "# Automatically Generated by ./configure to add a module" >> src/modules/Makefile + echo "# please run ./configure --update" >> src/modules/Makefile + echo "" >> src/modules/Makefile + echo "all: \$(MODULES)" >> src/modules/Makefile + echo "" >> src/modules/Makefile + + + for module in src/modules/*.cpp ; do + flags=`grep '$CompileFlags: ' $module | sed 's/\/\* $CompileFlags://' | sed 's/\*\///'` + mod=`echo $module | sed 's/.cpp/.so/' | sed 's/src\/modules\///'` + mod2=`echo $module | sed 's/src\/modules\///'` + echo "$mod:" >> src/modules/Makefile + echo " \$(CC) -I../../include \$(FLAGS) -shared$flags -o $mod $mod2" >> src/modules/Makefile + echo " @cp $mod \$(MODPATH)/" >> src/modules/Makefile + echo "" >> src/modules/Makefile + done + + echo "Complete." exit 1; fi @@ -502,9 +530,35 @@ for file in Makefile inspircd; do s%@MODULES@%$MODULES%g " .${file}.inc >> $file done - `chmod 700 inspircd` +echo -e "\033[0;37mWriting \033[1;32msrc/modules/Makefile\033[0;37m" +rm -f src/modules/Makefile + +# Generate the Header.. + +echo "# (C) ChatSpike development team" >> src/modules/Makefile +echo "# Makefile by <Craig@ChatSpike.net>" >> src/modules/Makefile +echo "# Many Thanks to Andrew Church <achurch@achurch.org>" >> src/modules/Makefile +echo "# for assisting with making this work right." >> src/modules/Makefile +echo "#" >> src/modules/Makefile +echo "# Automatically Generated by ./configure to add a module" >> src/modules/Makefile +echo "# please run ./configure --update" >> src/modules/Makefile +echo "" >> src/modules/Makefile +echo "all: \$(MODULES)" >> src/modules/Makefile +echo "" >> src/modules/Makefile + +for module in src/modules/*.cpp ; do + flags=`grep '$CompileFlags: ' $module | sed 's/\/\* $CompileFlags://' | sed 's/\*\///'` + mod=`echo $module | sed 's/.cpp/.so/' | sed 's/src\/modules\///'` + mod2=`echo $module | sed 's/src\/modules\///'` + echo "$mod:" >> src/modules/Makefile + echo " \$(CC) -I../../include \$(FLAGS) -shared$flags -o $mod $mod2" >> src/modules/Makefile + echo " @cp $mod \$(MODPATH)/" >> src/modules/Makefile + echo "" >> src/modules/Makefile +done + + echo "" echo "" diff --git a/src/modules/Makefile b/src/modules/Makefile deleted file mode 100644 index b0c50a569..000000000 --- a/src/modules/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# (C) ChatSpike development team -# Makefile by <Craig@ChatSpike.net> -# Many Thanks to Andrew Church <achurch@achurch.org> -# for assisting with making this work right. - -all: $(MODULES) - -%.so: %.cpp - $(CC) -I../../include $(FLAGS) -shared -o $@ $< - @cp $@ $(MODPATH)/ |