]> git.saurik.com Git - cycript.git/blame - Execute.mk
Started working on variable name replacement strategies and generally improved compiler.
[cycript.git] / Execute.mk
CommitLineData
9cad30fa
JF
1CY_EXECUTE :=
2flags += -DCY_EXECUTE
3code += sig/ffi_type.o sig/parse.o sig/copy.o
4code += Execute.o
5library += $(apr) -lffi -lsqlite3
6all += libcycript.db
7filters += C
8
9extra::
10 cp -pR libcycript.db package/usr/lib
11
12libcycript.db: Bridge.def
13 rm -f libcycript.db
14 { \
15 echo 'create table "bridge" ("mode" int not null, "name" text not null, "value" text null);'; \
16 grep '^[CFV]' Bridge.def | sed -e 's/^C/0/;s/^F/1/;s/^V/2/' | sed -e 's/"/\\"/g;s/^\([^ ]*\) \([^ ]*\) \(.*\)$$/insert into "bridge" ("mode", "name", "value") values (\1, '"'"'\2'"'"', '"'"'\3'"'"');/'; \
17 grep '^:' Bridge.def | sed -e 's/^: \([^ ]*\) \(.*\)/insert into "bridge" ("mode", "name", "value") values (-1, '"'"'\1'"'"', '"'"'\2'"'"');/'; \
18 grep '^[EST]' Bridge.def | sed -e 's/^S/3/;s/^T/4/;s/^E/5/' | sed -e 's/^5\(.*\)$$/4\1 i/' | sed -e 's/^\([^ ]*\) \([^ ]*\) \(.*\)$$/insert into "bridge" ("mode", "name", "value") values (\1, '"'"'\2'"'"', '"'"'\3'"'"');/'; \
19 } | tee libcycript.sql | sqlite3 libcycript.db