libtool := @LIBTOOL@
cxx := @CXX@
objcxx := @OBJCXX@
-flags := @CPPFLAGS@ @CXXFLAGS@ -DYYDEBUG=1
+cflags := @CPPFLAGS@ @CXXFLAGS@ -DYYDEBUG=1
+ldflags := @LDFLAGS@
+library := @LIBS@ @LTLIBAPR@ @LTLIBICONV@
paths := $(foreach path,$(paths),$(wildcard $(path)))
-flags += $(foreach path,$(paths),-I$(path) -L$(path))
+cflags += $(foreach path,$(paths),-I$(path) -L$(path))
svn := $(shell svnversion)
header := Cycript.tab.hh Parser.hpp Pooling.hpp cycript.hpp Internal.hpp Error.hpp String.hpp Exception.hpp Standard.hpp
code :=
-code += Replace.o Output.o
-code += Cycript.tab.o lex.cy.o
-code += Network.o Parser.o
-code += JavaScriptCore.o Library.o
+code += Replace.lo Output.lo
+code += Cycript.tab.lo lex.cy.lo
+code += Network.lo Parser.lo
+code += JavaScriptCore.lo Library.lo
inject :=
entitle := $(ldid)
lib := lib
dll := so
-apr_config := apr-1-config
-library :=
-console := -lreadline
depends :=
restart ?= $(MAKE)
-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),)
endif
endif
-apr := $(shell $(apr_config) --link-ld)
-library += $(apr)
-console += $(apr)
-
-flags += -Wall -Werror -Wno-parentheses #-Wno-unused
-flags += -fno-common
+cflags += -Wall -Werror -Wno-parentheses #-Wno-unused
+cflags += -fno-common
ifneq ($(srcdir),.)
-flags += -I.
+cflags += -I.
endif
-flags += -I$(srcdir) -I$(srcdir)/include -I$(shell $(apr_config) --includedir)
+cflags += -I$(srcdir) -I$(srcdir)/include
-all += $(lib)cycript.$(dll)
+all += $(lib)cycript.la
filters += $(shell bison <(echo '%code{}%%_:') -o/dev/null 2>/dev/null && echo Bison24 || echo Bison23)
all: $(all)
clean::
- rm -f *.lo *.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
+ rm -rf *.lo *.o .libs $(lib)cycript.$(dll) $(lib)cycript.la $(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
distclean: clean
rm -f GNUmakefile config.log config.status libtool
#Parser.hpp: Parser.py Parser.dat
# ./Parser.py <Parser.dat >$@
-Cycript.tab.o: Cycript.tab.cc $(header)
- $(libtool) --mode=compile $(cxx) $(flags) -c -o $@ $<
+Cycript.tab.lo: Cycript.tab.cc $(header)
+ $(libtool) --mode=compile $(cxx) $(cflags) -c -o $@ $<
-lex.cy.o: lex.cy.c $(header)
- $(libtool) --mode=compile $(cxx) $(flags) -c -o $@ $<
+lex.cy.lo: lex.cy.c $(header)
+ $(libtool) --mode=compile $(cxx) $(cflags) -c -o $@ $<
-%.o: %.cpp $(header)
- $(libtool) --mode=compile $(cxx) $(flags) -c -o $@ $<
+%.lo: %.cpp $(header)
+ $(libtool) --mode=compile $(cxx) $(cflags) -c -o $@ $<
-%.o: %.mm $(header)
- $(libtool) --mode=compile $(objcxx) $(flags) -c -o $@ $<
+%.lo: %.mm $(header)
+ $(libtool) --mode=compile $(objcxx) $(cflags) -c -o $@ $<
-$(lib)cycript.$(dll): $(code)
- $(libtool) --mode=link $(cxx) $(flags) -shared -dynamiclib -o $@ $(filter %.o,$^) $(library) $(link)
+$(lib)cycript.la: $(code)
+ $(libtool) --mode=link $(cxx) $(ldflags) -o $@ $(filter %.lo,$^) $(library) $(link) -rpath /usr/lib
$(ldid) $@
-cycript: Console.o $(lib)cycript.$(dll) $(inject)
- $(libtool) --mode=link $(cxx) $(flags) -o $@ $(filter %.o,$^) -L. -lcycript $(console) $(link)
+cycript: Console.lo $(lib)cycript.la $(inject)
+ $(libtool) --mode=link $(cxx) $(ldflags) -o $@ $(filter %.lo,$^) $(lib)cycript.la $(link) -rpath /usr/lib
$(entitle) cycript
package: $(deb)
ac_ct_CXX
CXXFLAGS
CXX
-APR
+LTLIBAPR
GPERF
_BASH
FLEX
ac_subst_files=''
ac_user_opts='
enable_option_checking
-enable_shared
enable_static
+enable_shared
with_pic
enable_fast_install
with_gnu_ld
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
# Set options
-
-
-
- enable_dlopen=no
-
-
- enable_win32_dll=no
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
*)
- enable_shared=no
+ enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
- enable_shared=yes
+ enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac
else
- enable_shared=yes
+ enable_static=no
fi
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
*)
- enable_static=no
+ enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
- enable_static=yes
+ enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac
else
- enable_static=yes
+ enable_shared=yes
fi
+
# Check whether --with-pic was given.
if test "${with_pic+set}" = set; then :
withval=$with_pic; pic_mode="$withval"
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6783: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6782: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6787: \$? = $ac_status" >&5
+ echo "$as_me:6786: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7122: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7121: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7126: \$? = $ac_status" >&5
+ echo "$as_me:7125: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7227: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7226: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7231: \$? = $ac_status" >&5
+ echo "$as_me:7230: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7282: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7281: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7286: \$? = $ac_status" >&5
+ echo "$as_me:7285: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9666 "configure"
+#line 9665 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9762 "configure"
+#line 9761 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
done
- APR=`$apr_config --link-ld`
+ LTLIBAPR=`$apr_config --link-libtool`
;; #(
*) :
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13133: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13132: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13137: \$? = $ac_status" >&5
+ echo "$as_me:13136: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13232: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13231: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13236: \$? = $ac_status" >&5
+ echo "$as_me:13235: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13284: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13283: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13288: \$? = $ac_status" >&5
+ echo "$as_me:13287: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
delay_variable_subst='$delay_variable_subst'
macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
macro_version=$macro_version
macro_revision=$macro_revision
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
# Whether or not to build static libraries.
build_old_libs=$enable_static
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
# What type of objects to build.
pic_mode=$pic_mode