mtoyoda / sl

SL(1): Cure your bad habit of mistyping
Other
2.95k stars 427 forks source link

Update Makefile and rely on implicit rules #30

Closed grimreaper closed 7 years ago

grimreaper commented 9 years ago

make has a whole bunch of nice implicit logic. with the Makefile set up as above:

%make sl
cc -O  -lncurses  sl.c   -o sl

works exactly as expected and the compiler and CFLAGS are not hard coded.

charlesoconor commented 7 years ago

If you do this the makefile doesn't know that sl.h is a dependency. If you only change the header then make won't rebuild for you.

grimreaper commented 7 years ago

True; there are two ways to handle that: gcc -M or manually listing out deps.

That said, this conflicts so closing.