comparison Makefile @ 271:f6acfc659dd9

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 <debian.tormod@gmail.com> for bringing this to my notice though his original suggestion was different.
author William Astle <lost@l-w.ca>
date Sun, 07 Apr 2013 01:29:29 -0600
parents 35b6787a5b39
children cfeb196251e4
comparison
equal deleted inserted replaced
270:35b6787a5b39 271:f6acfc659dd9
8 #BUILDTPREFIX=i586-mingw32msvc- 8 #BUILDTPREFIX=i586-mingw32msvc-
9 9
10 DESTDIR ?= /usr/local/bin 10 DESTDIR ?= /usr/local/bin
11 11
12 # C compiler 12 # C compiler
13 CC := $(BUILDTPREFIX)cc 13 CC ?= $(BUILDTPREFIX)cc
14 14
15 # ar 15 # ar
16 AR := $(BUILDTPREFIX)ar 16 AR ?= $(BUILDTPREFIX)ar
17 17
18 # ranlib 18 # ranlib
19 RANLIB := $(BUILDTPREFIX)ranlib 19 RANLIB ?= $(BUILDTPREFIX)ranlib
20 20
21 CPPFLAGS += -I lwlib -DPACKAGE_STRING='"lwtools 4.7+"' 21 CPPFLAGS += -I lwlib -DPACKAGE_STRING='"lwtools 4.7+"'
22 LDFLAGS += -L$(PWD)/lwlib -llw 22 LDFLAGS += -L$(PWD)/lwlib -llw
23 23
24 CFLAGS ?= -O3 -Wall 24 CFLAGS ?= -O3 -Wall