Add support for building as a .framework
FossilOrigin-Name: e3441508b5a2108206d0c5130ca71fc79c12361b32ae1e8cb994c5ee63826a92
This commit is contained in:
parent
e5b9634a02
commit
2a0c3bb8a1
4 changed files with 13 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,5 +14,6 @@ config.log
|
|||
config.status
|
||||
configure
|
||||
extra.mk
|
||||
src/ObjPgSQL.framework
|
||||
tests/tests
|
||||
tests/tests.exe
|
||||
|
|
|
@ -22,7 +22,8 @@ CPP="$OBJCPP"
|
|||
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS $($OBJFW_CONFIG --cppflags)"
|
||||
OBJCFLAGS="$OBJCFLAGS $($OBJFW_CONFIG --objcflags)"
|
||||
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG --ldflags)"
|
||||
LIBS="$LIBS $($OBJFW_CONFIG --libs)"
|
||||
AC_SUBST(OBJFW_LIBS, "$($OBJFW_CONFIG --libs)")
|
||||
AC_SUBST(OBJFW_FRAMEWORK_LIBS, "$($OBJFW_CONFIG --framework-libs)")
|
||||
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_PROG_RANLIB
|
||||
|
@ -33,6 +34,10 @@ AS_IF([test x"$enable_shared" != x"no"], [
|
|||
AC_SUBST(OBJPGSQL_SHARED_LIB, "${LIB_PREFIX}objpgsql${LIB_SUFFIX}")
|
||||
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
|
||||
AC_SUBST(EXCEPTIONS_EXCEPTIONS_LIB_A, "exceptions/exceptions.lib.a")
|
||||
|
||||
BUILDSYS_FRAMEWORK([
|
||||
AC_SUBST(OBJPGSQL_FRAMEWORK, "ObjPgSQL.framework")
|
||||
])
|
||||
])
|
||||
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
|
||||
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
|
||||
|
|
|
@ -2,5 +2,8 @@ EXCEPTIONS_A = @EXCEPTIONS_A@
|
|||
EXCEPTIONS_EXCEPTIONS_A = @EXCEPTIONS_EXCEPTIONS_A@
|
||||
EXCEPTIONS_EXCEPTIONS_LIB_A = @EXCEPTIONS_EXCEPTIONS_LIB_A@
|
||||
EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@
|
||||
OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@
|
||||
OBJFW_LIBS = @OBJFW_LIBS@
|
||||
OBJPGSQL_FRAMEWORK = @OBJPGSQL_FRAMEWORK@
|
||||
OBJPGSQL_SHARED_LIB = @OBJPGSQL_SHARED_LIB@
|
||||
OBJPGSQL_STATIC_LIB = @OBJPGSQL_STATIC_LIB@
|
||||
|
|
|
@ -4,6 +4,7 @@ SUBDIRS = exceptions
|
|||
|
||||
SHARED_LIB = ${OBJPGSQL_SHARED_LIB}
|
||||
STATIC_LIB = ${OBJPGSQL_STATIC_LIB}
|
||||
FRAMEWORK = ${OBJPGSQL_FRAMEWORK}
|
||||
LIB_MAJOR = 0
|
||||
LIB_MINOR = 1
|
||||
|
||||
|
@ -20,3 +21,5 @@ include ../buildsys.mk
|
|||
|
||||
CPPFLAGS += -I. -Iexceptions
|
||||
LD = ${OBJC}
|
||||
FRAMEWORK_LIBS := ${OBJFW_FRAMEWORK_LIBS} ${LIBS}
|
||||
LIBS := ${OBJFW_LIBS} ${LIBS}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue