Merge pull request #16 from lemenkov/destdir_flexibility Allow overriding some more Makefile variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
diff --git a/detok/Makefile b/detok/Makefile
index 235966a..4f64445 100644
--- a/detok/Makefile
+++ b/detok/Makefile
@@ -24,13 +24,13 @@
PROGRAM = detok
-DESTDIR = /usr/local
+DESTDIR ?= /usr/local
CC ?= gcc
-STRIP = strip
+STRIP ?= strip
INCLUDES = -I../shared
# Normal Flags:
-CFLAGS = -O2 -Wall #-Wextra
+CFLAGS ?= -O2 -Wall #-Wextra
LDFLAGS =
# Coverage:
diff --git a/romheaders/Makefile b/romheaders/Makefile
index cdb3d51..c1e873f 100644
--- a/romheaders/Makefile
+++ b/romheaders/Makefile
@@ -24,10 +24,10 @@
PROGRAM = romheaders
-DESTDIR = /usr/local
+DESTDIR ?= /usr/local
CC ?= gcc
-STRIP = strip
-CFLAGS = -O2 -Wall -Wextra
+STRIP ?= strip
+CFLAGS ?= -O2 -Wall -Wextra
INCLUDES = -I../shared
SOURCES = romheaders.c ../shared/classcodes.c
diff --git a/toke/Makefile b/toke/Makefile
index 4f56f67..9d3c966 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -24,13 +24,13 @@
PROGRAM = toke
-DESTDIR = /usr/local
+DESTDIR ?= /usr/local
CC ?= gcc
-STRIP = strip
+STRIP ?= strip
INCLUDES = -I../shared
# Normal flags
-CFLAGS = -O2 -Wall #-Wextra
+CFLAGS ?= -O2 -Wall #-Wextra
LDFLAGS =
# Coverage: