X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/4c2a7d11a3bc74b04978bc50444c676832f49bb6..bc1e87aa9169654208f6ee87281108143792d981:/makefile diff --git a/makefile b/makefile index 7711fbd..f939c4b 100644 --- a/makefile +++ b/makefile @@ -38,19 +38,17 @@ ldid := true entitle := $(ldid) lib := lib dll := so -apr := $(shell apr-1-config --link-ld) -library := $(apr) -console := $(apr) -lreadline +apr_config := apr-1-config +library := +console := -lreadline 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 --include $(uname_s)-$(uname_m).mk ifneq ($(shell pkg-config libffi --modversion 2>/dev/null),) flags += $(shell pkg-config --cflags libffi) @@ -64,9 +62,13 @@ endif endif endif +apr := $(shell $(apr_config) --link-ld) +library += $(apr) +console += $(apr) + flags += -Wall -Werror -Wno-parentheses #-Wno-unused flags += -fno-common -flags += -I. -Iinclude -I$(shell apr-1-config --includedir) +flags += -I. -Iinclude -I$(shell $(apr_config) --includedir) all += $(lib)cycript.$(dll) @@ -109,8 +111,8 @@ endif all: $(all) -clean: - rm -f *.o $(lib)cycript.$(dll) $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.hpp +clean:: + rm -f *.o $(lib)cycript.$(dll) $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.hpp Cycript.output %.yy: %.yy.in ./Filter.sh <$< >$@ $(filters) @@ -122,7 +124,7 @@ Cycript.tab.cc Cycript.tab.hh location.hh position.hh: Cycript.yy bison -v --report=state $< lex.cy.c: Cycript.l - flex $< + flex -t $< | sed -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@ #Parser.hpp: Parser.py Parser.dat # ./Parser.py $@