# if you don't have XILHOME set, we look in default place
XIL_INSTALL_PT=/opt/SUNWits/Graphics-sw/xil

CFLAGS = -I$(XILHOME)/include -I$(XIL_INSTALL_PT)/include -I$(OPENWINHOME)/include -D_REENTRANT

LIBS = -L$(XILHOME)/lib -L$(XIL_INSTALL_PT)/lib -L$(OPENWINHOME)/lib -R $(XIL_INSTALL_PT)/lib:/usr/openwin/lib

install := LIBS += -lxil -lX11 -ldl -ldga -lm -lthread
# -lthread doesn't work with SPARCworks C 2.0.1 debugger
debug_install := LIBS += -lxil -lX11 -ldl -lm -ldga
debug_install := CFLAGS += -g

install: xil_display
debug_install: xil_display

debug: debug_install

xil_display: display.o dcmap.o ddither.o
	$(CC) -o $@ display.o dcmap.o ddither.o $(LIBS) 

clean:
	rm -f a.out core xil_display *.o

display.o: ddither.h
