Commit 7cddcb08a2ade5edb83100fd5296d5780246a7a8

mcayland 2024-04-24T10:35:09

Merge pull request #16 from lemenkov/destdir_flexibility Allow overriding some more Makefile variables

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: