CC := @CC@
CFLAGS := @CFLAGS@ @SHOBJFLAGS@
CPPFLAGS := -I. -I@srcdir@/tweetnacl/ -I@srcdir@/blake2b/ -DNACL_ED25519_BLAKE2B=1 @CPPFLAGS@ @SHOBJCPPFLAGS@ @DEFS@
LDFLAGS := @LDFLAGS@
LIBS := @LIBS@
SHOBJLDFLAGS := @SHOBJLDFLAGS@
srcdir := @srcdir@
export CC CFLAGS CPPFLAGS
all: @EXTENSION_TARGET@
ifeq (@TCLEXT_BUILD@,shared)
@EXTENSION_TARGET@: tweetnacl.o blake2b.o nano.o Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o @EXTENSION_TARGET@ nano.o tweetnacl.o blake2b.o $(LIBS)
-@WEAKENSYMS@ @EXTENSION_TARGET@
-@REMOVESYMS@ @EXTENSION_TARGET@
else
@EXTENSION_TARGET@: tweetnacl.o blake2b.o nano.o Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o @EXTENSION_TARGET@ nano.o tweetnacl.o blake2b.o $(LIBS)
endif
nano.o: @srcdir@/nano.c @srcdir@/tweetnacl/tweetnacl.h @srcdir@/blake2b/blake2.h nano.tcl.h Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) -o nano.o -c @srcdir@/nano.c
nano.tcl.h: @srcdir@/nano.tcl Makefile
od -A n -v -t xC < '@srcdir@/nano.tcl' > nano.tcl.h.new.1
sed 's@ *@@g;s@..@0x&, @g' < nano.tcl.h.new.1 > nano.tcl.h.new.2
rm -f nano.tcl.h.new.1
mv nano.tcl.h.new.2 nano.tcl.h
tweetnacl.o: @srcdir@/tweetnacl/tweetnacl.c @srcdir@/tweetnacl/tweetnacl.h
$(CC) $(CPPFLAGS) $(CFLAGS) -o tweetnacl.o -c @srcdir@/tweetnacl/tweetnacl.c
blake2b.o: @srcdir@/blake2b/blake2b.c @srcdir@/blake2b/blake2.h @srcdir@/blake2b/blake2-impl.h
$(CC) $(CPPFLAGS) $(CFLAGS) -o blake2b.o -c @srcdir@/blake2b/blake2b.c
test: @EXTENSION_TARGET@
@srcdir@/build/test/test.tcl
clean:
rm -f @EXTENSION_TARGET@ nano.o
rm -f blake2b.o tweetnacl.o
distclean: clean
rm -f Makefile pkgIndex.tcl config.log config.status nano.syms
rm -f nano.tcl.h
mrproper: distclean
rm -f configure aclocal.m4 config.guess config.sub install-sh
rm -rf tweetnacl blake2b
.PHONY: all test clean distclean mrproper