summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2012-05-21 10:38:21 +0200
committerPeter Stuge <peter@stuge.se>2012-05-21 10:38:21 +0200
commit8de7493db092a8d52ff4303a5b9c2056fca5ed52 (patch)
treec964136f2412a663684fc045afef309a9fc44482
parentc4662e777287397413bffa58f3c8ce9a6c6559d1 (diff)
Makefile: Use CC, CFLAGS and LDFLAGS variables if they have been set
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6e7f128..9ab5c21 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
-OBJ=bucts.o
-DESCR=$(shell git describe)
+CC:=gcc
+OBJ:=bucts.o
+VERSION:=$(shell git describe)
all: bucts
bucts: $(OBJ)
- gcc -s -o $@ $(OBJ) -lpci
+ $(CC) -o $@ $(OBJ) $(LDFLAGS) -lpci
%.o: %.c
- gcc -s '-DVERSION="$(DESCR)"' -c $<
+ $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -c $<
.PHONY: clean
clean: