Usage:
make <target> [-jN] PEDANTIC=1
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12760
d7cf8633-e32d-0410-b094-
e92efae38249
# Compilation
-CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../
-# CFLAGS_STANDARD=-D_POSIX_C_SOURCE=200112L -std=c11 -pedantic
+ifeq ($(PEDANTIC),1)
+ CFLAGS_STANDARD=-std=c11 -pedantic -D_POSIX_C_SOURCE=200809L -DCONFIG_PEDANTIC
+else
+ CFLAGS_STANDARD=
+endif
+CFLAGS_COMMON=$(CFLAGS_STANDARD) $(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../
CFLAGS_CLIENT=-DCONFIG_MENU $(CFLAGS_VIDEO_CAPTURE)
CFLAGS_SERVER=
CFLAGS_DEBUG=-ggdb
Con_Printf("prvm_coverage: %s just executed a statement at %s for the first time. Coverage: %.2f%%.\n", prog->name, PRVM_WhereAmI(vabuf, sizeof(vabuf), prog, func, statement), prog->statements_covered * 100.0 / prog->numstatements);
}
-#if defined (__GNUC__) && (_GNU_SOURCE)
-#define HAVE_COMPUTED_GOTOS 1
+#if defined (__GNUC__) || (__clang__)
+# ifndef CONFIG_PEDANTIC
+# define HAVE_COMPUTED_GOTOS 1
+# endif
#endif
#define OPA ((prvm_eval_t *)&prog->globals.fp[st->operand[0]])