Honor LDFLAGS when building executables.

This commit is contained in:
Thomas Klausner 2020-02-08 18:48:32 +01:00
parent fd6917601d
commit 5217af7cf6
2 changed files with 3 additions and 3 deletions

View File

@ -65,11 +65,11 @@ clean:
# Executable files # Executable files
%: %.o $(LIBFILE) %: %.o $(LIBFILE)
$(CC) $(CFLAGS) -o $@ $< -L . -l $(LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -L . -l $(LIB)
# Special executable # Special executable
qrcodegen-test: qrcodegen-test.c $(LIBOBJ:%.o=%.c) qrcodegen-test: qrcodegen-test.c $(LIBOBJ:%.o=%.c)
$(CC) $(CFLAGS) -DQRCODEGEN_TEST -o $@ $^ $(CC) $(CFLAGS) $(LDFLAGS) -DQRCODEGEN_TEST -o $@ $^
# The library # The library
$(LIBFILE): $(LIBOBJ) $(LIBFILE): $(LIBOBJ)

View File

@ -65,7 +65,7 @@ clean:
# Executable files # Executable files
%: %.o $(LIBFILE) %: %.o $(LIBFILE)
$(CXX) $(CXXFLAGS) -o $@ $< -L . -l $(LIB) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< -L . -l $(LIB)
# The library # The library
$(LIBFILE): $(LIBOBJ) $(LIBFILE): $(LIBOBJ)