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),)
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::
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