Skip to content

Commit

Permalink
Honor LDFLAGS when building executables.
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed Feb 8, 2020
1 parent fd69176 commit 5217af7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions c/Makefile
Expand Up @@ -65,11 +65,11 @@ clean:

# Executable files
%: %.o $(LIBFILE)
$(CC) $(CFLAGS) -o $@ $< -L . -l $(LIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -L . -l $(LIB)

# Special executable
qrcodegen-test: qrcodegen-test.c $(LIBOBJ:%.o=%.c)
$(CC) $(CFLAGS) -DQRCODEGEN_TEST -o $@ $^
$(CC) $(CFLAGS) $(LDFLAGS) -DQRCODEGEN_TEST -o $@ $^

# The library
$(LIBFILE): $(LIBOBJ)
Expand Down
2 changes: 1 addition & 1 deletion cpp/Makefile
Expand Up @@ -65,7 +65,7 @@ clean:

# Executable files
%: %.o $(LIBFILE)
$(CXX) $(CXXFLAGS) -o $@ $< -L . -l $(LIB)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< -L . -l $(LIB)

# The library
$(LIBFILE): $(LIBOBJ)
Expand Down

0 comments on commit 5217af7

Please sign in to comment.