Use the implicit rule for single source file programs.
Specify CFLAGS and LDLIBS appropriately.
Also link against libX11 explicitly in order to fix this linking error:
cc -ansi -Wall -pedantic -ggdb xicursorset.c -lXi -lXcursor -o xicursorset
/usr/bin/ld: /tmp/cc6cA5Ex.o: undefined reference to symbol 'XFlush'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'xicursorset' failed
make: *** [xicursorset] Error 1