--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
-CC=gcc
-CFLAGS=-O3 -Wall -Wextra -Wno-unknown-pragmas
-LDFLAGS=
-LIBS=-lm -lpthread -lz
+CC?=gcc
+CFLAGS?=-O3 -Wall -Wextra -Wno-unknown-pragmas
+LDFLAGS?=
+LIBS?=-lm -lpthread -lz
 ZOPFLI=zopfli/src/zopfli/
 ZOP=deflate.o blocksplitter.o tree.o lz77.o cache.o hash.o util.o squeeze.o katajainen.o
 
