XCOMM
XCOMM Copyright (C) 1989-94 GROUPE BULL
XCOMM
XCOMM Permission is hereby granted, free of charge, to any person obtaining a
XCOMM copy of this software and associated documentation files
XCOMM (the "Software"), to deal in the Software without restriction, including
XCOMM without limitation the rights to use, copy, modify, merge, publish,
XCOMM distribute, sublicense, and/or sell copies of the Software, and to permit
XCOMM persons to whom the Software is furnished to do so, subject to the
XCOMM following conditions:
XCOMM The above copyright notice and this permission notice shall be included
XCOMM in all copies or substantial portions of the Software.
XCOMM
XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
XCOMM OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
XCOMM IN NO EVENT SHALL GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
XCOMM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
XCOMM FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
XCOMM DEALINGS IN THE SOFTWARE.
XCOMM
XCOMM Except as contained in this notice, the name of GROUPE BULL shall not be
XCOMM used in advertising or otherwise to promote the sale, use or other
XCOMM dealings in this Software without prior written authorization from
XCOMM GROUPE BULL.
XCOMM

XCOMM
XCOMM XPM Imakefile - Arnaud LE HORS
XCOMM

XCOMM default locations
#ifndef XpmLibDir
#define XpmLibDir $(USRLIBDIR)
#endif
#ifndef XpmIncDir
#define XpmIncDir $(INCDIR)
#endif

XCOMM SGI requires a specification file for shared library that we don't have
#ifndef SharedLibXpm
#define SharedLibXpm (HasSharedLibraries && \
	!(defined(SGIArchitecture) && !SystemV4))
#endif

#ifndef NormalLibXpm
#define NormalLibXpm YES
#endif

#ifdef RsArchitecture
REQUIREDLIBS = -lXext -lXt -lX11
#endif

XCOMM on Dec Alpha we need to define the following to build the shared library
#ifdef AlphaArchitecture
SO_REQLIBS=-lX11 -lc
#endif

XCOMM if your system doesn't provide strcasecmp add -DNEED_STRCASECMP
XCOMM if your system doesn't provide strdup add -DNEED_STRDUP
XCOMM if your system doesn't provide pipe remove -DZPIPE

#if defined(UltrixArchitecture) || \
    (defined(MipsArchitecture) && !defined(SGIArchitecture))
DEFINES = -DZPIPE -DNEED_STRDUP
#else
DEFINES = -DZPIPE
#endif


XCOMM
XCOMM Normaly the following part should not need to be edited
XCOMM

XPMLIBDIR = XpmLibDir
XPMINCDIR = XpmIncDir

XCOMM get the version numbers from the xpm include file
#define XPM_NUMBERS
#include "xpm.h"
SOXPMLIBREV = XpmVersion./**/XpmRevision

HEADERS = xpm.h
  SRCS = data.c create.c misc.c rgb.c scan.c parse.c hashtab.c \
	 CrBufFrI.c CrDatFrP.c CrPFrBuf.c RdFToI.c WrFFrI.c \
	 CrBufFrP.c CrIFrBuf.c CrPFrDat.c RdFToP.c WrFFrP.c \
	 CrDatFrI.c CrIFrDat.c RdFToDat.c WrFFrDat.c \
	 Attrib.c CrIFrP.c CrPFrI.c Image.c Info.c RdFToBuf.c WrFFrBuf.c

  OBJS = data.o create.o misc.o rgb.o scan.o parse.o hashtab.o \
	 CrBufFrI.o CrDatFrP.o CrPFrBuf.o RdFToI.o WrFFrI.o \
	 CrBufFrP.o CrIFrBuf.o CrPFrDat.o RdFToP.o WrFFrP.o \
	 CrDatFrI.o CrIFrDat.o RdFToDat.o WrFFrDat.o \
	 Attrib.o CrIFrP.o CrPFrI.o Image.o Info.o RdFToBuf.o WrFFrBuf.o

       INCLUDES = -I.
   INSTALLFLAGS = $(INSTINCFLAGS)
       LINTLIBS = $(LINTXTOLL) $(LINTXLIB) 

#ifdef OsNameDefines
OS_NAME_DEFINES = OsNameDefines
#endif

#define DoSharedLib SharedLibXpm
#define DoNormalLib NormalLibXpm

#if (ProjectX < 5)
    STD_DEFINES = LibraryDefines
    CDEBUGFLAGS = LibraryCDebugFlags
#else
#define LibName Xpm
#define SoRev SOXPMLIBREV
#include <Library.tmpl>
#endif

#if (ProjectX < 6)

#if (ProjectX < 5)

#if DoSharedLib
SharedLibraryObjectRule()
NormalSharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS))
InstallSharedLibrary(Xpm,$(SOXPMLIBREV),$(XPMLIBDIR))
#else
NormalLibraryObjectRule()
#endif
NormalLibraryTarget(Xpm,$(OBJS))
InstallLibrary(Xpm,$(XPMLIBDIR))

#else /* (ProjectX < 5) */

LibraryObjectRule()

#if DoSharedLib
SharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS),shared,..)
InstallSharedLibrary(Xpm,$(SOXPMLIBREV),$(XPMLIBDIR))
#endif
#if DoNormalLib
NormalLibraryTarget(Xpm,$(OBJS))
InstallLibrary(Xpm,$(XPMLIBDIR))
#endif

#endif /* (ProjectX < 5) */

InstallMultiple($(HEADERS),$(XPMINCDIR))
BuildIncludes($(HEADERS),.,.)

#endif /* (ProjectX < 6) */

LintLibraryTarget(Xpm,$(SRCS))
InstallLintLibrary(Xpm,$(LINTLIBDIR))
DependTarget()
NormalLintTarget($(SRCS))
