all: theme.so

CC=cc -g -Wall -fPIC -O2 -DUSE_STUBS
INCLUDE=-I/usr/X11R6/include -I/usr/local/include -I/usr/local/include/tcl8.3 -I/usr/local/include/tk8.3

theme.so: *.c
	$(CC) theme.c themeCursor.c themeLabel.c $(INCLUDE) -c
	ld theme.o themeCursor.o themeLabel.o -Bshareable -L/usr/local/lib -L/usr/X11R6/lib -ltcl83 -ltk83 -lX11 -lXext -lXpm -lXmu -lXt -lm -o theme.so

test: *.c
	$(CC) main.c theme.c themeCursor.c themeLabel.c $(INCLUDE) -L/usr/local/lib -L/usr/X11R6/lib -ltcl83 -ltk83 -lX11 -lXext -lXpm -lXmu -lXt -lm -o test

clean:
	rm -f *.core *.o *.so test

