mirror of
https://github.com/ccxvii/mujs.git
synced 2026-09-25 11:15:33 +08:00
Name the library: MuJS!
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
SRCS := $(wildcard js*.c utf*.c regex.c)
|
||||
HDRS := $(wildcard js*.h utf.h regex.h)
|
||||
HDRS := $(wildcard js*.h mujs.h utf.h regex.h)
|
||||
OBJS := $(SRCS:%.c=build/%.o)
|
||||
|
||||
CC := clang
|
||||
CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wunreachable-code -Wno-unused-parameter -g
|
||||
|
||||
default: build build/js build/jsone build/re
|
||||
default: build build/mujs build/mujsone
|
||||
|
||||
astnames.h: jsparse.h
|
||||
grep '\(AST\|EXP\|STM\)_' jsparse.h | sed 's/^[ \t]*\(AST_\)\?/"/;s/,.*/",/' | tr A-Z a-z > $@
|
||||
@@ -24,13 +24,13 @@ build:
|
||||
build/%.o: %.c $(HDRS)
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
build/libjs.a: $(OBJS)
|
||||
build/libmujs.a: $(OBJS)
|
||||
ar cru $@ $^
|
||||
|
||||
build/js: build/main.o build/libjs.a
|
||||
build/mujs: build/main.o build/libmujs.a
|
||||
$(CC) -o $@ $^ -lm
|
||||
|
||||
build/jsone: build/main.o build/one.o
|
||||
build/mujsone: build/main.o build/one.o
|
||||
$(CC) -o $@ $^ -lm
|
||||
|
||||
build/re: regex.c utf.c utftype.c
|
||||
|
||||
@@ -1 +1 @@
|
||||
libjs: An embeddable Javascript interpreter in C.
|
||||
MuJS: An embeddable Javascript interpreter in C.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef jsi_h
|
||||
#define jsi_h
|
||||
|
||||
#include "js.h"
|
||||
#include "mujs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "js.h"
|
||||
#include "mujs.h"
|
||||
|
||||
#define PS1 "> "
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef js_h
|
||||
#define js_h
|
||||
#ifndef mujs_h
|
||||
#define mujs_h
|
||||
|
||||
/* noreturn is a GCC extension */
|
||||
#ifdef __GNUC__
|
||||
Reference in New Issue
Block a user