ObjFW  Check-in [ce924f47f0]

Overview
Comment:Don't mix .o and .amigalib.o files

Also make sure to not build both when only one is needed.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: ce924f47f0b6ab82b322cef3312523e8267ca8957bbdac9c6f6a66f8a2ab7893
User & Date: js on 2020-12-13 14:49:08
Other Links: branch diff | manifest | tags
Context
2020-12-14
18:48
Add functions of OFDNSResourceRecord to Amiga lib check-in: bb4994e5d2 user: js tags: amiga-library
2020-12-13
14:49
Don't mix .o and .amigalib.o files check-in: ce924f47f0 user: js tags: amiga-library
02:26
Add support for Amiga library on MorphOS check-in: 66b96e53d3 user: js tags: amiga-library
Changes

Modified configure.ac from [b26f7b574a] to [1d482694cd].

410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
	TESTS_LIBS="-L../src -L../src/linklib $TESTS_LIBS"
])

AC_ARG_ENABLE(amiga-lib,
	AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(INVOCATION_A, "invocation.a")
	AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
])

AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [
	enable_static="yes"
])







<
|
|
|







410
411
412
413
414
415
416

417
418
419
420
421
422
423
424
425
426
	TESTS_LIBS="-L../src -L../src/linklib $TESTS_LIBS"
])

AC_ARG_ENABLE(amiga-lib,
	AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])
AS_IF([test x"$enable_amiga_lib" != x"no"], [

	AC_SUBST(EXCEPTIONS_AMIGALIB_A, "exceptions.amigalib.a")
	AC_SUBST(FORWARDING_AMIGALIB_A, "forwarding.amigalib.a")
	AC_SUBST(INVOCATION_AMIGALIB_A, "invocation.amigalib.a")
	AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
])

AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [
	enable_static="yes"
])
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999

AC_SUBST(ENCODINGS_SRCS)
AS_IF([test x"$ENCODINGS_SRCS" != x""], [
	AC_SUBST(ENCODINGS, "encodings")

	AS_IF([test x"$enable_shared" != x"no"], [
		AC_SUBST(ENCODINGS_LIB_A, "encodings.lib.a")
		AC_SUBST(ENCODINGS_ENCODINGS_LIB_A, "encodings/encodings.lib.a")
	])
	AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
		AC_SUBST(ENCODINGS_A, "encodings.a")
		AC_SUBST(ENCODINGS_ENCODINGS_A, "encodings/encodings.a")
	])
	AS_IF([test x"$enable_amiga_lib" != x"no"], [
		AC_SUBST(ENCODINGS_AMIGALIB_A, "encodings.amigalib.a")
		AC_SUBST(ENCODINGS_ENCODINGS_AMIGALIB_A,
			"encodings/encodings.amigalib.a")
	])
])

AC_CHECK_FUNCS(arc4random arc4random_buf getrandom random, break)

AS_IF([test x"$host_os" != x"morphos"], [
	AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl")







<

|

<



<
<







975
976
977
978
979
980
981

982
983
984

985
986
987


988
989
990
991
992
993
994

AC_SUBST(ENCODINGS_SRCS)
AS_IF([test x"$ENCODINGS_SRCS" != x""], [
	AC_SUBST(ENCODINGS, "encodings")

	AS_IF([test x"$enable_shared" != x"no"], [
		AC_SUBST(ENCODINGS_LIB_A, "encodings.lib.a")

	])
	AS_IF([test x"$enable_static" = x"yes"], [
		AC_SUBST(ENCODINGS_A, "encodings.a")

	])
	AS_IF([test x"$enable_amiga_lib" != x"no"], [
		AC_SUBST(ENCODINGS_AMIGALIB_A, "encodings.amigalib.a")


	])
])

AC_CHECK_FUNCS(arc4random arc4random_buf getrandom random, break)

AS_IF([test x"$host_os" != x"morphos"], [
	AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl")

Modified utils/ofarc/Makefile from [957c305108] to [3f568364e5].

16
17
18
19
20
21
22
23
24
25
26
27
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofarc/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




16
17
18
19
20
21
22
23
24
25
26
27
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofarc/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofdns/Makefile from [c6c2ac1b61] to [8b305bc200].

12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofdns/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofdns/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofhash/Makefile from [4405db897f] to [32371c1afb].

12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofhash/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofhash/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofhttp/Makefile from [ca0ac82289] to [196747b7c1].

13
14
15
16
17
18
19
20
21
22
23
24
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofhttp/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




13
14
15
16
17
18
19
20
21
22
23
24
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofhttp/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofsock/Makefile from [0438ba0691] to [3ea451369d].

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

${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




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

${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}