Skip to content
Snippets Groups Projects
Commit 10e095ae authored by Justin Mitchell's avatar Justin Mitchell
Browse files

Turn off strict-prototypes otherwise it breaks on mozjs.h

parent 867b09f6
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,13 @@ GCCMINOR := $(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
GCCVER := $(shell printf "%02d%02d" $(GCCMAJOR) $(GCCMINOR))
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)
......@@ -53,7 +60,7 @@ ifeq ($(JSFLAGS),)
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 )
......
......@@ -9,7 +9,7 @@ CFLAGS+= -I..
build: mw
mw: $(CODE:.c=.o) ../libmw.a
$(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
install: mw
install -D mw $(DESTDIR)$(bindir)/mw
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment