aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras/Mesa_6.4.2/src/glut/glx/Makefile.sgi
blob: 9514c324d243ef7a77623cb73e03e116f7c99687 (plain)
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
#! smake
#
# Copyright (c) Mark J. Kilgard, 1995, 1998.
#
include $(ROOT)/usr/include/make/commondefs

# NOTE:  In my GLUT development tree, many of the C source files for
# GLUT are generated.  For this reason, "make full_clobber" will remove
# these generated C files, while "make clobber" will not.

TOP = ../..

TARGETS = libglut.a

LN = ln -s
MV = mv
RM = -rm -rf

HDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h

SRCS = \
	glut_bitmap.c \
	glut_bwidth.c \
	glut_cindex.c \
	glut_cmap.c \
	glut_cursor.c \
	glut_dials.c \
	glut_dstr.c \
	glut_event.c \
	glut_ext.c \
	glut_fbc.c \
	glut_fullscrn.c \
	glut_gamemode.c \
	glut_get.c \
	glut_glxext.c \
	glut_init.c \
	glut_input.c \
	glut_joy.c \
	glut_key.c \
	glut_keyctrl.c \
	glut_keyup.c \
	glut_menu.c \
	glut_menu2.c \
	glut_mesa.c \
	glut_modifier.c \
	glut_overlay.c \
	glut_shapes.c \
	glut_space.c \
	glut_stroke.c \
	glut_swap.c \
	glut_swidth.c \
	glut_tablet.c \
	glut_teapot.c \
	glut_util.c \
	glut_vidresize.c \
	glut_warp.c \
	glut_win.c \
	glut_winmisc.c \
	layerutil.c

SRCSSEMIGENS = \
	glut_8x13.c \
	glut_9x15.c \
	glut_hel10.c \
	glut_hel12.c \
	glut_hel18.c \
	glut_mroman.c \
	glut_roman.c \
	glut_tr10.c \
	glut_tr24.c

OBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o)
OTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c
OTHERSRCS = strokegen.y strokelex.l stroke.h
FONTS = Roman.stroke MonoRoman.stroke

# Uncomment the LCDEFS line below if you want to build a version of
# libglut.a that avoids using the SGI "fast atoms" optimization
# introduced in IRIX 6.3.  This optimization eliminates serveral X server
# round-trips.  If you are building libglut.a on an IRIX 6.3 or later
# machine and want a chance (no guarantees) that GLUT executables built
# against your libglut.a will work on IRIX 6.2 machines, uncomment out
# the LCDEFS line below.  Otherwise, you'll get a run-time message about
# "attempted access to unresolvable symbol in XXX: _XSGIFastInternAtom"
#LCDEFS = -DNO_FAST_ATOMS

LCOPTS = -I$(TOP)/include -fullwarn 
LWOFF = ,813,852,827,826
LDIRT = *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure dstr dstr.c *.gen

default: $(TARGETS)

sinclude ObjectType.mk

$(OBJS) : $(HDRS)

libglut.a : $(OBJS)
	$(RM) $@
	$(AR) crl $@ $(OBJS)

.ORDER : strokegen.h strokegen.c

strokegen.h strokegen.c : strokegen.y
	$(YACC) -d strokegen.y
	$(MV) y.tab.c strokegen.c
	$(MV) y.tab.h strokegen.h

# avoid warnings when compiling lex generated code
strokegen.o : strokegen.c
	$(CC) $(CFLAGS) -woff 726,825,635,818,819,820,824,831,835,822,821,1167,1498,1116,1136,1174,1196,803 -c -MDupdate Makedepend strokegen.c

strokelex.c : strokelex.l
	$(LEX) strokelex.l
	$(MV) lex.yy.c strokelex.c

# avoid warnings when compiling lex generated code
strokelex.o : strokelex.c
	$(CC) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c

strokegen : strokegen.o strokelex.o
	$(CC) -o $@ $(LDFLAGS) strokegen.o strokelex.o -ll

capturexfont : capturexfont.o
	$(CC) -o $@ $(LDFLAGS) capturexfont.o -lX11

# glut_roman.c and glut_mroman.c are now checked in, but here are rules to generate them
glut_roman.c.gen : Roman.stroke strokegen
	./strokegen -s glutStrokeRoman < Roman.stroke > $@
glut_mroman.c.gen : MonoRoman.stroke strokegen
	./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@

glutsrc.ps : $(SRCS)
	$(RM) hardcopy
	mkdir -p hardcopy
	for i in $(SRCS) ;\
	do \
	  grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \
	done
	cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort`
	$(RM) hardcopy

# The bitmap files can be generated using capturexfont, but because
# they require a connection to an X server and potentially different
# X servers have different fonts, these generated files are part
# of the GLUT distribution.

9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1
8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1
TR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1
TR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1
HEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
HEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
HEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1

semigens : capturexfont
	./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen
	./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen
	./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen
	./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen
	./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen
	./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen
	./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen

# unused test rule for test building 16-bit font
JIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0
glut_jis.c : 
	./capturexfont $(JIS) glutBitmapJis > $@

sources: $(SRCS)

symcheck: libglut.a
	-nm -Bo libglut.a | grep -v ' d ' | grep -v ' T glut' | grep -v ' D glut' | grep -v ' U ' | grep -v ' T __glut' | grep -v ' t ' | grep -v ' b ' | grep -v ' D __glut' | grep -v ' B __glut'

dstr.c: glut_dstr.c
	ln -s glut_dstr.c $@

dstr: dstr.c glut_util.o glut_glxext.o
	$(RM) $@
	$(CC) -g -o $@ $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm

./glut.h : glut.h
./glutint.h : glutint.h
./glutstroke.h : glutstroke.h
./strokegen.h : strokegen.h
./stroke.h : stroke.h
./layerutil.h : layerutil.h
strokelex.o: strokelex.c strokegen.h

include $(COMMONRULES)