1SubDir HAIKU_TOP src libs glut ;
2
3UseLibraryHeaders glut ;
4
5local sourcesCc =
6	# C sources
7	glut_8x13.c
8	glut_9x15.c
9	glut_bitmap.c
10	glut_bwidth.c
11	glut_hel10.c
12	glut_hel12.c
13	glut_hel18.c
14	glut_tr10.c
15	glut_tr24.c
16	glut_mroman.c
17	glut_roman.c
18	glut_stroke.c
19	glut_swidth.c
20	glut_shapes.c
21	glut_teapot.c
22	glut_vidresize.c
23	glut_util.c
24	glut_ext.c
25;
26
27
28local sourcesCpp =
29	glutBlocker.cpp
30	glutInit.cpp
31	glutWindow.cpp
32	glutEvent.cpp
33	glutCallback.cpp
34	glutOverlay.cpp
35	glutGet.cpp
36	glutColor.cpp
37	glutCursor.cpp
38	glutMenu.cpp
39	glutDstr.cpp
40	glutGameMode.cpp
41	beos_x11.cpp
42;
43
44
45local architectureObject ;
46for architectureObject in [ MultiArchSubDirSetup ] {
47	on $(architectureObject) {
48		local architecture = $(TARGET_PACKAGING_ARCH) ;
49
50		UseBuildFeatureHeaders glu ;
51		UseBuildFeatureHeaders mesa ;
52
53		# For GCC2
54		if $(architecture) = x86_gcc2 {
55			SubDirC++Flags --no-warnings ;
56		}
57
58		# Ensure Mesa dependency is met
59		Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] :
60			[ BuildFeatureAttribute glu : headers ]
61			[ BuildFeatureAttribute mesa : headers ]
62			;
63
64		SharedLibrary [ MultiArchDefaultGristFiles libglut.so ] :
65			$(sourcesCpp)
66			$(sourcesCc)
67			:
68			game be [ TargetLibstdc++ ]
69			[ BuildFeatureAttribute mesa : library ]
70			[ BuildFeatureAttribute glu : library ]
71			;
72	}
73}
74