--- Makefile.orig 2019-10-04 17:36:38 UTC +++ Makefile @@ -1,18 +1,18 @@ showkeys: showkeys.c showkeys.h keystack.o - gcc -g -Wall showkeys.c keystack.o -o showkeys -lX11 -lxosd -lpthread -lXext -lX11 -lXinerama -lXtst + ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} -g -Wall showkeys.c keystack.o -o showkeys -lX11 -lxosd -lpthread -lXext -lX11 -lXinerama -lXtst keystack.o: keystack.c keystack.h - gcc -c -g keystack.c + ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} -c -g keystack.c clean: rm showkeys keystack.o record-attempt record-example check-syntax: - gcc -Wall -o nul -S ${CHK_SOURCES} + ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} -Wall -o nul -S ${CHK_SOURCES} -record-attempt: record-attempt.c - gcc -g -Wall record-attempt.c -L/usr/lib -lXtst -lxosd -lpthread -lXext -lX11 -lXinerama -o record-attempt +record-attempt: tests/record-attempt.c + ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} -g -Wall tests/record-attempt.c -L/usr/lib -lXtst -lxosd -lpthread -lXext -lX11 -lXinerama -o record-attempt -record-example: record-example.c - gcc -g -Wall record-example.c -L/usr/lib -lXtst -lxosd -lpthread -lXext -lX11 -lXinerama -o record-example +record-example: tests/record-example.c + ${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} -g -Wall tests/record-example.c -L/usr/lib -lXtst -lxosd -lpthread -lXext -lX11 -lXinerama -o record-example