From 8de7493db092a8d52ff4303a5b9c2056fca5ed52 Mon Sep 17 00:00:00 2001 From: Peter Stuge Date: Mon, 21 May 2012 10:38:21 +0200 Subject: Makefile: Use CC, CFLAGS and LDFLAGS variables if they have been set --- Makefile | 9 +++++---- 1 file 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: -- cgit v1.2.1