summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:06:39 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:06:39 +0000
commit5c93325b53342095f7f7ba0339e4f3ea52229dfe (patch)
treeb5069bbac29c65c2fc75c55625df492484d5cc1c
parent7dc0bccadd08bfe36c6f53e700e46902cd81c14e (diff)
Use CXXFLAGS rather than nonstandard NICEFLAGS/FLAGS/etc
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11571 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--.Makefile.inc23
-rw-r--r--make/bsd-real.mk2
-rwxr-xr-xmake/calcdep.pl2
-rw-r--r--make/gnu-real.mk2
-rwxr-xr-xmake/unit-cc.pl3
5 files changed, 16 insertions, 16 deletions
diff --git a/.Makefile.inc b/.Makefile.inc
index f470cf0a4..901ced4fb 100644
--- a/.Makefile.inc
+++ b/.Makefile.inc
@@ -14,11 +14,12 @@
CC = @CC@
SYSTEM = @SYSTEM@
SOCKETENGINE = @SOCKETENGINE@
-NICEFLAGS = -pipe -fPIC
+CXXFLAGS = -pipe -fPIC -DPIC
LDLIBS = -pthread -lstdc++
+LDFLAGS =
SHARED = -shared -rdynamic
-CORE_FLAGS = -rdynamic -L.
-PICLDFLAGS = -fPIC -DPIC -shared -rdynamic
+CORELDFLAGS = -rdynamic -L. $(LDFLAGS)
+PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS)
BASE = "@BASE_DIR@"
CONPATH = "@CONFIG_DIR@"
MODPATH = "@MODULE_DIR@"
@@ -28,11 +29,9 @@ LIBPATH = "@LIBRARY_DIR@"
INSTMODE = 0755
@IFEQ $(CC) icc
- NICEFLAGS += -Wshadow
- FLAGS = $(NICEFLAGS)
+ CXXFLAGS += -Wshadow
@ELSE
- NICEFLAGS += -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall
- FLAGS = $(NICEFLAGS) -pedantic
+ CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall
@ENDIF
@@ -43,22 +42,22 @@ INSTMODE = 0755
@ELSIFEQ $(SYSTEM) sunos
LDLIBS += -lsocket -lnsl -lrt -lresolv
@ELSIFEQ $(SYSTEM) darwin
- NICEFLAGS += -DDARWIN -frtti
+ CXXFLAGS += -DDARWIN -frtti
LDLIBS += -ldl
SHARED = -bundle -twolevel_namespace -undefined dynamic_lookup
CORE_FLAGS = -dynamic -bind_at_load -L.
@ENDIF
@IFDEF D
- NICEFLAGS += -g3
+ CXXFLAGS += -g3
HEADER = debug-header
@ELSE
- NICEFLAGS += -g1
+ CXXFLAGS += -g1
HEADER = std-header
@ENDIF
FOOTER = finishmessage
-NICEFLAGS += -I$(COMPILE_ROOT)/include
+CXXFLAGS += -I$(COMPILE_ROOT)/include
@GNU_ONLY MAKEFLAGS += --no-print-directory
@@ -71,7 +70,7 @@ NICEFLAGS += -I$(COMPILE_ROOT)/include
RUNCC = $(COMPILE_ROOT)/make/run-cc.pl $(CC)
@ENDIF
-@DO_EXPORT RUNCC FLAGS NICEFLAGS CC LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORE_FLAGS
+@DO_EXPORT RUNCC CXXFLAGS CC LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORELDFLAGS
@DO_EXPORT BASE CONPATH MODPATH BINPATH LIBPATH
# Default target
diff --git a/make/bsd-real.mk b/make/bsd-real.mk
index f12efd2b8..6fdf2e57f 100644
--- a/make/bsd-real.mk
+++ b/make/bsd-real.mk
@@ -16,7 +16,7 @@ commands: $(CMD_TARGS)
modules: $(MOD_TARGS) $(MDIR_TARGS)
inspircd: $(CORE_TARGS)
- $(RUNCC) $(FLAGS) $(CORE_FLAGS) -o inspircd $(LDLIBS) $(CORE_TARGS)
+ $(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $(CORE_TARGS)
.for FILE in $(DFILES)
.include "$(FILE)"
diff --git a/make/calcdep.pl b/make/calcdep.pl
index 8d85e6463..06610c416 100755
--- a/make/calcdep.pl
+++ b/make/calcdep.pl
@@ -52,7 +52,7 @@ for my $file (@ARGV) {
my $ofiles = join ' ', grep s#(.*)\.cpp$#$path$base/$1.o#, readdir DIR;
closedir DIR;
open OUT, '>', $cmd;
- print OUT "$out: $ofiles\n\t".'$(RUNCC) $(FLAGS) $(PICLDFLAGS) -o $@ '
+ print OUT "$out: $ofiles\n\t".'$(RUNCC) $(PICLDFLAGS) -o $@ '
.$ofiles."\n";
print OUT "$cmd: $file\n\t".'@../make/calcdep.pl '."$path$base\n";
} else {
diff --git a/make/gnu-real.mk b/make/gnu-real.mk
index 28c5afa60..79fc2cd9e 100644
--- a/make/gnu-real.mk
+++ b/make/gnu-real.mk
@@ -19,7 +19,7 @@ commands: $(CMD_TARGS)
modules: $(MOD_TARGS)
inspircd: $(CORE_TARGS)
- $(RUNCC) $(FLAGS) $(CORE_FLAGS) -o $@ $(LDLIBS) $(CORE_TARGS)
+ $(RUNCC) -o $@ $(CORELDFLAGS) $(LDLIBS) $(CORE_TARGS)
.%.d: %.cpp
@../make/calcdep.pl $<
diff --git a/make/unit-cc.pl b/make/unit-cc.pl
index 5110037ac..3a40457f2 100755
--- a/make/unit-cc.pl
+++ b/make/unit-cc.pl
@@ -15,7 +15,8 @@ if ($file =~ /^-/) {
my $out = shift;
-my $cflags = nopedantic($file) ? $ENV{NICEFLAGS} : $ENV{FLAGS};
+my $cflags = $ENV{CXXFLAGS};
+$cflags =~ s/ -pedantic// if nopedantic($file);
$cflags .= ' ' . getcompilerflags($file);
my $flags;