Make sure common environment variables (CC, CFLAGS, LDFLAGS, …) are not overwritten. Also allow configuring the X11 library and include directory separately. diff -upr drawterm-0_hg20210414.orig/Make.unix drawterm-0_hg20210414/Make.unix --- drawterm-0_hg20210414.orig/Make.unix 2021-04-20 18:51:54.514645075 +0200 +++ drawterm-0_hg20210414/Make.unix 2021-04-20 18:56:30.207396107 +0200 @@ -5,13 +5,16 @@ AR=ar AS=as RANLIB=ranlib X11=/usr/X11R6 -CC=gcc -CFLAGS=-Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -I$(X11)/include -D_THREAD_SAFE $(PTHREAD) -O2 +X11INC=$(X11)/include +X11LIB=$(X11)/lib +CC?=gcc +CFLAGS?=-O2 +CFLAGS+=-Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -I$(X11INC) -D_THREAD_SAFE $(PTHREAD) O=o OS=posix GUI=x11 -LDADD=-L$(X11)/lib64 -L$(X11)/lib -lX11 -ggdb -lm -LDFLAGS=$(PTHREAD) +LDADD=-L$(X11LIB) -lX11 -ggdb -lm +LDFLAGS+=$(PTHREAD) TARG=drawterm # AUDIO=none AUDIO=unix