util: m5term, fix LDFLAGS, standard make variables
authorAdrian Herrera <adrian.herrera@arm.com>
Thu, 3 Dec 2020 16:45:59 +0000 (16:45 +0000)
committerAdrian Herrera <adrian.herrera@arm.com>
Fri, 4 Dec 2020 09:05:22 +0000 (09:05 +0000)
Enables build systems to provide necessary flags to build m5term.
Useful specially if a different linker is intended to be used.

Change-Id: If7f867cc0965d6ad4627b5421e00a99cc3d64989
Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38256
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/term/Makefile

index 658b961862f48e3f7223b4b4442fa9a9c7d8fd82..4aa1c52ee33052d60e133c3ca1c20f6e81c43e54 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-CCFLAGS= -g -O0
+CFLAGS ?= -g -O0
 
 default: m5term
 
 m5term: term.c
-       $(CC) $(LFLAGS) -o $@ $^
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 
 install: m5term
        $(SUDO) install -o root -m 555 m5term /usr/local/bin