Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 74 lines (56 sloc) 1.93 kb
1f4764d @DaveFet Adding Apache License 2.0
DaveFet authored
1 # Copyright (c) 2008-2009 Facebook
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 # See accompanying file LICENSE.txt.
16 #
17 # @author Marcel Laverdet
18
5f3a8ee Using fbconfig/fbmake for libfbjs and jsxmin
Feng Qian authored
19 CPPFLAGS=-fPIC -Wall -DNOT_FBMAKE=1
42ba4fb Fix another bug that can generates infinite loops
Feng Qian authored
20
21 ifdef OPT
22 CPPFLAGS += -O2
23 else
8a7bc8e Better local variable renaming
Feng Qian authored
24 CPPFLAGS += -ggdb -g -O0 -DDEBUG
42ba4fb Fix another bug that can generates infinite loops
Feng Qian authored
25 endif
201b830 @laverdet Be better at rendering numbers
laverdet authored
26
c6d4e1f @laverdet Making libfbjs actually libfbjs.so
laverdet authored
27 all: libfbjs.so
28
29 install:
30 cp libfbjs.so /usr/lib64/libfbjs.so
ef4431f @laverdet Changes to fbjs parser + troy
laverdet authored
31
5f3a8ee Using fbconfig/fbmake for libfbjs and jsxmin
Feng Qian authored
32 parser.lex.cpp: parser.ll
33 flex -o $@ -d $<
f1de0c9 @laverdet Adding a Makefile
laverdet authored
34
25e143d @laverdet Fix instanceof on new line
laverdet authored
35 parser.lex.hpp: parser.lex.cpp
36
5f3a8ee Using fbconfig/fbmake for libfbjs and jsxmin
Feng Qian authored
37 parser.yacc.cpp: parser.yy
f1de0c9 @laverdet Adding a Makefile
laverdet authored
38 bison --debug --verbose -d -o $@ $<
39
25e143d @laverdet Fix instanceof on new line
laverdet authored
40 parser.yacc.hpp: parser.yacc.cpp
41
201b830 @laverdet Be better at rendering numbers
laverdet authored
42 dmg_fp_dtoa.c:
43 curl 'http://www.netlib.org/fp/dtoa.c' -o $@
44
45 dmg_fp_g_fmt.c:
46 curl 'http://www.netlib.org/fp/g_fmt.c' -o $@
47
48 dmg_fp_dtoa.o: dmg_fp_dtoa.c
49 $(CC) -fPIC -c $< -o $@ -DIEEE_8087=1 -DNO_HEX_FP=1 -DLong=int32_t -DULong=uint32_t -include stdint.h
50
51 dmg_fp_g_fmt.o: dmg_fp_g_fmt.c
52 $(CC) -fPIC -c $< -o $@ -DIEEE_8087=1 -DNO_HEX_FP=1 -DLong=int32_t -DULong=uint32_t -include stdint.h
53
25e143d @laverdet Fix instanceof on new line
laverdet authored
54 parser.yacc.o: parser.lex.hpp
55 parser.lex.o: parser.yacc.hpp
56 parser.o: parser.yacc.hpp
57 node.o: parser.yacc.hpp
c235a01 @laverdet NodeWalker and removal of reduce()
laverdet authored
58 walker.o: node.hpp walker.hpp
25e143d @laverdet Fix instanceof on new line
laverdet authored
59
c235a01 @laverdet NodeWalker and removal of reduce()
laverdet authored
60 libfbjs.a: parser.yacc.o parser.lex.o parser.o node.o walker.o dmg_fp_dtoa.o dmg_fp_g_fmt.o
201b830 @laverdet Be better at rendering numbers
laverdet authored
61 $(AR) rc $@ $^
62 $(AR) -s $@
63
5f3a8ee Using fbconfig/fbmake for libfbjs and jsxmin
Feng Qian authored
64 libfbjs.so: libfbjs.a
201b830 @laverdet Be better at rendering numbers
laverdet authored
65 $(CC) -fPIC -shared $^ -o $@
c6d4e1f @laverdet Making libfbjs actually libfbjs.so
laverdet authored
66
c829df9 jsxmin
Evan Priestley authored
67
f1de0c9 @laverdet Adding a Makefile
laverdet authored
68 clean:
5f3a8ee Using fbconfig/fbmake for libfbjs and jsxmin
Feng Qian authored
69 $(RM) -f \
201b830 @laverdet Be better at rendering numbers
laverdet authored
70 parser.lex.cpp parser.yacc.cpp parser.yacc.hpp parser.yacc.output \
71 libfbjs.so libfbjs.a \
72 dmg_fp_dtoa.o dmg_fp_g_fmt.o \
6ea3afb @laverdet Cleanup various deficiencies
laverdet authored
73 parser.lex.o parser.yacc.o parser.o node.o walker.o
Something went wrong with that request. Please try again.