From c5f716d03d03a0a5c58dea3db96434fd74cffeda Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sat, 5 Jun 2010 19:44:04 +0000 Subject: [PATCH] Made Makefiles not override $CC and $CXX variables (needed for cross-compiling) --- CppUnitLite/Makefile | 8 ++++---- colamd/Makefile | 4 ++-- ldl/Makefile | 2 +- ldl/UFconfig.mk | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CppUnitLite/Makefile b/CppUnitLite/Makefile index 83a6f8c52..b319919b5 100644 --- a/CppUnitLite/Makefile +++ b/CppUnitLite/Makefile @@ -4,9 +4,9 @@ all: libCppUnitLite.a -CC=gcc -CXX=gcc -CPP=gcc +CC ?= gcc +CXX ?= g++ +CPP ?= cpp CXXFLAGS += -O2 sources = $(shell ls *.cpp) @@ -32,4 +32,4 @@ install: all distclean: clean -check: all \ No newline at end of file +check: all diff --git a/colamd/Makefile b/colamd/Makefile index 987b41b80..85b1a2243 100755 --- a/colamd/Makefile +++ b/colamd/Makefile @@ -4,8 +4,8 @@ all: libcolamd.a -CC=gcc -CXX=gcc +CC ?= gcc +CXX ?= g++ CXXFLAGS += -O2 CXXFLAGS += -fPIC diff --git a/ldl/Makefile b/ldl/Makefile index 9f2f0384e..74d03a180 100644 --- a/ldl/Makefile +++ b/ldl/Makefile @@ -9,7 +9,7 @@ include ./UFconfig.mk CXXFLAGS += -O2 CXXFLAGS += -fPIC -I./ -CXX = g++ +CXX ?= g++ all: demo diff --git a/ldl/UFconfig.mk b/ldl/UFconfig.mk index bda4c7b1d..3ca3e3940 100644 --- a/ldl/UFconfig.mk +++ b/ldl/UFconfig.mk @@ -33,7 +33,7 @@ # C compiler and compiler flags: These will normally not give you optimal # performance. You should select the optimization parameters that are best # for your system. On Linux, use "CFLAGS = -O3 -fexceptions" for example. -CC = cc +CC ?= cc # CFLAGS = -O (for example; see below for details) # C++ compiler (also uses CFLAGS)