# The path to the tcl.h header file

TCL_INCPATH = /usr/include/tcl8.4.5/generic

# The path to the tk.h header file

TK_INCPATH  = /usr/include/tk8.4.5/generic

# The path to the X11 include files

XINCLUDES   = -I/usr/X11R6/include

TCL_VERSION = @TCLVER@

CC        = gcc -pipe

INCLUDES  = ${XINCLUDES} -I/usr/include -I${TCL_INCPATH} -I${TK_INCPATH}

CFLAGS    = -O -fPIC -I/usr/X11R6/include ${INCLUDES}

SHLIB_LD     = gcc -pipe -shared

LIBSN     = -lc -L/usr/X11R6/lib -lX11 -ldl  -lieee -lm -L/usr/lib -ltcl8.4${TCL_DBGX} -L/usr/lib -ltk8.4 -lImlib -ljpeg -ltiff -lungif -lpng -lz -lm -lXext -L/usr/X11R6/lib -lSM -lICE -lXext -lX11

.PHONY : all clean distroclean

all : libtray.so

tray.o: tray.c
	$(CC) -c $(CFLAGS) tray.c

libtray.so: tray.o
	${SHLIB_LD} tray.o $(LIBSN) -o libtray.so

clean : 
	rm tray.o libtray.so 2> /dev/null | true

#Distclean thanks to nauj27
distclean :
	rm tray.o libtray.so Makefile config.status config.h config.log 2>/dev/null | true
