This repository has been archived by the owner on Jun 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Imakefile
338 lines (254 loc) · 8.13 KB
/
Imakefile
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
/*
* be sure to check 'config.h' for a couple other configuration options
*/
/* Comment out if you don't need G3 fax files support */
#define HaveG3
/* if, for whatever reason, you're unable to get the JPEG library to compile
* on your machine, *COMMENT OUT* the following line
*/
#define HaveJpeg
/* #define ReCompileJpeg */
/* if, for whatever reason, you're unable to get the Jasper library to compile
* on your machine, *COMMENT OUT* the following line
*/
#define HaveJp2k
/* #define ReCompileJp2k */
/* if, for whatever reason, you're unable to get the WEBP library to compile
* on your machine, *COMMENT OUT* the following line
*/
#define HaveWEBP
/* if, for whatever reason, you're unable to get the TIFF library to compile
* on your machine, *COMMENT OUT* the following line
*/
#define HaveTiff
/* #define ReCompileTiff */
/* if, for whatever reason, you don't want PNG support for xv, e.g. if
* PNG doesn't compile on your machine, *COMMENT OUT* the following line
*/
#define HavePng
/* #define ReCompilePng */
/* if, for whatever reason, you're unable to get the PDS/VICAR support
* to compile (xvpds.c, and vdcomp.c), *COMMENT OUT* the following line
*/
#define HavePDS
/* Precompiled libraries
*/
PRECOMPILEDLIBS = -ljpeg -ljasper -ltiff -lpng -lz
/*
* if you are running on a SysV-based machine, such as HP, Silicon Graphics,
* etc, uncomment one of the following lines to get you *most* of the way
* there. SYSV means System V R3. One of these may be defined through your
* X11 config files anyway.
*/
/* UNIX = -DSVR4 */
/* UNIX = -DSYSV */
/* If your machine has the 'usleep()' function, uncomment the following
* line. If it doesn't, or you're not sure, don't uncomment the line
*/
/* TIMERS = -DUSLEEP */
/* if XV locks up whenever you click any button in the controls window,
* the Timer() function in xvmisc.c is going out-to-lunch. A simple
* workaround is to uncomment the following line:
*/
/* TIMERS = -DNOTIMER */
/* if you are running under DXWM, I pity you. XV doesn't work correctly
* under DXWM. You should probably be running MWM. However, if such is
* not a valid option for you, try uncommenting the following line. The
* behavior won't be 'right', but it will be less 'wrong'.
*/
/* DXWM = -DDXWM */
/* if your system doesn't have u_long, u_short ... typedefined
* uncomment the following line:
*/
/* BSDTYPES = -DBSDTYPES */
/* if your system *doesn't* have /usr/include/dirent.h, (ie, isn't POSIX
* compliant, then you may have to uncomment the following line to use the
* 'old-style' directory-handling structures
*/
/* NODIRENT = -DNODIRENT */
/* If your machine doesn't have the 'random()' function, and only
* has 'rand()', uncomment the following line:
*/
/* RAND= -DNO_RANDOM */
/* if your machine doesn't have 'vprintf()' or 'vsprintf()'
* see vprintf.c for more information, if needed.
*/
#if defined(VaxArchitecture) && !defined(UltrixArchitecture)
VPRINTF= -DNEED_VPRINTF -DINTSPRINTF -DLONGINT -DNOVOID
#else
# if defined(RtArchitecture) && !defined(AIXArchitecture)
VPRINTF= -DNEED_VPRINTF -DINTSPRINTF -DLONGINT -DNOSTDHDRS -U__STDC__
# else
# if defined(SequentArchitecture)
VPRINTF= -DNEED_VPRINTF -DLONGINT -DNOSTDHDRS
# endif
# endif
#endif
/* If you are using an HP running HPUX 7.0, the following should be active */
#if defined(HPArchitecture) && (OSMajorVersion == 7)
HPUX7 = -DSYSV +Ns4000 -DHPUX7
#endif
/* If you are using an SGI machine, the following should be active */
#ifdef SGIArchitecture
SGI = -Dsgi
#endif
/* install directory of xv_mgcsfx.sample. */
MGCSFXDIR = $(LIBDIR)
/* Directory of default configuration file. */
MGCSFX = -DMGCSFXDIR=\"$(MGCSFXDIR)\"
/* This marks the end of the configuration parameters */
#ifdef HaveWEBP
WEBP = -DDOWEBP
WEBPDIR = /usr/
LIBWEBP = $(WEBPDIR)/lib/libwebp.so
WEBPINCLUDE = -I$(WEBPDIR)/include
#endif
#ifdef HaveJpeg
JPEG = -DDOJPEG
JPEGDIR = jpeg
LIBJPEG = $(JPEGDIR)/libjpeg.a
JPEGINCLUDE = -I$(JPEGDIR)
#endif
#ifdef HaveJp2k
JP2K = -DDOJP2K
JP2KDIR = jasper
JP2KINCLUDE = -I$(JP2KDIR)
#endif
#ifdef HavePng
PNG = -DDOPNG
PNGDIR = png
PNGINCLUDE = -I$(PNGDIR)
#endif
#ifdef HaveTiff
TIFF = -DDOTIFF
TIFFDIR = tiff
LIBTIFF = $(TIFFDIR)/libtiff.a
TIFFINCLUDE = -I$(TIFFDIR)
#endif
#ifdef HavePDS
PDS = -DDOPDS
#endif
#if defined(SCOArchitecture)
SCO= -Dsco -DPOSIX -DNO_RANDOM
SYS_LIBRARIES= -lm -lc -lx
#elif defined(HPArchitecture)
SYS_LIBRARIES= -lm -lV3
#else
SYS_LIBRARIES= -lm
#endif
DEPLIBS = $(LIBJPEG) $(LIBJP2K) $(LIBTIFF) $(LIBPNG)
LOCAL_LIBRARIES = $(PRECOMPILEDLIBS) $(XLIB) $(XTOOLLIB) $(DEPLIBS)
DEFINES= $(SCO) $(UNIX) $(NODIRENT) $(VPRINTF) $(TIMERS) $(HPUX7) \
$(G3FLAGS) $(JPEG) $(JP2K) $(TIFF) $(PDS) $(DXWM) $(RAND) \
$(BACKING_STORE) $(BSDTYPES) $(SGI) $(MGCSFX)
INCLUDES = $(JPEGINCLUDE) $(TIFFINCLUDE) $(WEBPINCLUDE)
SRCS1 = xv.c xvevent.c xvroot.c xvmisc.c xvimage.c xvcolor.c xvsmooth.c \
xv24to8.c xvgif.c xvpm.c xvinfo.c xvctrl.c xvscrl.c xvalg.c xvg3.c \
xvgifwr.c xvdir.c xvbutt.c xvpbm.c xvxbm.c xvgam.c xvbmp.c xvdial.c \
xvgraf.c xvsunras.c xvjpeg.c xvjp2k.c xvps.c xvpopup.c xvdflt.c \
xvtiff.c xvtiffwr.c xvpds.c xvrle.c xviris.c xvgrab.c vprintf.c \
xvbrowse.c xvtext.c xvpcx.c xviff.c xvtarga.c xvxpm.c xvcut.c \
xvxwd.c xvfits.c xvpng.c xvzx.c xvwbmp.c xvpcd.c \
xvmag.c xvpic.c xvmaki.c xvpi.c xvpic2.c xvvd.c xvmgcsfx.c \
xvml.c xvhips.c xvwebp.c xvselect.c
OBJS1 = xv.o xvevent.o xvroot.o xvmisc.o xvimage.o xvcolor.o xvsmooth.o \
xv24to8.o xvgif.o xvpm.o xvinfo.o xvctrl.o xvscrl.o xvalg.o xvg3.o \
xvgifwr.o xvdir.o xvbutt.o xvpbm.o xvxbm.o xvgam.o xvbmp.o xvdial.o \
xvgraf.o xvsunras.o xvjpeg.o xvjp2k.o xvps.o xvpopup.o xvdflt.o \
xvtiff.o xvtiffwr.o xvpds.o xvrle.o xviris.o xvgrab.o vprintf.o \
xvbrowse.o xvtext.o xvpcx.o xviff.o xvtarga.o xvxpm.o xvcut.o \
xvxwd.o xvfits.o xvpng.o xvzx.o xvwbmp.o xvpcd.o \
xvmag.o xvpic.o xvmaki.o xvpi.o xvpic2.o xvvd.o xvmgcsfx.o \
xvml.o xvhips.o xvwebp.o xvselect.o
SRCS2= bggen.c
OBJS2= bggen.o
#ifdef HavePDS
SRCS3= vdcomp.c
OBJS3= vdcomp.o
#endif
SRCS4= xcmap.c
OBJS4= xcmap.o
SRCS5= xvpictoppm.c
OBJS5= xvpictoppm.o
PROGRAMS= xv bggen vdcomp xcmap xvpictoppm
all::
@echo ""
@echo " Did you remember to 'make depend' first?"
@echo ""
@echo " building xv ..."
@echo ""
#ifdef ReCompileJpeg
#ifdef HaveJpeg
$(LIBJPEG):
cd $(JPEGDIR); $(MAKE) libjpeg.a
clean::
@echo ""
@echo " cleaning in $(JPEGDIR) ..."
@echo ""
( cd $(JPEGDIR) ; $(MAKE) clean )
@echo ""
#endif
#endif
#ifdef ReCompileJp2k
#ifdef HaveJp2k
$(LIBJP2K):
cd $(JP2KDIR); $(MAKE) libjasper.a
clean::
@echo ""
@echo " cleaning in $(JP2KDIR) ..."
@echo ""
( cd $(JP2KDIR) ; $(MAKE) clean )
@echo ""
#endif
#endif
#ifdef ReCompileTiff
#ifdef HaveTiff
$(LIBTIFF):
cd $(TIFFDIR); $(MAKE) libtiff.a
clean::
@echo " cleaning in $(TIFFDIR) ..."
@echo ""
( cd $(TIFFDIR) ; $(MAKE) clean )
@echo ""
#endif
#endif
#ifdef ReCompilePng
#ifdef HavePng
$(LIBPNG):
cd $(PNGDIR); $(MAKE) libpng.a
clean::
@echo " cleaning in $(PNGDIR) ..."
@echo ""
( cd $(PNGDIR) ; $(MAKE) clean )
@echo ""
#endif
#endif
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4)
AllTarget($(PROGRAMS))
DependTarget()
#ifdef IHaveSubdirs
DependSubdirs($(SUBDIRS))
#endif
NormalProgramTarget(xv,$(OBJS1),$(DEPLIBS),$(LOCAL_LIBRARIES),)
NormalProgramTarget(bggen,$(OBJS2),$(DEPLIBS),$(LOCAL_LIBRARIES),)
NormalProgramTarget(xcmap,$(OBJS4),$(DEPLIBS),$(LOCAL_LIBRARIES),)
NormalProgramTarget(xvpictoppm,$(OBJS5),$(DEPLIBS),$(LOCAL_LIBRARIES),)
InstallProgram(xv,$(BINDIR))
InstallProgram(bggen,$(BINDIR))
InstallProgram(xcmap,$(BINDIR))
InstallProgram(xvpictoppm,$(BINDIR))
#ifdef HavePDS
NormalProgramTarget(vdcomp,$(OBJS3),$(DEPLIBS),$(LOCAL_LIBRARIES),)
InstallProgram(vdcomp,$(BINDIR))
#endif
InstallManPageLong(docs/xv,$(MANDIR),xv)
InstallManPageLong(docs/bggen,$(MANDIR),bggen)
InstallManPageLong(docs/xcmap,$(MANDIR),xcmap)
InstallManPageLong(docs/xvp2p,$(MANDIR),xvpictoppm)
InstallManPageLong(docs/vdcomp,$(MANDIR),vdcomp)
InstallNonExecFile(xv_mgcsfx.sample,$(MGCSFXDIR))
all::
strip xv bggen xcmap xvpictoppm vdcomp
tar:
tar cf xv.tar Makefile* Imakefile *.c *.h bits docs \
docs unsupt vms $(JPEGDIR) $(TIFFDIR) $(MISC)