Index: .gitignore ================================================================== --- .gitignore +++ .gitignore @@ -12,7 +12,8 @@ buildsys.mk config.log config.status configure extra.mk +src/ObjPgSQL.framework tests/tests tests/tests.exe Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -20,11 +20,12 @@ 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 AC_ARG_ENABLE(shared, AS_HELP_STRING([--disable-shared], [do not build shared library])) @@ -31,10 +32,14 @@ AS_IF([test x"$enable_shared" != x"no"], [ BUILDSYS_SHARED_LIB 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"], [ AC_SUBST(OBJPGSQL_STATIC_LIB, "libobjpgsql.a") AC_SUBST(EXCEPTIONS_A, "exceptions.a") Index: extra.mk.in ================================================================== --- extra.mk.in +++ extra.mk.in @@ -1,6 +1,9 @@ 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@ Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -2,10 +2,11 @@ SUBDIRS = exceptions SHARED_LIB = ${OBJPGSQL_SHARED_LIB} STATIC_LIB = ${OBJPGSQL_STATIC_LIB} +FRAMEWORK = ${OBJPGSQL_FRAMEWORK} LIB_MAJOR = 0 LIB_MINOR = 1 SRCS = PGConnection.m \ PGResult.m \ @@ -18,5 +19,7 @@ include ../buildsys.mk CPPFLAGS += -I. -Iexceptions LD = ${OBJC} +FRAMEWORK_LIBS := ${OBJFW_FRAMEWORK_LIBS} ${LIBS} +LIBS := ${OBJFW_LIBS} ${LIBS}