From 3b3a11b6dd628851ea6b1422a3d6c8f6402444c9 Mon Sep 17 00:00:00 2001 From: rain Date: Thu, 25 Apr 2019 23:02:27 +0200 Subject: [PATCH] make it easier to set the compiler Hi, I'm trying to package Mininet for Guix which doesn't symlink cc to gcc and this would make it easier to package, as well as configure it for alternative compilers. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c97ea7a..9356520 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/share/man/man1 DOCDIRS = doc/html doc/latex PDF = doc/latex/refman.pdf +CC ?= cc CFLAGS += -Wall -Wextra @@ -46,7 +47,7 @@ slowtest: $(MININET) mininet/examples/test/runner.py -v mnexec: mnexec.c $(MN) mininet/net.py - cc $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(PYMN) --version`\" $< -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(PYMN) --version`\" $< -o $@ install-mnexec: $(MNEXEC) install -D $(MNEXEC) $(BINDIR)/$(MNEXEC)