I have the following makefile:
PROG = draw CFLAGS = -w -s -O2 -ansi -DSHM XLIBS = -lX11 -lXext -lXmu -lXext -lXmu -lXt -lXi -lSM -lICE LIBS = -frame
Have you installed XQuartz, as suggested here: http://support.apple.com/kb/HT5293 ?
By default there is no X11 on Mountain Lion.