Check-in [9532d401f5]
Overview
Comment:Updated to make whether or not to use the amalgamation a separate configuration option
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9532d401f5cd7204ebd2acf12eb40d0889a70edea6bfa9a24ee6c6ee031fc377
User & Date: rkeene on 2019-01-13 22:10:14
Other Links: manifest | tags
Context
2019-01-16
21:38
Moved some of the argon2 patches to a patch file check-in: 4cee3b7e59 user: rkeene tags: trunk
2019-01-13
22:10
Updated to make whether or not to use the amalgamation a separate configuration option check-in: 9532d401f5 user: rkeene tags: trunk
2019-01-12
21:59
Fixed name of keepalive statistic for unique peers check-in: 173b00efe3 user: rkeene tags: trunk
Changes

Modified Makefile.in from [a82d8a42c3] to [a68a8f27fc].

12
13
14
15
16
17
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
48
49




50
51
52
53
54
55
56
LIBS          := @LIBS@
SHOBJLDFLAGS  := @SHOBJLDFLAGS@
VPATH         := @srcdir@
srcdir        := @srcdir@
prefix        := @prefix@
exec_prefix   := @exec_prefix@
libdir        := @libdir@

PACKAGE_VERSION     := @PACKAGE_VERSION@
TCL_PACKAGE_PATH    := @TCL_PACKAGE_PATH@
PACKAGE_INSTALL_DIR := $(TCL_PACKAGE_PATH)/tcl-nano$(PACKAGE_VERSION)
INSTALL             := @INSTALL@
INSTALL_PROGRAM     := @INSTALL_PROGRAM@
INSTALL_DATA        := @INSTALL_DATA@
export CC CFLAGS CPPFLAGS

all: @EXTENSION_TARGET@ pkgIndex.tcl







ifeq (@TCLEXT_BUILD@,shared)

@EXTENSION_TARGET@: monocypher.o argon2.o aes.o randombytes.o nano.o Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o @EXTENSION_TARGET@ nano.o randombytes.o monocypher.o argon2.o aes.o $(LIBS)
	-@WEAKENSYMS@ @EXTENSION_TARGET@
	-@REMOVESYMS@ @EXTENSION_TARGET@
else
@EXTENSION_TARGET@: nano-amalgamation.o Makefile
	-@WEAKENSYMS@ nano-amalgamation.o
	-@REMOVESYMS@ nano-amalgamation.o
	$(AR) rc @EXTENSION_TARGET@ nano-amalgamation.o
	-$(RANLIB) @EXTENSION_TARGET@
endif

# The amalgamation is used when compiling statically so that the same ABI can be exposed
# to upstream projects rather than requiring them to filter out our symbols
nano-amalgamation.c: @srcdir@/nano.c @srcdir@/randombytes.c $(monocypher_dir)monocypher.c $(argon2_dir)argon2.c $(aes_dir)aes.c Makefile
	rm -f nano-amalgamation.c
	cat @srcdir@/nano.c @srcdir@/randombytes.c $(monocypher_dir)monocypher.c $(argon2_dir)argon2.c $(aes_dir)aes.c > nano-amalgamation.c

nano-amalgamation.o: nano-amalgamation.c $(monocypher_dir)monocypher.h $(argon2_dir)argon2.h $(aes_dir)aes.h @srcdir@/randombytes.h nano.tcl.h Makefile
	$(CC) $(CPPFLAGS) -DTCL_NANO_AMALGAMATION=1 $(CFLAGS) -o nano-amalgamation.o -c nano-amalgamation.c





nano.o: @srcdir@/nano.c $(monocypher_dir)monocypher.h $(argon2_dir)argon2.h $(aes_dir)aes.h @srcdir@/randombytes.h nano.tcl.h Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) -o nano.o -c @srcdir@/nano.c

randombytes.o: @srcdir@/randombytes.c @srcdir@/randombytes.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -o randombytes.o -c @srcdir@/randombytes.c








>
|
|
|
|
|
|




>
>
>
>
>
>

>
|
|



|
|
<
|











>
>
>
>







12
13
14
15
16
17
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
LIBS          := @LIBS@
SHOBJLDFLAGS  := @SHOBJLDFLAGS@
VPATH         := @srcdir@
srcdir        := @srcdir@
prefix        := @prefix@
exec_prefix   := @exec_prefix@
libdir        := @libdir@
TCL_NANO_AMALGAMATION := @TCL_NANO_AMALGAMATION@
PACKAGE_VERSION       := @PACKAGE_VERSION@
TCL_PACKAGE_PATH      := @TCL_PACKAGE_PATH@
PACKAGE_INSTALL_DIR   := $(TCL_PACKAGE_PATH)/tcl-nano$(PACKAGE_VERSION)
INSTALL               := @INSTALL@
INSTALL_PROGRAM       := @INSTALL_PROGRAM@
INSTALL_DATA          := @INSTALL_DATA@
export CC CFLAGS CPPFLAGS

all: @EXTENSION_TARGET@ pkgIndex.tcl

ifneq ($(TCL_NANO_AMALGAMATION),1)
TCL_NANO_OBJECTS = monocypher.o argon2.o aes.o randombytes.o nano.o
else
TCL_NANO_OBJECTS = nano-amalgamation.o
endif

ifeq (@TCLEXT_BUILD@,shared)
@EXTENSION_TARGET@: $(TCL_NANO_OBJECTS) Makefile
	rm -f @EXTENSION_TARGET@
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o @EXTENSION_TARGET@ $(TCL_NANO_OBJECTS) $(LIBS)
	-@WEAKENSYMS@ @EXTENSION_TARGET@
	-@REMOVESYMS@ @EXTENSION_TARGET@
else
@EXTENSION_TARGET@: $(TCL_NANO_OBJECTS) Makefile
	rm -f @EXTENSION_TARGET@

	$(AR) rc @EXTENSION_TARGET@ $(TCL_NANO_OBJECTS)
	-$(RANLIB) @EXTENSION_TARGET@
endif

# The amalgamation is used when compiling statically so that the same ABI can be exposed
# to upstream projects rather than requiring them to filter out our symbols
nano-amalgamation.c: @srcdir@/nano.c @srcdir@/randombytes.c $(monocypher_dir)monocypher.c $(argon2_dir)argon2.c $(aes_dir)aes.c Makefile
	rm -f nano-amalgamation.c
	cat @srcdir@/nano.c @srcdir@/randombytes.c $(monocypher_dir)monocypher.c $(argon2_dir)argon2.c $(aes_dir)aes.c > nano-amalgamation.c

nano-amalgamation.o: nano-amalgamation.c $(monocypher_dir)monocypher.h $(argon2_dir)argon2.h $(aes_dir)aes.h @srcdir@/randombytes.h nano.tcl.h Makefile
	$(CC) $(CPPFLAGS) -DTCL_NANO_AMALGAMATION=1 $(CFLAGS) -o nano-amalgamation.o -c nano-amalgamation.c
ifneq (@TCLEXT_BUILD@,shared)
	-@WEAKENSYMS@ nano-amalgamation.o
	-@REMOVESYMS@ nano-amalgamation.o
endif

nano.o: @srcdir@/nano.c $(monocypher_dir)monocypher.h $(argon2_dir)argon2.h $(aes_dir)aes.h @srcdir@/randombytes.h nano.tcl.h Makefile
	$(CC) $(CPPFLAGS) $(CFLAGS) -o nano.o -c @srcdir@/nano.c

randombytes.o: @srcdir@/randombytes.c @srcdir@/randombytes.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -o randombytes.o -c @srcdir@/randombytes.c

Modified configure.ac from [ce621dc2b7] to [599d9d3209].

131
132
133
134
135
136
137
























138
139
140

dnl Setup a stable ABI
DC_SETUP_STABLE_API([${srcdir}/nano.vers], nano.syms)
if test "$tcl_nano_debug" = 'true'; then
	WEAKENSYMS=':'
	REMOVESYMS=':'
fi

























dnl Produce output
AC_OUTPUT(Makefile pkgIndex.tcl-${TCLEXT_BUILD} nano.syms)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

dnl Setup a stable ABI
DC_SETUP_STABLE_API([${srcdir}/nano.vers], nano.syms)
if test "$tcl_nano_debug" = 'true'; then
	WEAKENSYMS=':'
	REMOVESYMS=':'
fi

dnl Default to using the amalgamation for static, not using it for shared
if test "$TCLEXT_BUILD" != 'static'; then
	tcl_nano_amalgamation='false'
else
	tcl_nano_amalgamation='true'
fi

AC_ARG_ENABLE([amalgamation], AS_HELP_STRING([--enable-amalgamation], [enable compiling the whole program as a single translation unit (default: disabled for shared, enabled for static)]), [
	if test "$enableval" = 'yes'; then
		tcl_nano_amalgamation='true'
	elif test "$enableval" = 'no'; then
		tcl_nano_amalgamation='false'
	else
		AC_ERROR([Unknown value for --enable-amalgamation])
	fi
])
if test "$tcl_nano_amalgamation" = 'true'; then
	TCL_NANO_AMALGAMATION='1'
else
	TCL_NANO_AMALGAMATION='0'
fi
AC_SUBST(TCL_NANO_AMALGAMATION)


dnl Produce output
AC_OUTPUT(Makefile pkgIndex.tcl-${TCLEXT_BUILD} nano.syms)