#
# $Id: Makefile,v 0.10 1994/07/30 02:16:19 zhao Exp $
#
# Makefile for the entire XFORMs tree. 
#
#  usage: make [demo|install|clean]
#      demo: demo
#   install: copy the library and head file to standard directories.
#     clean: remove all .o files
#     empty: clean + removal of all executibles and libraries
#

# all changes should be made in mkconfig.h 

SYSLIB=-lX11 -lm
SHELL=/bin/sh
include mkconfig.h

##### don't change anything after this line ####
AUTO=.mkconfig

demo: 
	@(cd DEMOS; make) 

install:
	cp FORMS/libforms.a $(LIB_DIR);chmod $(LIBMODE) $(LIB_DIR)/libforms.a
	cp FORMS/forms.h $(HEADER_DIR);chmod $(HEADERMODE) $(HEADER_DIR)/forms.h
	cp FORMS/xforms.5 $(MAN5_DIR);  chmod $(MANMODE) $(MAN5_DIR)/xforms.5
	@if [ ! -f $(MAN5_dir)/forms.5 ]; then\
          ln -s $(MAN5_DIR)/xforms.5 $(MAN5_DIR)/forms.5
	cp DESIGN/fdesign $(BIN_DIR); chmod $(BINMODE) $(BIN_DIR)/fdesign
	cp DESIGN/fdesign.1 $(MAN1_DIR); chmod $(MANMODE) $(MAN1_DIR)/fdesign.1
clean:
	(cd  DEMOS; make $@)
empty:
	(cd  DEMOS; make $@)
