X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/4e869640036110df20ccde74fcb5a5167f28622a..17fe7546f6ef4df0bc8b0394e39d929c93d5c1f4:/makefile diff --git a/makefile b/makefile index 3100f0a..190fbb4 100644 --- a/makefile +++ b/makefile @@ -46,10 +46,15 @@ depends := restart ?= $(MAKE) uname_s ?= $(shell uname -s) uname_p ?= $(shell uname -p) +uname_m ?= $(shell uname -m) -include $(uname_s).mk -include $(uname_s)-$(uname_p).mk +ifneq ($(shell pkg-config libffi --modversion 2>/dev/null),) +flags += $(shell pkg-config --cflags libffi) +endif + ifdef CY_EXECUTE ifeq ($(filter ObjectiveC,$(filters)),) ifneq ($(shell which gnustep-config 2>/dev/null),) @@ -64,10 +69,12 @@ flags += -I. -Iinclude -I$(shell apr-1-config --includedir) all += $(lib)cycript.$(dll) +filters += $(shell bison <(echo '%code{}%%_:') -o/dev/null 2>/dev/null && echo Bison24 || echo Bison23) + ifdef arch deb := $(shell grep ^Package: control.in | cut -d ' ' -f 2-)_$(shell grep ^Version: control.in | cut -d ' ' -f 2 | sed -e 's/\#/$(svn)/')_$(arch).deb -all: $(deb) +all: extra:: @@ -148,4 +155,8 @@ test: $(deb) if [[ -e jquery.js ]]; then /usr/bin/time cycript -c jquery.js >jquery.cyc.js; gzip -9c jquery.cyc.js >jquery.cyc.js.gz; wc -c jquery.{mam,gcc,cyc,bak,yui}.js; wc -c jquery.{cyc,gcc,bak,mam,yui}.js.gz; fi if [[ -e test.cy ]]; then cycript test.cy; fi +install: cycript $(lib)cycript.$(dll) + cp -p cycript /usr/bin + cp -p $(lib)cycript.$(dll) /usr/lib + .PHONY: all clean extra package control.tmp