#
# $Header: /cvsroot/xcb/Makefile.std,v 1.1 2002/10/10 10:07:02 root Exp $

CPP	=	/lib/cpp
INCS	=
HDRS	=	cb.h patchlevel.h
SRCS	=	xcb.c
OBJS	=	xcb.o
MISC	=	README Changes xcb.man Xcb.ad.base Imakefile Makefile.std
DISTN	=	$(MISC) $(SRCS) $(HDRS)

# Add your favourite compiler flags here, and select either the
# Athena or Motif GUI interface.
#
CFLAGS	=	$(INCS) -O $(GUI) # -DXVIEW
LDFLAGS =	
GUI	=	-DATHENA
#GUI	=	-DMOTIF

# These are the libraries required for linking.  Select one.
#
LIBS	=	-lXaw -lXt -lXext -lX11		# Athena libraries
#LIBS	=	-lXm -lXt -lX11			# Motif libraries

all:	xcb

xcb:	$(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

Xcb.ad:	Xcb.ad.base
	$(CPP) -P Xcb.ad.base $(GUI) > $@          # -P removes line directives.

# You will need to check and possibly adjust the target
# directories for these install rules.
#
install: xcb Xcb.ad
	install -c xcb /usr/bin/X11
	install -c -m 0644 -o bin -g bin Xcb.ad /usr/lib/X11/app-defaults/Xcb

install.man:
	install -c -m 0644 -o bin -g bin xcb.man /usr/share/man/mrd/man1/xcb.1

clean clobber:
	rm -f *.o xcb

tags ctags:	$(HDRS) $(SRCS)
	ctags -tw $(HDRS) $(SRCS)

shar:
	shar -c -f part -p -x X $(DISTN)

tar:
	mkdir xcb-2.4
	cp $(DISTN) xcb-2.4
	tar -cf xcb-2.4.tar xcb-2.4
	gzip -9 xcb-2.4.tar
	rm -rf xcb-2.4
