3 # Copyright (c) Mark J. Kilgard, 1995, 1998.
5 include $(ROOT)/usr/include/make/commondefs
7 # NOTE: In my GLUT development tree, many of the C source files for
8 # GLUT are generated. For this reason, "make full_clobber" will remove
9 # these generated C files, while "make clobber" will not.
19 HDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h
72 OBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o)
73 OTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c
74 OTHERSRCS = strokegen.y strokelex.l stroke.h
75 FONTS = Roman.stroke MonoRoman.stroke
77 # Uncomment the LCDEFS line below if you want to build a version of
78 # libglut.a that avoids using the SGI "fast atoms" optimization
79 # introduced in IRIX 6.3. This optimization eliminates serveral X server
80 # round-trips. If you are building libglut.a on an IRIX 6.3 or later
81 # machine and want a chance (no guarantees) that GLUT executables built
82 # against your libglut.a will work on IRIX 6.2 machines, uncomment out
83 # the LCDEFS line below. Otherwise, you'll get a run-time message about
84 # "attempted access to unresolvable symbol in XXX: _XSGIFastInternAtom"
85 #LCDEFS = -DNO_FAST_ATOMS
87 LCOPTS = -I$(TOP)/include -fullwarn
88 LWOFF = ,813,852,827,826
89 LDIRT = *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure dstr dstr.c *.gen
93 sinclude ObjectType.mk
101 .ORDER : strokegen.h strokegen.c
103 strokegen.h strokegen.c : strokegen.y
104 $(YACC) -d strokegen.y
105 $(MV) y.tab.c strokegen.c
106 $(MV) y.tab.h strokegen.h
108 # avoid warnings when compiling lex generated code
109 strokegen.o : strokegen.c
110 $(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
112 strokelex.c : strokelex.l
114 $(MV) lex.yy.c strokelex.c
116 # avoid warnings when compiling lex generated code
117 strokelex.o : strokelex.c
118 $(CC) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c
120 strokegen : strokegen.o strokelex.o
121 $(CC) -o $@ $(LDFLAGS) strokegen.o strokelex.o -ll
123 capturexfont : capturexfont.o
124 $(CC) -o $@ $(LDFLAGS) capturexfont.o -lX11
126 # glut_roman.c and glut_mroman.c are now checked in, but here are rules to generate them
127 glut_roman.c.gen : Roman.stroke strokegen
128 ./strokegen -s glutStrokeRoman < Roman.stroke > $@
129 glut_mroman.c.gen : MonoRoman.stroke strokegen
130 ./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@
137 grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \
139 cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort`
142 # The bitmap files can be generated using capturexfont, but because
143 # they require a connection to an X server and potentially different
144 # X servers have different fonts, these generated files are part
145 # of the GLUT distribution.
147 9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1
148 8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1
149 TR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1
150 TR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1
151 HEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
152 HEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
153 HEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
155 semigens : capturexfont
156 ./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen
157 ./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen
158 ./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen
159 ./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen
160 ./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen
161 ./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen
162 ./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen
164 # unused test rule for test building 16-bit font
165 JIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0
167 ./capturexfont $(JIS) glutBitmapJis > $@
172 -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'
177 dstr: dstr.c glut_util.o glut_glxext.o
179 $(CC) -g -o $@ $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm
182 ./glutint.h : glutint.h
183 ./glutstroke.h : glutstroke.h
184 ./strokegen.h : strokegen.h
185 ./stroke.h : stroke.h
186 ./layerutil.h : layerutil.h
187 strokelex.o: strokelex.c strokegen.h
189 include $(COMMONRULES)