--- test/Makefile.orig	2020-01-24 16:06:25.858716206 +0200
+++ test/Makefile	2020-01-24 16:06:52.438470272 +0200
@@ -1,7 +1,7 @@
-CC = gcc
+CC ?= gcc
 
-CFLAGS = -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
-LDFLAGS = -lrt -lpthread
+CFLAGS = $(CFLAGS) -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
+LDFLAGS = $(LDFLAGS) -lrt -lpthread
 
 SRC = timetest.c
 OBJ = ${SRC:.c=.o}

--- test/Makefile.orig	2020-01-24 16:06:25.858716206 +0200
+++ test/Makefile	2020-01-24 16:12:13.311556734 +0200
@@ -1,7 +1,7 @@
-CC = gcc
+CC ?= gcc
 
-CFLAGS = -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
-LDFLAGS = -lrt -lpthread
+CFLAGS += -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
+LDFLAGS += -lrt -lpthread
 
 SRC = timetest.c
 OBJ = ${SRC:.c=.o}

Change CFLAGS and LDFLAGS to +=
Change CFLAGS and LDFLAGS to +=
