Makefile.sgi revision c041511d
1c041511dScube#! smake 2c041511dScube# 3c041511dScube# Copyright (c) Mark J. Kilgard, 1995, 1998. 4c041511dScube# 5c041511dScubeinclude $(ROOT)/usr/include/make/commondefs 6c041511dScube 7c041511dScube# NOTE: In my GLUT development tree, many of the C source files for 8c041511dScube# GLUT are generated. For this reason, "make full_clobber" will remove 9c041511dScube# these generated C files, while "make clobber" will not. 10c041511dScube 11c041511dScubeTOP = ../.. 12c041511dScube 13c041511dScubeTARGETS = libglut.a 14c041511dScube 15c041511dScubeLN = ln -s 16c041511dScubeMV = mv 17c041511dScubeRM = -rm -rf 18c041511dScube 19c041511dScubeHDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h 20c041511dScube 21c041511dScubeSRCS = \ 22c041511dScube glut_bitmap.c \ 23c041511dScube glut_bwidth.c \ 24c041511dScube glut_cindex.c \ 25c041511dScube glut_cmap.c \ 26c041511dScube glut_cursor.c \ 27c041511dScube glut_dials.c \ 28c041511dScube glut_dstr.c \ 29c041511dScube glut_event.c \ 30c041511dScube glut_ext.c \ 31c041511dScube glut_fbc.c \ 32c041511dScube glut_fullscrn.c \ 33c041511dScube glut_gamemode.c \ 34c041511dScube glut_get.c \ 35c041511dScube glut_glxext.c \ 36c041511dScube glut_init.c \ 37c041511dScube glut_input.c \ 38c041511dScube glut_joy.c \ 39c041511dScube glut_key.c \ 40c041511dScube glut_keyctrl.c \ 41c041511dScube glut_keyup.c \ 42c041511dScube glut_menu.c \ 43c041511dScube glut_menu2.c \ 44c041511dScube glut_mesa.c \ 45c041511dScube glut_modifier.c \ 46c041511dScube glut_overlay.c \ 47c041511dScube glut_shapes.c \ 48c041511dScube glut_space.c \ 49c041511dScube glut_stroke.c \ 50c041511dScube glut_swap.c \ 51c041511dScube glut_swidth.c \ 52c041511dScube glut_tablet.c \ 53c041511dScube glut_teapot.c \ 54c041511dScube glut_util.c \ 55c041511dScube glut_vidresize.c \ 56c041511dScube glut_warp.c \ 57c041511dScube glut_win.c \ 58c041511dScube glut_winmisc.c \ 59c041511dScube layerutil.c 60c041511dScube 61c041511dScubeSRCSSEMIGENS = \ 62c041511dScube glut_8x13.c \ 63c041511dScube glut_9x15.c \ 64c041511dScube glut_hel10.c \ 65c041511dScube glut_hel12.c \ 66c041511dScube glut_hel18.c \ 67c041511dScube glut_mroman.c \ 68c041511dScube glut_roman.c \ 69c041511dScube glut_tr10.c \ 70c041511dScube glut_tr24.c 71c041511dScube 72c041511dScubeOBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o) 73c041511dScubeOTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c 74c041511dScubeOTHERSRCS = strokegen.y strokelex.l stroke.h 75c041511dScubeFONTS = Roman.stroke MonoRoman.stroke 76c041511dScube 77c041511dScube# Uncomment the LCDEFS line below if you want to build a version of 78c041511dScube# libglut.a that avoids using the SGI "fast atoms" optimization 79c041511dScube# introduced in IRIX 6.3. This optimization eliminates serveral X server 80c041511dScube# round-trips. If you are building libglut.a on an IRIX 6.3 or later 81c041511dScube# machine and want a chance (no guarantees) that GLUT executables built 82c041511dScube# against your libglut.a will work on IRIX 6.2 machines, uncomment out 83c041511dScube# the LCDEFS line below. Otherwise, you'll get a run-time message about 84c041511dScube# "attempted access to unresolvable symbol in XXX: _XSGIFastInternAtom" 85c041511dScube#LCDEFS = -DNO_FAST_ATOMS 86c041511dScube 87c041511dScubeLCOPTS = -I$(TOP)/include -fullwarn 88c041511dScubeLWOFF = ,813,852,827,826 89c041511dScubeLDIRT = *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure dstr dstr.c *.gen 90c041511dScube 91c041511dScubedefault: $(TARGETS) 92c041511dScube 93c041511dScubesinclude ObjectType.mk 94c041511dScube 95c041511dScube$(OBJS) : $(HDRS) 96c041511dScube 97c041511dScubelibglut.a : $(OBJS) 98c041511dScube $(RM) $@ 99c041511dScube $(AR) crl $@ $(OBJS) 100c041511dScube 101c041511dScube.ORDER : strokegen.h strokegen.c 102c041511dScube 103c041511dScubestrokegen.h strokegen.c : strokegen.y 104c041511dScube $(YACC) -d strokegen.y 105c041511dScube $(MV) y.tab.c strokegen.c 106c041511dScube $(MV) y.tab.h strokegen.h 107c041511dScube 108c041511dScube# avoid warnings when compiling lex generated code 109c041511dScubestrokegen.o : strokegen.c 110c041511dScube $(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 111c041511dScube 112c041511dScubestrokelex.c : strokelex.l 113c041511dScube $(LEX) strokelex.l 114c041511dScube $(MV) lex.yy.c strokelex.c 115c041511dScube 116c041511dScube# avoid warnings when compiling lex generated code 117c041511dScubestrokelex.o : strokelex.c 118c041511dScube $(CC) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c 119c041511dScube 120c041511dScubestrokegen : strokegen.o strokelex.o 121c041511dScube $(CC) -o $@ $(LDFLAGS) strokegen.o strokelex.o -ll 122c041511dScube 123c041511dScubecapturexfont : capturexfont.o 124c041511dScube $(CC) -o $@ $(LDFLAGS) capturexfont.o -lX11 125c041511dScube 126c041511dScube# glut_roman.c and glut_mroman.c are now checked in, but here are rules to generate them 127c041511dScubeglut_roman.c.gen : Roman.stroke strokegen 128c041511dScube ./strokegen -s glutStrokeRoman < Roman.stroke > $@ 129c041511dScubeglut_mroman.c.gen : MonoRoman.stroke strokegen 130c041511dScube ./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@ 131c041511dScube 132c041511dScubeglutsrc.ps : $(SRCS) 133c041511dScube $(RM) hardcopy 134c041511dScube mkdir -p hardcopy 135c041511dScube for i in $(SRCS) ;\ 136c041511dScube do \ 137c041511dScube grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \ 138c041511dScube done 139c041511dScube cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort` 140c041511dScube $(RM) hardcopy 141c041511dScube 142c041511dScube# The bitmap files can be generated using capturexfont, but because 143c041511dScube# they require a connection to an X server and potentially different 144c041511dScube# X servers have different fonts, these generated files are part 145c041511dScube# of the GLUT distribution. 146c041511dScube 147c041511dScube9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1 148c041511dScube8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1 149c041511dScubeTR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 150c041511dScubeTR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1 151c041511dScubeHEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1 152c041511dScubeHEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 153c041511dScubeHEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 154c041511dScube 155c041511dScubesemigens : capturexfont 156c041511dScube ./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen 157c041511dScube ./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen 158c041511dScube ./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen 159c041511dScube ./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen 160c041511dScube ./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen 161c041511dScube ./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen 162c041511dScube ./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen 163c041511dScube 164c041511dScube# unused test rule for test building 16-bit font 165c041511dScubeJIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0 166c041511dScubeglut_jis.c : 167c041511dScube ./capturexfont $(JIS) glutBitmapJis > $@ 168c041511dScube 169c041511dScubesources: $(SRCS) 170c041511dScube 171c041511dScubesymcheck: libglut.a 172c041511dScube -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' 173c041511dScube 174c041511dScubedstr.c: glut_dstr.c 175c041511dScube ln -s glut_dstr.c $@ 176c041511dScube 177c041511dScubedstr: dstr.c glut_util.o glut_glxext.o 178c041511dScube $(RM) $@ 179c041511dScube $(CC) -g -o $@ $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm 180c041511dScube 181c041511dScube./glut.h : glut.h 182c041511dScube./glutint.h : glutint.h 183c041511dScube./glutstroke.h : glutstroke.h 184c041511dScube./strokegen.h : strokegen.h 185c041511dScube./stroke.h : stroke.h 186c041511dScube./layerutil.h : layerutil.h 187c041511dScubestrokelex.o: strokelex.c strokegen.h 188c041511dScube 189c041511dScubeinclude $(COMMONRULES) 190