#
#	Athena X window system XMenu system makefile.
#
#		Written by:	Tony Della Fera, DEC
#

DESTDIR =
INCLUDES = -I../include

C2 = /lib/c2
CFLAGS = $(OPT) $(DEBUG) ${INCLUDES}
XLIB = ../Xlib/libX.a
XLIB_H = ../Xlib/Xlib.h

OBJS = 	XMenuInterna.o \
	XMenuCreate.o \
	XMenuAddPane.o \
	XMenuAddSel.o \
	XMenuInsPane.o \
	XMenuInsSel.o \
	XMenuFindPan.o \
	XMenuFindSel.o \
	XMenuChgPane.o \
	XMenuChgSel.o \
	XMenuSetPane.o \
	XMenuSetSel.o \
	XMenuRecomp.o \
	XMenuEvHand.o \
	XMenuLocate.o \
	XMenuSetFrz.o \
	XMenuSetAEQ.o \
	XMenuActivat.o \
	XMenuPost.o \
	XMenuDelPane.o \
	XMenuDelSel.o \
	XMenuDestroy.o \
	XMenuError.o

all: lib
sys: lib tests
lib: libXMenu.a

#
# Library construction
#

$(OBJS):

libXMenu.a: $(OBJS)
	ar cr libXMenu.a $(OBJS)

#
# Library tests
#

tests: libXMenu.a
	cd tests; make

#
# Maintenance
#

install: all
	../install -c -m 0644 libXMenu.a ${DESTDIR}/usr/lib

clobber: 
	rm -f *.o *.a core *.[ch].[0-9]* *.bak *~ #*
	rm -f profiled/*.o
	cd tests; make clobber

include: XMenu.h
	../install -c -m 0644 XMenu.h ${DESTDIR}/usr/include/X

#####     End of makefile     #####
