#If you don't have imake, you can give this a try. 

mapedit: mapedit.o gd.o
	gcc mapedit.o gd.o -o mapedit -lm -lX11 -lXaw -lXmu -lXt -lXext
