summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-08 19:05:35 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-08 19:05:35 +0000
commit92f744e4216e9e48247891fb73c8fb9e42419f4c (patch)
tree2f9f6f96aede55c83f46f5e2a2e0da2152f98b1b
parent1aba1eb3ea635756a44c4221b22b688ccd2ec9ab (diff)
Fixed Autotools to detect *.cpp files in the src/core and src/modules folders.
Also small fix to the Windows install.js call to CMake to include quotes around the source's path. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1949 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--install.js2
-rw-r--r--src/core/Makefile6
-rwxr-xr-xsrc/core/configure2
-rw-r--r--src/modules/Makefile4
-rwxr-xr-xsrc/modules/configure2
-rw-r--r--src/protocol/Makefile2
6 files changed, 13 insertions, 5 deletions
diff --git a/install.js b/install.js
index 7d336bff4..e136257c5 100644
--- a/install.js
+++ b/install.js
@@ -214,7 +214,7 @@ for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
cmake += ' ' + thisQuestion.cmake_argument();
}
-cmake += ' ' + ScriptPath;
+cmake += ' "' + ScriptPath + '"';
WScript.Echo(cmake + "\n");
var shell = WScript.CreateObject('WScript.Shell');
diff --git a/src/core/Makefile b/src/core/Makefile
index f4df49581..25aac058d 100644
--- a/src/core/Makefile
+++ b/src/core/Makefile
@@ -9,6 +9,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'MODULEFLAGS=${MODULEFLAGS}' 'MAKEBIN=${MAKEBIN}'
OBJECTS= $(SRCS:.c=.o)
+OBJECTS+= $(SRCS:.cpp=.o)
SO_FILES=$(OBJECTS:.o=.s)
CDEFS= -rdynamic -Wall
@@ -24,6 +25,9 @@ distclean: spotless
.c.o:
@$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
+.cpp.o:
+ @$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
+
.o.s:
@$(MAKEBIN) $(CC) ${SHARED} ../mod_version.o $< -o $*.so ${PROFILE}
@$(TOUCH) $*.s
@@ -42,5 +46,5 @@ clean: subs_clean
rm -f *.o *.s *.so *.c~ core
spotless: subs_clean
- rm -f *.o *.s *.so *.c~ core Makefile.inc
+ rm -f *.o *.s *.so *.c~ core *.so Makefile.inc
diff --git a/src/core/configure b/src/core/configure
index 92efecd41..63f522d38 100755
--- a/src/core/configure
+++ b/src/core/configure
@@ -26,7 +26,7 @@ export ECHO2 ECHO2SUF
echo2 "SRCS=" > ./Makefile.inc
FIRST=1
-for oldfile in *.c
+for oldfile in `ls -1 *.c *.cpp`
do
if [ "$FIRST" = 1 ] ; then
echo2 " "$oldfile >> ./Makefile.inc
diff --git a/src/modules/Makefile b/src/modules/Makefile
index c964439a8..b75071a75 100644
--- a/src/modules/Makefile
+++ b/src/modules/Makefile
@@ -9,6 +9,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'MAKEBIN=${MAKEBIN}'
OBJECTS= $(SRCS:.c=.o)
+OBJECTS+= $(SRCS:.cpp=.o)
SO_FILES=$(OBJECTS:.o=.s)
CDEFS= -rdynamic -Wall
@@ -27,6 +28,9 @@ distclean: spotless
.c.o:
@$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
+.cpp.o:
+ @$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
+
.o.s:
@$(MAKEBIN) $(CC) ${SHARED} ../mod_version.o $< -o $*.so ${PROFILE}
@$(TOUCH) $*.s
diff --git a/src/modules/configure b/src/modules/configure
index 53a745592..453ba7de5 100755
--- a/src/modules/configure
+++ b/src/modules/configure
@@ -26,7 +26,7 @@ export ECHO2 ECHO2SUF
echo2 "SRCS=" > ./Makefile.inc
FIRST=1
-for oldfile in *.c
+for oldfile in `ls -1 *.c *.cpp`
do
if [ "$FIRST" = 1 ] ; then
echo2 " "$oldfile >> ./Makefile.inc
diff --git a/src/protocol/Makefile b/src/protocol/Makefile
index 1a064000c..3e31ec2e4 100644
--- a/src/protocol/Makefile
+++ b/src/protocol/Makefile
@@ -29,7 +29,7 @@ distclean: clean spotless
@$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
.o.s:
- @$(MAKEBIN) $(CC) ${SHARED} ../mod_version.o $< -o $*.so ${PROFILE}
+ @$(MAKEBIN) $(CC) ${SHARED} ../mod_version.o $< -o $*.so ${PROFILE}
@$(TOUCH) $*.s
subs: