[mw-devel] MW3 r1365 - in trunk: . src/client

arthur at sucs.org arthur at sucs.org
Fri May 30 10:00:28 BST 2014


Author: arthur
Date: 2014-05-30 10:00:28 +0100 (Fri, 30 May 2014)
New Revision: 1365

Modified:
   trunk/Makefile.common
   trunk/src/client/Makefile
   trunk/src/client/js.h
Log:
Turn off strict-prototypes otherwise it breaks on mozjs.h


Modified: trunk/Makefile.common
===================================================================
--- trunk/Makefile.common	2014-05-30 08:59:50 UTC (rev 1364)
+++ trunk/Makefile.common	2014-05-30 09:00:28 UTC (rev 1365)
@@ -40,6 +40,13 @@
 
 
 ifeq ($(JSFLAGS),)
+	JSDIR=$(DEPTH)mozjs
+	JSFLAGS= -include $(JSDIR)/include/js-17.0/js/RequiredDefines.h -I/usr/include/nspr -I$(JSDIR)/include/js-17.0
+	LDFLAGS += -L$(JSDIR)/lib/
+	JSLIBS= -lmozjs-17.0
+	JSSCRIPTTYPE=JSScript
+endif
+ifeq ($(JSFLAGS),)
 	#Fedora
 	JSFLAGS=$(shell pkg-config --cflags libjs 2>/dev/null)
 	JSLIBS=$(shell pkg-config --libs-only-l libjs 2>/dev/null)
@@ -53,7 +60,7 @@
 endif
 
 # cflags for standard 'cc' compiler
-CFLAGS+= -Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -pedantic -std=gnu99 -D_GNU_SOURCE $(JSFLAGS) -DJSSCRIPTTYPE=$(JSSCRIPTTYPE)
+CFLAGS+= -Wall -Wshadow -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -pedantic -std=gnu99 -D_GNU_SOURCE $(JSFLAGS) -DJSSCRIPTTYPE=$(JSSCRIPTTYPE)
 
 # until gcc catches up (4.7.x is good)
 CFLAGS += $(shell if [ $(GCCVER) -lt 0406 ] ; then echo "-Wno-multichar"; fi )

Modified: trunk/src/client/Makefile
===================================================================
--- trunk/src/client/Makefile	2014-05-30 08:59:50 UTC (rev 1364)
+++ trunk/src/client/Makefile	2014-05-30 09:00:28 UTC (rev 1365)
@@ -9,7 +9,7 @@
 build: mw
 
 mw: $(CODE:.c=.o) ../libmw.a
-	$(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^  $(LDLIBS)
 
 install: mw
 	install -D mw $(DESTDIR)$(bindir)/mw

Modified: trunk/src/client/js.h
===================================================================
--- trunk/src/client/js.h	2014-05-30 08:59:50 UTC (rev 1364)
+++ trunk/src/client/js.h	2014-05-30 09:00:28 UTC (rev 1365)
@@ -2,6 +2,7 @@
 #define JS_H
 
 #include <stdio.h>
+#include <jsapi.h>
 
 int js_isrunning(void);
 int js_exec(char *name, int argc, const char **argvc);




More information about the mw-devel mailing list