# set to top of path for X libraries/includes
# (note that this is unnecessary on Athena because everything is under
#  /usr/athena; on other systems it might this or /usr/X11R5 or /usr/X11R6)
X11=/usr/X11

# set if other libraries (like -lsocket -lnsl for sun) are needed
MORE_LIBS=

# use -g to be able to to run under a debugger
CFLAGS=-g -Wall

CC=/afs/sipb/project/pthreads/stable/bin/pgcc

SRCS=events.c xinit.c xlock.c xfuncs.c xmain.c xinfo.c xmenu.c zfuncs.c \
	strdup.c
HDRS=xzul.h
INCLUDES=-I$(X11)/include -I/usr/athena/include
#LIBS=malloc/libmalloc_d.a 
#LIBS=/afs/sipb/user/ghudson/moraes/libmalloc_d.a
LIBS=-L$(X11)/lib -L/usr/athena/lib -lcom_err -lzephyr -lkrb -ldes -lX11 \
	$(MORE_LIBS)

OBJS=$(SRCS:.c=.o)

all: /mit/x11 test

test: $(OBJS)
	$(CC) -o test $(DEBUG) $(OBJS) $(LIBS)

/mit/x11:
	attach -h -q x11r5

.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) $(DEBUG) -c $<

sources: $(SRCS) $(HDRS)

clean:
	rm -f $(OBJS) test
