CC = cc  
CFLAGS = -O
LIBS = -lm -lX11
DESTBIN = /usr/bin/X11
DESTMAN = /usr/man/manl

xtopo: xtopo.o
	$(CC) $(CFLAGS) -o xtopo xtopo.o $(LIBS)

xtopo.o: xtopo.c xtopo.h patchlevel.h
	$(CC) $(CFLAGS) -c xtopo.c

install: xtopo
	cp xtopo $(DESTBIN)/xtopo;
	cd $(DESTBIN); chmod 755 xtopo

install.man:
	cp xtopo.man $(DESTMAN)/xtopo.l; chmod 644 $(DESTMAN)/xtopo.l
      
clean:
	rm -f xtopo xtopo.o core

uninstall:
	cd $(DESTBIN); rm -f xtopo
	rm -f $(DESTMAN)/xtopo.l
