/*********************************************************************************/
/* This file is  part of Xcolorsel, a multipurpose viewer for X11 rgb.txt files. */
/*                     Copyright (C) 1993, 1994 Michael Weller                   */
/*                                                                               */
/* This program is free software; you can redistribute it and/or modify it under */
/* the terms of the GNU General Public License as published be the Free Software */
/* Foundation;  either version 2 of the License,  or (at your opinion) any later */
/* version.                                                                      */
/*                                                                               */
/* This program is  distributed in the hope  that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the  implied warranty of  MERCHANBILITY or FITNESS */
/* FOR  A  PARTICULAR  PURPOSE.   See the  GNU General  Public License  for more */
/* details.                                                                      */
/*                                                                               */
/* You should have received a copy  of the GNU General Public License along with */
/* this program; if not,  write to the  Free Software Foundation, Inc., 675 Mass */
/* Ave, Cambridge, MA 02139, USA.                                                */
/*                                                                               */
/* The author can be  reached by means of email  as eowmob@exp-math.uni-essen.de */
/* or  eowmob@pollux.exp-math.uni-essen.de   or   mat42b@vm.hrz.uni-essen.de  or */
/* mat42b@de0hrz1a.bitnet.  Or as:  Michael Weller,  Heiderhoefen 116b,  D 46049 */
/* Oberhausen, Germany.                                                          */
/*                                                                               */
/* Part of the files are derived  from the Template Widget of the Athena Widgets */
/* as published  by the  Massachusetts Institute of  Technology.  Actually these */
/* files do not contain any code  by the M.I.T  but only  variable declarations. */
/* Nevertheless these parts of these files are still distributed under the terms */
/* of the M.I.T copyright which are here repeated:                               */
/*                                                                               */
/* Copyright    Massachusetts Institute of Technology   1987, 1988               */
/*                                                                               */
/* Permission to use, copy,  modify, distribute,  and sell this software and its */
/* documentation for  any purpose is hereby  granted without fee,  provided that */
/* the  above  copyright  notice  appear  in  all  copies  and  that  both  that */
/* copyright   notice   and   this  permission   notice  appear  in   supporting */
/* documentation,  and that the  name of M.I.T.  not  be used  in advertising or */
/* publicity  pertaining  to distribution  of  the  software  without  specific, */
/* written  prior  permission.    M.I.T.  makes  no  representations  about  the */
/* suitability  of  this  software  for  any  purpose.   It is provided  "as is" */
/* without express or implied warranty.                                          */
/*                                                                               */
/* M.I.T. DISCLAIMS ALL  WARRANTIES WITH REGARD  TO THIS SOFTWARE, INCLUDING ALL */
/* IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS,  IN NO EVENT SHALL M.I.T. */
/* BE LIABLE FOR ANY SPECIAL,  INDIRECT OR CONSEQUENTIAL  DAMAGES OR ANY DAMAGES */
/* WHATSOEVER RESULTING FROM LOSS OF USE,  DATA OR PROFITS, WHETHER IN AN ACTION */
/* OF CONTRACT,  NEGLIGENCE  OR  OTHER  TORTIOUS  ACTION,  ARISING OUT OF  OR IN */
/* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.                      */
/*********************************************************************************/

/* Please add any preprocessor defines in config.h */

#ifdef HPArchitecture
CCOPTIONS = -Aa -D_HPUX_SOURCE
#endif

XPALDIR = $(LIBDIR)/xcolorsel
HELPFILE = $(XPALDIR)/Xcolorsel.help

EXTRA_DEFINES = -DHELPFILE=\"$(HELPFILE)\"

SRCS = RgbText.c RgbSink.c RgbSrc.c xcolorsel.c
OBJS = RgbText.o RgbSink.o RgbSrc.o xcolorsel.o

AllTarget(xcolorsel)

/* Dependencies needed in under any circumstances: */
xcolorsel.o: appdef-c.h appdef.h
depend:: appdef-c.h appdef.h

/* Other Rules: */
all:: Xcolorsel.help
install:: Xcolorsel.help

NormalProgramTarget(xcolorsel,$(OBJS),,XawClientLibs,)

InstallProgram(xcolorsel,$(BINDIR))
InstallManPage(xcolorsel,$(MANDIR))
InstallAppDefaults(Xcolorsel)
InstallAppDefaultsLong(Xcolorsel-color,Xcolorsel-color)
InstallNonExecFile(Xcolorsel.help,$(XPALDIR))

DependTarget()

appdef-c.h: Xcolorsel-color.ad
	app2head Xcolorsel-color.ad > appdef-c.h
appdef.h: Xcolorsel.ad
	app2head Xcolorsel.ad > appdef.h
purge:
	$(RM) xcolorsel *.o appdef.h appdef-c.h Xcolorsel.help *.tar.Z Makefile Makefile.bak makefile *.tar *.tar.gz
Xcolorsel.help: xcolorsel.man
	nroff -man xcolorsel.man | col -b > Xcolorsel.help
package: purge xcolorsel Xcolorsel.help
	strip xcolorsel
	$(RM) *.o *.tar.Z *.tar *.tgz
	tar -cvf ../xcolorsel-1.1a.tar -C .. xcolorsel
	$(RM) xcolorsel
	tar -cvf ../xcolorsel-1.1a-src.tar -C .. xcolorsel
	$(MV) ../xcolorsel-1.1a.tar ../xcolorsel-1.1a-src.tar .
	compress <xcolorsel-1.1a.tar >xcolorsel-1.1a.tar.Z
	gzip <xcolorsel-1.1a.tar >xcolorsel-1.1a.tar.gz
	$(RM) xcolorsel-1.1a.tar
	compress <xcolorsel-1.1a-src.tar >xcolorsel-1.1a-src.tar.Z
	gzip <xcolorsel-1.1a-src.tar >xcolorsel-1.1a-src.tar.gz
	$(RM) xcolorsel-1.1a-src.tar
