Skip to content

Commit c3d3b6b

Browse files
author
Jimmy Zhuo
committed
init
0 parents  commit c3d3b6b

28 files changed

+2628
-0
lines changed

LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Luatcc license
2+
Copyright (c) 2006-2010 J�r�me Vuarand
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
THE SOFTWARE.
21+

Makefile

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Installation directory
2+
INSTALL_TOP_SHARE=/usr/local/share/lua/5.1
3+
INSTALL_TOP_LIB=/usr/local/lib/lua/5.1
4+
5+
# Module name
6+
MODULE=tcc
7+
DLL=$(MODULE).so
8+
9+
# If your libtcc does contain tcc_compile_named_string comment next line.
10+
CPPFLAGS+=-D'tcc_compile_named_string(tcc,code,chunkname)=tcc_compile_string(tcc,code)'
11+
12+
# If you want to use TCC 0.9.23 or 0.9.24 uncomment following line
13+
#CPPFLAGS+=-DUSE_TCC_0_9_23
14+
15+
##############################################################################
16+
# /!\ You shouldn't have to change anything below
17+
18+
SRC=src/luatcc.c
19+
CFLAGS+=-O2 -Wall
20+
CPPFLAGS+=-Dluaopen_module=luaopen_$(MODULE) -DMODULE_API=extern
21+
LDLIBS+=-ltcc -lc
22+
23+
build:src/$(DLL)
24+
25+
src/$(DLL):$(patsubst %.c,%.o,$(SRC))
26+
$(CC) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
27+
28+
clean:
29+
rm -f src/$(DLL) $(patsubst %.c,%.o,$(SRC))
30+
31+
test:build
32+
$(MAKE) -C test
33+
34+
install:build
35+
mkdir -p $(INSTALL_TOP_LIB)
36+
cp src/$(DLL) $(INSTALL_TOP_LIB)
37+
mkdir -p $(INSTALL_TOP_SHARE)/$(MODULE)
38+
cp src/tcc/loader.lua $(INSTALL_TOP_SHARE)/$(MODULE)
39+
40+
uninstall:
41+
rm -f $(INSTALL_TOP_LIB)/$(DLL)
42+
rm -f $(INSTALL_TOP_SHARE)/$(MODULE)/loader.lua
43+
44+
.PHONY:build clean install uninstall test
45+
46+
# Copyright (c) 2009-2010 Jérôme Vuarand
47+
#
48+
# Permission is hereby granted, free of charge, to any person obtaining a copy
49+
# of this software and associated documentation files (the "Software"), to deal
50+
# in the Software without restriction, including without limitation the rights
51+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52+
# copies of the Software, and to permit persons to whom the Software is
53+
# furnished to do so, subject to the following conditions:
54+
#
55+
# The above copyright notice and this permission notice shall be included in
56+
# all copies or substantial portions of the Software.
57+
#
58+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64+
# THE SOFTWARE.

doc/LICENSE.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Luatcc license
2+
Copyright (c) 2006-2010 J�r�me Vuarand
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
THE SOFTWARE.
21+

doc/doc.css

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
body {
2+
color: #000000 ;
3+
background-color: #FFFFFF ;
4+
font-family: sans-serif ;
5+
text-align: justify ;
6+
margin-right: 20px ;
7+
margin-left: 20px ;
8+
}
9+
10+
h1, h2, h3, h4 {
11+
font-weight: normal ;
12+
font-style: italic ;
13+
}
14+
15+
a:link {
16+
color: #000080 ;
17+
background-color: inherit ;
18+
text-decoration: none ;
19+
}
20+
21+
a:visited {
22+
background-color: inherit ;
23+
text-decoration: none ;
24+
}
25+
26+
a:link:hover, a:visited:hover {
27+
color: #000080 ;
28+
background-color: #E0E0FF ;
29+
}
30+
31+
a:link:active, a:visited:active {
32+
color: #FF0000 ;
33+
}
34+
35+
hr {
36+
border: 0 ;
37+
height: 1px ;
38+
color: #a0a0a0 ;
39+
background-color: #a0a0a0 ;
40+
}
41+
42+
div.chapter, div.section, div.function {
43+
border-top: solid 1px #a0a0a0;
44+
}
45+
div.chapter {
46+
margin-bottom: 30px;
47+
}
48+
49+
/*div.section { border-top: solid 1px #c0c0c0; }*/
50+
/*div.function { border-top: solid 1px #e0e0e0; }*/
51+
52+
div.section, div.function {
53+
margin-top: 15px;
54+
}
55+
56+
div#footer { margin-bottom: 8px }
57+
58+
div#header { text-align:center }
59+
div#header p { margin-top:0px; font-family: "Verdana", sans-serif; font-size:1.0em }
60+
61+
62+
h3 code {
63+
font-family: inherit ;
64+
}
65+
66+
pre {
67+
margin-left:2em;
68+
}
69+
70+
pre {
71+
font-size: 105% ;
72+
}
73+
74+
ul li {
75+
list-style-image: url(bullet.png) ;
76+
}
77+
78+
/*
79+
Copyright (c) 2009 Jérôme Vuarand
80+
81+
Permission is hereby granted, free of charge, to any person obtaining a copy
82+
of this software and associated documentation files (the "Software"), to deal
83+
in the Software without restriction, including without limitation the rights
84+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
85+
copies of the Software, and to permit persons to whom the Software is
86+
furnished to do so, subject to the following conditions:
87+
88+
The above copyright notice and this permission notice shall be included in
89+
all copies or substantial portions of the Software.
90+
91+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
93+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
94+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
95+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
96+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
97+
THE SOFTWARE.
98+
*/
99+

0 commit comments

Comments
 (0)