To build xsetwallpaper, I had to
git clone https://github.com/nothings/stb
and copy stb/stb_image.h as stbi.h, as well as
stb/deprecated/stb_image.c as stb_image.c (both files are public
domain); then I made a short Imakefile:
....
SRCS = stb_image.c xsetwallpaper.c
OBJS = stb_image.o xsetwallpaper.o
DEPLIBS = $(DEPXTOOLLIB) $(DEPXLIB) $(DEPXINERAMALIB)
LOCAL_LIBRARIES = $(XTOOLLIB) $(XLIB) $(XINERAMALIB)
NAME = xsetwallpaper
VERSION = 1.0.0
ComplexProgramTarget($(NAME))
....
xmkmf && make then compiles, but link fails as libm is not included;