This allows specifying e.g. hardening options like -Wl,-z,relro
for link-time options.
It *is* normally possible to add these to CFLAGS,
but LDFLAGS is the established way to do this and tooling expects
it to work.
See also POSIX on make(1), whose default rules use LDFLAGS.
ln -sf `basename $<` $@
lib/$(SONAME): lib/monocypher.o $(LINK_ED25519)
@mkdir -p $(@D)
- $(CC) $(CFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^
lib/monocypher-ed25519.o: src/optional/monocypher-ed25519.c \
src/optional/monocypher-ed25519.h
lib/chacha20.o : src/deprecated/chacha20.c src/deprecated/chacha20.h