aboutsummaryrefslogtreecommitdiff
path: root/vendor/x11iraf/xpm/Imakefile
blob: 9a62403d18aefdf760fa192fcb9f66c44f34543f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Copyright 1990-93 GROUPE BULL -- See licence conditions in file COPYRIGHT
#
# XPM Imakefile - Arnaud LE HORS
#

# SGI requires a specification file for shared library that we don't have
#ifdef SGIArchitecture
#define DoSharedLib No
#else
############## X11IRAF - we don't want shared libraries.
# #define DoSharedLib SharedLibX
#define DoSharedLib NO
#endif

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

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

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

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


# Normally the following part should not need to be edited
#

############## X11IRAF - always build normal library.
# #define DoNormalLib NormalLibX
#define DoNormalLib YES

#if (ProjectX < 5)
    STD_DEFINES = LibraryDefines
    CDEBUGFLAGS = LibraryCDebugFlags
#else
/* R5 needs another .tmpl file to find these #def's.  This .tmpl file will */
/* also set STD_DEFINES and CDEBUGFLAGS properly.                          */
X11IRAFDIR = ../
#include <../X11IRAF.tmpl>
#endif

#if defined(RsArchitecture)
X11IRAFDIR = ../
#include <../X11IRAF.tmpl>
#endif

       INCLUDES = -I.
#if !defined (SGIArchitecture)
   INSTALLFLAGS = $(INSTINCFLAGS)
#endif
       LINTLIBS = $(LINTXTOLL) $(LINTXLIB) 

#ifdef OsNameDefines
    OS_NAME_DEFINES = OsNameDefines
#endif

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

HEADERS = xpm.h xpmP.h
  SRCS = data.c create.c misc.c rgb.c scan.c parse.c hashtable.c \
	 XpmCrBufFrI.c XpmCrDataFrP.c XpmCrPFrBuf.c XpmRdFToI.c XpmWrFFrI.c \
	 XpmCrBufFrP.c XpmCrIFrBuf.c XpmCrPFrData.c XpmRdFToP.c XpmWrFFrP.c \
	 XpmCrDataFrI.c XpmCrIFrData.c XpmRdFToData.c XpmWrFFrData.c strdup.c

  OBJS = data.o create.o misc.o rgb.o scan.o parse.o hashtable.o \
	 XpmCrBufFrI.o XpmCrDataFrP.o XpmCrPFrBuf.o XpmRdFToI.o XpmWrFFrI.o \
	 XpmCrBufFrP.o XpmCrIFrBuf.o XpmCrPFrData.o XpmRdFToP.o XpmWrFFrP.o \
	 XpmCrDataFrI.o XpmCrIFrData.o XpmRdFToData.o XpmWrFFrData.o strdup.o

#if (ProjectX < 5)

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

#else

all:: libXpm.a

    LibraryObjectRule()

#if DoSharedLib
#if DoNormalLib
            SharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS),shared,..)
#else
            SharedLibraryTarget(Xpm,$(SOXPMLIBREV),$(OBJS),.,.)
#endif
        InstallSharedLibrary(Xpm,$(SOXPMLIBREV),X11irafLibDir)
#endif
#if DoNormalLib
        NormalLibraryTarget(Xpm,$(OBJS))
#if InstallLibraries
install:: libXpm.a
	@(set -x; $(RM) X11irafLibDir/libXpm.a)
	@(set -x; $(CP) -p libXpm.a X11irafLibDir/libXpm.a)
#endif
#endif

#endif 

LinkFileList(linklibs,libXpm.a,X11irafLibDir,XpmDir)

includes::
	MakeDir(X11irafIncDir)
	MakeDir(X11irafIncDir/X11)
	@(set -x; for i in $(HEADERS); do \
		$(RM) X11irafIncDir/$$i; \
		$(CP) -p $$i X11irafIncDir/$$i; \
		$(RM) X11irafIncDir/X11/$$i; \
		$(CP) -p $$i X11irafIncDir/X11/$$i; \
	done)

#if InstallIncludes
install::
	@(set -x; for i in $(HEADERS); do \
	    $(RM) X11irafIncDir/$$i; \
            $(CP) -p $$i X11irafIncDir; \
	done)
#endif

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