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
|
#
# Ivy, C interface
#
# Copyright (C) 1997-2002
# Centre d'Études de la Navigation Aérienne
#
# Makefile
#
# Authors: François-Régis Colin <fcolin@cena.fr>
# Stéphane Chatty <chatty@cena.fr>
#
# $Id$
#
# Please refer to file version.h for the
# copyright notice regarding this software
#
MAJOR=3
MINOR=6
RM=del
#RM=rm -f
XTINC =
XTLIB =
GTKINC = `gtk-config --cflags`
GTKLIB = `gtk-config --libs`
GLUTINC = -I/usr/include -I.
GLUTLIB = -L.
TCLINCL = -I/usr/include/tcl8.4
TCLLIB = -ltcl84
CC=gcc
CFLAGS = -g
# IVY full debug
#CFLAGS = -g -DDEBUG
OBJ = ivyloop.o timer.o ivysocket.o ivy.o
GOBJ = ivyloop.o timer.o ivysocket.o givy.o
XTOBJ = ivyxtloop.o ivysocket.o ivy.o
GTKOBJ = ivygtkloop.o ivysocket.o ivy.o
GLUTOBJ = ivyglutloop.o ivysocket.o ivy.o
TCLOBJ = ivytcl.o ivyloop.o timer.o ivysocket.o givy.o
TARGETS = ivyprobe
# not yiet ivygtkprobe ivyxtprobe need Modified Glut ivyglutprobe
.c.o:
$(CC) $(CFLAGS) -c $*.c
all: static-libs commands shared-libs
static-libs: libivy.a libgivy.a libtclivy.a
# not yiet libxtivy.a libgtkivy.a need Modified Glut libglutivy.a
shared-libs: libivy.so.$(MAJOR).$(MINOR) libgivy.so.$(MAJOR).$(MINOR) libtclivy.so.$(MAJOR).$(MINOR)
# not yiet libxtivy.so.$(MAJOR).$(MINOR) libgtkivy.so.$(MAJOR).$(MINOR) need Modified Glut libglutivy.so.$(MAJOR).$(MINOR)
commands: $(TARGETS)
ivytcl.o: ivytcl.c
$(CC) -DGNU_REGEXP -c $(CFLAGS) $(TCLINCL) -o ivytcl.o ivytcl.c
givy.o: ivy.c
$(CC) -DGNU_REGEXP -c $(CFLAGS) -o givy.o ivy.c
ivyglutloop.o: ivyglutloop.c ivyglutloop.h
$(CC) -c $(CFLAGS) $(GLUTINC) -o ivyglutloop.o ivyglutloop.c
ivygtkloop.o: ivygtkloop.c ivygtkloop.h
$(CC) -c $(CFLAGS) $(GTKINC) -o ivygtkloop.o ivygtkloop.c
ivyprobe: ivyprobe.o libivy.a
$(CC) $(CFLAGS) -o ivyprobe ivyprobe.o -L. -livy -lwsock32 -lregex
ivyxtprobe.o : ivyprobe.c
$(CC) $(CFLAGS) -c ivyprobe.c -o ivyxtprobe.o $(XTINC) -DXTMAINLOOP
ivyxtprobe: ivyxtprobe.o libxtivy.a
$(CC) -o ivyxtprobe ivyxtprobe.o -L. $(XTLIB) -lxtivy -lXt -lX11 -lSM -lICE
ivygtkprobe.o : ivyprobe.c
$(CC) $(CFLAGS) -c ivyprobe.c -o ivygtkprobe.o $(XTINC) -DGTKMAINLOOP
ivygtkprobe: ivygtkprobe.o libgtkivy.a
$(CC) -o ivygtkprobe ivygtkprobe.o -L. $(GTKLIB) -lgtkivy -lgtk -lgdk -lglib -lX11 -lSM -lICE -lm
ivyglutprobe.o : ivyprobe.c
$(CC) $(CFLAGS) -c ivyprobe.c -o ivyglutprobe.o $(GLUTINC) -DGLUTMAINLOOP
ivyglutprobe: ivyglutprobe.o libglutivy.a
$(CC) -o ivyglutprobe ivyglutprobe.o -L. $(GLUTLIB) -lglutivy -lglut -lGLU -lGL -lX11 -lXmu
libivy.a: $(OBJ)
$(RM) $@
ar q $@ $(OBJ)
libgivy.a: $(GOBJ)
$(RM) $@
ar q $@ $(GOBJ)
libxtivy.a: $(XTOBJ)
$(RM) $@
ar cq $@ $(XTOBJ)
libgtkivy.a: $(GTKOBJ)
$(RM) $@
ar cq $@ $(GTKOBJ)
libglutivy.a: $(GLUTOBJ)
$(RM) $@
ar cq $@ $(GLUTOBJ)
libtclivy.a: $(TCLOBJ)
$(RM) $@
ar cq $@ $(TCLOBJ)
libivy.so.$(MAJOR).$(MINOR): $(OBJ)
$(CC) -shared -Wl,-soname,libivy.so.$(MAJOR) -o $@ $(OBJ) -lwsock32 -lregex
libgivy.so.$(MAJOR).$(MINOR): $(GOBJ)
$(CC) -shared -Wl,-soname,libgivy.so.$(MAJOR) -o $@ $(GOBJ) -lwsock32 -lregex
libxtivy.so.$(MAJOR).$(MINOR): $(XTOBJ)
$(CC) -shared -Wl,-soname,libxtivy.so.$(MAJOR) -o $@ \
$(XTOBJ) $(XTLIB) -lXt -lX11
libgtkivy.so.$(MAJOR).$(MINOR): $(GTKOBJ)
$(CC) -shared -Wl,-soname,libgtkivy.so.$(MAJOR) -o $@ \
$(GTKOBJ) $(GTKLIB) -lX11
libglutivy.so.$(MAJOR).$(MINOR): $(GTKOBJ)
$(CC) -shared -Wl,-soname,libglutivy.so.$(MAJOR) -o $@ \
$(GLUTOBJ) $(GLUTLIB) -lX11
libtclivy.so.$(MAJOR).$(MINOR): $(TCLOBJ)
$(CC) -shared -Wl,-soname,libtclivy.so.$(MAJOR) -o $@ \
$(TCLOBJ) $(TCLLIB) -lwsock32 -lregex
clean:
-$(RM) $(TARGETS) *.o *.a *.so *.so.* *~
installlibs: static-libs shared-libs
test -d $(PREFIX)/usr/lib || mkdirhier $(PREFIX)/usr/lib
test -d $(PREFIX)/usr/X11R6/lib || mkdirhier $(PREFIX)/usr/X11R6/lib
test -d $(PREFIX)/usr/include || mkdirhier $(PREFIX)/usr/include
install -m644 libivy.a $(PREFIX)/usr/lib
install -m644 libgivy.a $(PREFIX)/usr/lib
install -m644 libxtivy.a $(PREFIX)/usr/X11R6/lib
install -m644 libtclivy.a $(PREFIX)/usr/lib
install -m644 libgtkivy.a $(PREFIX)/usr/X11R6/lib
install -m644 libivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib
install -m644 libgivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib
install -m644 libxtivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib
install -m644 libtclivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib
install -m644 libgtkivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib
install -m644 *.h $(PREFIX)/usr/include
installliblinks: installlibs
ln -s /usr/lib/libtclivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib/libtclivy.so
ln -s /usr/lib/libivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib/libivy.so
ln -s /usr/lib/libivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib/libivy.so.$(MAJOR)
ln -s /usr/lib/libgivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib/libgivy.so
ln -s /usr/lib/libgivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/lib/libgivy.so.$(MAJOR)
ln -s /usr/X11R6/lib/libxtivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib/libxtivy.so
ln -s /usr/X11R6/lib/libxtivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib/libxtivy.so.$(MAJOR)
ln -s /usr/X11R6/lib/libgtkivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib/libgtkivy.so
ln -s /usr/X11R6/lib/libgtkivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib/libgtkivy.so.$(MAJOR)
ln -s /usr/X11R6/lib/libtclivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib/libtclivy.so
ln -s /usr/X11R6/lib/libtclivy.so.$(MAJOR).$(MINOR) $(PREFIX)/usr/X11R6/lib/libtclivy.so.$(MAJOR)
installbins: commands
test -d $(PREFIX)/usr/bin || mkdirhier $(PREFIX)/usr/bin
test -d $(PREFIX)/usr/X11R6/bin || mkdirhier $(PREFIX)/usr/X11R6/bin
install -m755 ivyprobe $(PREFIX)/usr/bin
install -m755 ivyxtprobe $(PREFIX)/usr/X11R6/bin
install -m755 ivygtkprobe $(PREFIX)/usr/X11R6/bin
# install -m755 ivyglutprobe $(PREFIX)/usr/X11R6/bin
installdocs:
test -d $(PREFIX)/usr/doc/ivy-c || mkdirhier $(PREFIX)/usr/doc/ivy-c
for f in `find ../doc/*.html -type f -maxdepth 1`; do \
install -m 644 $$f $(PREFIX)/usr/doc/ivy-c; \
done
test -d $(PREFIX)/usr/man/man1 || mkdirhier $(PREFIX)/usr/man/man1
for f in `find ../doc/*.1 -type f -maxdepth 1`; do \
install -m 644 $$f $(PREFIX)/usr/man/man1; \
done
install: installlibs installbins installliblinks installdocs
rpm::
/usr/bin/rpmize
|