ObjPgSQL  Check-in [e3441508b5]

Overview
Comment:Add support for building as a .framework
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e3441508b5a2108206d0c5130ca71fc79c12361b32ae1e8cb994c5ee63826a92
User & Date: js 2018-02-25 23:50:12
Context
2018-02-25
23:56
Fix compilation of tests check-in: 04c3ced613 user: js tags: trunk
23:50
Add support for building as a .framework check-in: e3441508b5 user: js tags: trunk
23:45
Update buildsys check-in: 74e02b19fa user: js tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to .gitignore.

10
11
12
13
14
15
16

17
18
10
11
12
13
14
15
16
17
18
19







+


aclocal.m4
autom4te.cache
buildsys.mk
config.log
config.status
configure
extra.mk
src/ObjPgSQL.framework
tests/tests
tests/tests.exe

Changes to configure.ac.

18
19
20
21
22
23
24
25


26
27
28
29
30
31
32
33
34
35




36
37
38
39
40
41
42
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







-
+
+










+
+
+
+







AC_PROG_LN_S
AC_PROG_INSTALL

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]))
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")
	AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")
])

Changes to extra.mk.in.

1
2
3
4



5
6
1
2
3
4
5
6
7
8
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@

Changes to src/Makefile.

1
2
3
4
5
6

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25






+
















+
+
include ../extra.mk

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	\
       PGResultRow.m
INCLUDES := ${SRCS:.m=.h}	\
	    ObjPgSQL.h

OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_A}
LIB_OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_LIB_A}

include ../buildsys.mk

CPPFLAGS += -I. -Iexceptions
LD = ${OBJC}
FRAMEWORK_LIBS := ${OBJFW_FRAMEWORK_LIBS} ${LIBS}
LIBS := ${OBJFW_LIBS} ${LIBS}