diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:05:50 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:05:50 +0000 |
commit | 572cdf85ea43c6670055fb7a2f35d97555b6a17f (patch) | |
tree | bb7ab0b1aa3623bdded389bb198cc120c661a1d4 /.Makefile.inc | |
parent | 8db36081940e85a02c71d0b51c6d2107ceffd3b4 (diff) |
Move compiler flag selection from configure to Makefile; add support for Intel C++ Compiler.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11564 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to '.Makefile.inc')
-rw-r--r-- | .Makefile.inc | 55 |
1 files changed, 40 insertions, 15 deletions
diff --git a/.Makefile.inc b/.Makefile.inc index 03fdc5f03..00cb9c2ec 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -11,21 +11,14 @@ @BSD_ONLY MAKESTYLE = bsd @BSD_ONLY COMPILE_ROOT != pwd -@IFDEF D - NICEFLAGS = @DEVELOPER@ - HEADER = debug-header -@ENDIF - -NICEFLAGS ?= @FLAGS@ -HEADER ?= std-header - -NICEFLAGS += -I$(COMPILE_ROOT)/include - CC = @CC@ -FLAGS = $(NICEFLAGS) -pedantic -PICLDFLAGS = -fPIC -DPIC -shared -export-dynamic -CORE_FLAGS = @CORE_FLAGS@ -LDLIBS = @LDLIBS@ +SYSTEM = @SYSTEM@ +SOCKETENGINE = @SOCKETENGINE@ +NICEFLAGS = -pipe -fPIC +LDLIBS = -pthread -lstdc++ +SHARED = -shared -rdynamic +CORE_FLAGS = -rdynamic -L. +PICLDFLAGS = -fPIC -DPIC -shared -rdynamic BASE = "@BASE_DIR@" CONPATH = "@CONFIG_DIR@" MODPATH = "@MODULE_DIR@" @@ -33,7 +26,39 @@ BINPATH = "@BINARY_DIR@" LAUNCHDPATH = "/System/Library/LaunchDaemons" LIBPATH = "@LIBRARY_DIR@" INSTMODE = 0755 -SOCKETENGINE = @SOCKETENGINE@ + +@IFEQ $(CC) icc + NICEFLAGS += -Wshadow + FLAGS = $(NICEFLAGS) +@ELSE + NICEFLAGS += -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall + FLAGS = $(NICEFLAGS) -pedantic +@ENDIF + + +@IFEQ $(SYSTEM) linux + LDLIBS += -ldl +@ELSIFEQ $(SYSTEM) solaris + LDLIBS += -lsocket -lnsl -lrt -lresolv +@ELSIFEQ $(SYSTEM) sunos + LDLIBS += -lsocket -lnsl -lrt -lresolv +@ELSIFEQ $(SYSTEM) darwin + NICEFLAGS += -DDARWIN -frtti + LDLIBS += -ldl + SHARED = -bundle -twolevel_namespace -undefined dynamic_lookup + CORE_FLAGS = -dynamic -bind_at_load -L. +@ENDIF + +@IFDEF D + NICEFLAGS += -g3 + HEADER = debug-header +@ELSE + NICEFLAGS += -g1 + HEADER = std-header +@ENDIF + +NICEFLAGS += -I$(COMPILE_ROOT)/include + @GNU_ONLY MAKEFLAGS += --no-print-directory @IFDEF V |