File: makefile_emscripten_lib_utf8

package info (click to toggle)
newlisp 10.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,460 kB
  • ctags: 4,357
  • sloc: ansic: 33,202; lisp: 7,369; java: 7,012; sh: 647; makefile: 273
file content (41 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# makefile for newLISP v. 10.5.x and after with UTF8 support for the Emscripten SDK
#
# With Emscripten version v1.22.0 all execption handling related problems
# known have been solved. (November 2014)
#
# see also: https://github.com/kripken/emscripten/wiki
#
# Uses custom random() and srandom() in nl-filesys.c
#
# Does not implement the newLISP functions:
#   semaphore, net-packet, net-service, fork, spawn, sync, abort
#
# Will not do file and network I/O functions in the sandboxed JavaScript 
# environment
#
# Generates newlisp-js-lib.js and newlisp-js-lib.html.
# The html file can be discarded use newlisp-js/newlisp-js.html instead
#
# this makefile has been tested on a MAC OSX 10.9/10 platforms

OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
	nl-sock.o nl-web.o nl-xml-json.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o unix-lib.o

DEFAULT_CFLAGS = -m32 -Wall -c -DMAC_OSX -DLIBRARY -DEMSCRIPTEN  -DSUPPORT_UTF8 $(CFLAGS)

CC = emcc

default: $(OBJS)
	cp qa-specific-tests/qa-bench newlisp-js
	cp modules/canvas.lsp newlisp-js
	$(CC) $(LDFLAGS) $(OBJS) -m32 -O2 -o newlisp-js-lib.html -s EXPORTED_FUNCTIONS="['_newlispEvalStr']" \
	-s MAX_SETJMPS=100 -s TOTAL_MEMORY=33554432 --closure 1 \
	--embed-file newlisp-js/readme.txt --embed-file newlisp-js/qa-bench --embed-file newlisp-js/canvas.lsp
	rm newlisp-js/qa-bench newlisp-js/canvas.lsp

.c.o:
	$(CC) -O2 --closure 1 $(CFLAGS) $<

$(OBJS): primes.h protos.h makefile_emscripten_lib_utf8