X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/64058139d1bdd0e44a7e1c5fc12692e0e8760624..73d3a679f555378095f423536776476f14f54ff2:/makefile diff --git a/makefile b/makefile index c359b58..1de908e 100644 --- a/makefile +++ b/makefile @@ -38,9 +38,9 @@ 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) @@ -62,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) @@ -108,7 +112,7 @@ 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 + 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) @@ -155,7 +159,14 @@ test: $(deb) 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 + sudo cp -p cycript /usr/bin + sudo cp -p $(lib)cycript.$(dll) /usr/lib + # DOUG: this needs to be ported to GNUmakefile + sudo chgrp procmod /usr/bin/cycript + sudo chmod g+s /usr/bin/cycript + +# DOUG: this needs to be ported to GNUmakefile +uninstall: + sudo rm -f /usr/bin/cycript /usr/lib/libcycript.dylib .PHONY: all clean extra package control.tmp