On 07.10.17, Cág wrote: > I've tried it, the output complains about missing object files: > --- > cc: autoreload_inotify.o: No such file or directory > cc: commands.o: No such file or directory > cc: image.o: No such file or directory > cc: main.o: No such file or directory > cc: options.o: No such file or directory > cc: thumbs.o: No such file or directory > cc: util.o: No such file or directory > cc: window.o: No such file or directory > *** Error 1 in /home/caoc/code/suckless/sxiv (Makefile:30 'sxiv': cc > -L/usr/X11R6/lib -L/usr/local/lib -o sxiv autoreload_inotify.o command...) > ---
Your '.c.o' suffix rule is not executed because the suffix list gets cleared at the end of the Makefile. You either have to delete the '.SUFFIXES:' rule or add another one with '.c' and '.o'. > On a side note: I suppose you are the author, any plans to make the Makefile > portable? Yes, I am. Unfortunately for you, I have no such plans. I rather use a portable make than bother to write a portable Makefile. Also, out-of-source builds are much harder if only using POSIX make syntax. Maybe it's better to write a new minimal BSD Makefile using bsd.prog.mk instead of tailoring sxiv's GNU Makefile to make it work with BSD make. Bert