# HG changeset patch # User William Astle # Date 1365319769 21600 # Node ID f6acfc659dd954b2bd169a6c83713823b828ee01 # Parent 35b6787a5b39615d1ed1cb0cf95c4b8eaf0c762a Allow overriding CC, AR, and RANLIB from the environment Rather than unconditionally setting CC, AR, and RANLIB, allow the environment to override them. This is useful in more circumstances than just cross-compiling. Thanks to Tormod Volden for bringing this to my notice though his original suggestion was different. diff -r 35b6787a5b39 -r f6acfc659dd9 Makefile --- a/Makefile Sun Apr 07 01:18:31 2013 -0600 +++ b/Makefile Sun Apr 07 01:29:29 2013 -0600 @@ -10,13 +10,13 @@ DESTDIR ?= /usr/local/bin # C compiler -CC := $(BUILDTPREFIX)cc +CC ?= $(BUILDTPREFIX)cc # ar -AR := $(BUILDTPREFIX)ar +AR ?= $(BUILDTPREFIX)ar # ranlib -RANLIB := $(BUILDTPREFIX)ranlib +RANLIB ?= $(BUILDTPREFIX)ranlib CPPFLAGS += -I lwlib -DPACKAGE_STRING='"lwtools 4.7+"' LDFLAGS += -L$(PWD)/lwlib -llw