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
|
--- makeflag.gnux.orig
+++ makeflag.gnux
@@ -9,7 +9,7 @@
# be simple wrong.
#
-SRC_DIR = /home/gershon/irit/sun
+SRC_DIR = ${WRKSRC}
#
# All libraries created will be installed into the LIB_DIR directory.
@@ -34,7 +34,7 @@
IRITOBJPF =
IRITLIBPF =
IRITEXEPF =
- STRIPEXE = strip
+ STRIPEXE = ${ECHO_CMD} # ${INSTALL_PROGRAM} takes care of stripping
else
IRITOBJPF = D
@@ -54,27 +54,27 @@
#
# Make these empty if you would like to give up on irender's compilation.
#
-#URT = /b/d2/gershon/urt/onyx64
-#URT_INC = -I$(URT)/include
-#URT_LIB = -L$(URT)/lib -lrle
-#URT_FLAGS = -DHAVE_URT_RLE -DURT_OLD_COMPAT
+URT = ${LOCALBASE}
+URT_INC = -I$(URT)/include
+URT_LIB = -L$(URT)/lib -lrle
+URT_FLAGS = -DHAVE_URT_RLE -DURT_OLD_COMPAT
#
# Support for GIF image read/write using the giflib toolkit library.
# You can ftp it from
#
-#GIF = /b/d2/gershon/gif_lib
-#GIF_INC = -I$(GIF)/lib
-#GIF_LIB = $(GIF)/onyx64/lib/libgif.a
-#GIF_FLAGS = -DHAVE_GIF_LIB
+GIF = ${LOCALBASE}
+GIF_INC = -I$(GIF)/include
+GIF_LIB = $(GIF)/lib/libungif.a
+GIF_FLAGS = -DHAVE_GIF_LIB
#
# If you would like to use Mesa emulation of Open GL and compile Open GL
# code using it (see http://www.ssec.wisc.edu/~brianp/Mesa.html for info
# on Mesa), define the following:
#
-# MESA_INC = -I/mach/emc2-32/isl/gershon/c/mesa/MesaLib-2.4/include -D__MESA__ -D__OPENGL__
-# MESA_LIB = -L/mach/emc2-32/isl/gershon/c/mesa/MesaLib-2.4/lib -lGLU -lGL
+MESA_INC = -I${X11BASE}/include -D__MESA__ -D__OPENGL__
+MESA_LIB = -L${X11BASE}/lib -lGLU -lGL
#
# Support of (shared) libraries. You will need to set the proper suffix
@@ -340,25 +340,25 @@
# Note you cannot use SUN's native cc compiler since it does not support
# Ansi C. If you use mesa emulation of Open GL, uncomment xogldrvs
#
-CC = gcc
-DFLAGS = -DSUN4 -DTIMES -DRAND48 -DNANOSLEEP -D__UNIX__ -D__X11__ -I/usr/openwin/share/include -I/opt/SUNWmotif/share/include $(MESA_INC)
-ifeq ($(CFG), Rel)
- CFLAGS = -O2 $(DFLAGS)
-else
- CFLAGS = -g -DDEBUG $(DFLAGS)
-endif
-MORELIBS = -lsocket -lnsl -lposix4
-GRAPX11LIBS = -L/usr/openwin/lib -lX11
-GRAPXMTLIBS = -L/opt/SUNWmotif/lib -L/usr/ccs/lib -lXm -L/usr/openwin/lib -lXt -lX11 -lgen
+#CC = gcc
+#DFLAGS = -DSUN4 -DTIMES -DRAND48 -DNANOSLEEP -D__UNIX__ -D__X11__ -I/usr/openwin/share/include -I/opt/SUNWmotif/share/include $(MESA_INC)
+#ifeq ($(CFG), Rel)
+# CFLAGS = -O2 $(DFLAGS)
+#else
+# CFLAGS = -g -DDEBUG $(DFLAGS)
+#endif
+#MORELIBS = -lsocket -lnsl -lposix4
+#GRAPX11LIBS = -L/usr/openwin/lib -lX11
+#GRAPXMTLIBS = -L/opt/SUNWmotif/lib -L/usr/ccs/lib -lXm -L/usr/openwin/lib -lXt -lX11 -lgen
# GRAPOGLLIBS = $(MESA_LIB) -lXext $(GRAPXMTLIBS)
# GRAPOGLLIBS = -lGLU -lGL $(GRAPXMTLIBS)
-GRAPDRVS = nuldrvs$(IRITEXEPF) x11drvs$(IRITEXEPF) xmtdrvs$(IRITEXEPF) # xogldrvs$(IRITEXEPF)
+#GRAPDRVS = nuldrvs$(IRITEXEPF) x11drvs$(IRITEXEPF) xmtdrvs$(IRITEXEPF) # xogldrvs$(IRITEXEPF)
#
# For shared libraries add:
#
-LIB_SUFFIX = so
-LIB_MAKE = ld -G -o
-LIB_RAN = echo
+#LIB_SUFFIX = so
+#LIB_MAKE = ld -G -o
+#LIB_RAN = echo
#
# Flags for SUN Solaris 5.3 using cc SC3.0.1 and X11 (uncomment xogldrvs if
@@ -570,23 +570,33 @@
#
# Flags for i386 FreeBSD using X11R6
#
-# DFLAGS = -D__UNIX__ -DX11R6 -D__X11__ -DTIMES -DRAND48 -DUSLEEP
+DFLAGS = -D__UNIX__ -DX11R6 -D__X11__ -DTIMES -DRAND48 -DUSLEEP
+ifeq ($(WITH_MOTIF_DEF),yes)
+DFLAGS+= ${MESA_INC}
+else
+DFLAGS+= -D__X11__ -I${X11BASE}/include
+endif
+CFLAGS += -fPIC $(DFLAGS)
# ifeq ($(CFG), Rel)
# CFLAGS = -O2 -pipe -m486 -fomit-frame-pointer $(DFLAGS)
# else
# CFLAGS = -g -DDEBUG $(DFLAGS)
# endif
-# MORELIBS = -lc
-# GRAPX11LIBS = -L/usr/X11R6/lib -lX11
-# GRAPXMTLIBS = -L/usr/X11R6/lib -lXm -lXt -lX11
-# GRAPDRVS = nuldrvs$(IRITEXEPF) x11drvs$(IRITEXEPF) xmtdrvs$(IRITEXEPF)
+MORELIBS = -lc
+GRAPX11LIBS = -L${X11BASE}/lib -lX11
+GRAPDRVS = nuldrvs$(IRITEXEPF) x11drvs$(IRITEXEPF)
+ifeq ($(WITH_MOTIF_DEF),yes)
+GRAPXMTLIBS = -L${X11BASE}/lib -lXm -lXt -lX11
+GRAPOGLLIBS = ${MESA_LIB} ${GRAPXMTLIBS}
+GRAPDRVS+= xmtdrvs$(IRITEXEPF) xogldrvs$(IRITEXEPF)
+endif
#
#
# For shared libraries add:
#
-# LIB_SUFFIX = so
-# LIB_MAKE = cc -shared -o
-# LIB_RAN = ranlib
+LIB_SUFFIX = so
+LIB_MAKE = ${LD} -shared -o
+LIB_RAN = ${ECHO_CMD}
#
# Default rule for compilation.
@@ -612,4 +622,4 @@
-lIritCagd$(IRITLIBPF) \
-lIritGeom$(IRITLIBPF) \
-lIritMisc$(IRITLIBPF) \
- -lIritXtra$(IRITLIBPF) $(URT_LIB) $(GIF_LIB) # -l gif
+ -lIritXtra$(IRITLIBPF) $(URT_LIB) $(GIF_LIB) $(GRAPOGLLIBS) # -l gif
|