aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-10-09 23:05:40 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-10-09 23:05:40 +0100
commit286532e6021f1a1a90966a8ecf683d9efc5ec55d (patch)
treedc1aa69c1ab7c70c94765dd3554a2c4663e4eb63 /Makefile
parent247fae6a72dde255ee2a23eb1e3eb1bd7a466ed0 (diff)
downloadtermo-286532e6021f1a1a90966a8ecf683d9efc5ec55d.tar.gz
termo-286532e6021f1a1a90966a8ecf683d9efc5ec55d.tar.xz
termo-286532e6021f1a1a90966a8ecf683d9efc5ec55d.zip
Respect user's CC and CFLAGS
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 22940e7..9f25d79 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,19 @@
-CCFLAGS=-Wall -Iinclude -std=c99
-LDFLAGS=
+CC?=gcc
+CFLAGS?=
+
+CFLAGS_DEBUG=
ifeq ($(DEBUG),1)
- CCFLAGS+=-ggdb -DDEBUG
+ CFLAGS_DEBUG=-ggdb -DDEBUG
endif
all: demo
demo: termkey.o driver-csi.o driver-ti.o demo.c
- gcc $(CCFLAGS) $(LDFLAGS) -o $@ $^ -lncurses
+ $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -o $@ $^ -lncurses
%.o: %.c
- gcc $(CCFLAGS) -o $@ -c $^
+ $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -o $@ -c $^
.PHONY: clean
clean: