automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automake passing CFLAGS or CXXFLAGS when linking


From: Grégory Pakosz
Subject: Automake passing CFLAGS or CXXFLAGS when linking
Date: Tue, 28 Jun 2016 19:21:45 +0200

Hello,

What's the rationale behind Automake passing CFLAGS or CXXFLAGS when linking?

LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
  $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
  $(AM_LDFLAGS) $(LDFLAGS) -o $@

CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
  $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
  $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@

In comparison, GNU Make's default linking rule is

.o:
  $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@

where LINK.o = $(CC) $(LDFLAGS) $(TARGET_ARCH)

Regards,
Gregory



reply via email to

[Prev in Thread] Current Thread [Next in Thread]