summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/beos/Makefile
blob: 3b1038b0d475d85abb11e5cbff6911a0c06730ce (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
190
191
192
193
194
195
# src/mesa/drivers/beos/Makefile

TOP = ../../../..
include $(TOP)/configs/current

include $(TOP)/src/mesa/sources

MESA_MODULES = $(TOP)/src/mesa/mesa.a
# To switch back to old Mesa GLU implementation (but why do
# you want this!), uncomment this next line:

# GLU_DIR	= $(TOP)/src/glu/mesa
ifeq ($(GLU_DIR),)
	# By default, we build the SGI GLU implementation
	GLU_DIR = $(TOP)/src/glu/sgi
endif

ifeq ($(GLU_DIR), $(TOP)/src/glu/mesa)
	GLU_MODULES = \
		$(GLU_DIR)/glu.o \
		$(GLU_DIR)/mipmap.o \
		$(GLU_DIR)/nurbs.o \
		$(GLU_DIR)/nurbscrv.o \
		$(GLU_DIR)/nurbssrf.o \
		$(GLU_DIR)/nurbsutl.o \
		$(GLU_DIR)/polytest.o \
		$(GLU_DIR)/project.o \
		$(GLU_DIR)/quadric.o \
		$(GLU_DIR)/tess.o \
		$(GLU_DIR)/tesselat.o
else
	GLU_MODULES = \
		$(GLU_DIR)/libutil/error.o \
		$(GLU_DIR)/libutil/glue.o \
		$(GLU_DIR)/libutil/mipmap.o	\
		$(GLU_DIR)/libutil/project.o \
		$(GLU_DIR)/libutil/quad.o \
		$(GLU_DIR)/libutil/registry.o \
		$(GLU_DIR)/libtess/dict.o \
		$(GLU_DIR)/libtess/geom.o \
		$(GLU_DIR)/libtess/memalloc.o \
		$(GLU_DIR)/libtess/mesh.o \
		$(GLU_DIR)/libtess/normal.o	\
		$(GLU_DIR)/libtess/priorityq.o \
		$(GLU_DIR)/libtess/render.o	\
		$(GLU_DIR)/libtess/sweep.o \
		$(GLU_DIR)/libtess/tess.o \
		$(GLU_DIR)/libtess/tessmono.o \
		$(GLU_DIR)/libnurbs/interface/bezierEval.o		\
		$(GLU_DIR)/libnurbs/interface/bezierPatch.o		\
		$(GLU_DIR)/libnurbs/interface/bezierPatchMesh.o		\
		$(GLU_DIR)/libnurbs/interface/glcurveval.o		\
		$(GLU_DIR)/libnurbs/interface/glinterface.o		\
		$(GLU_DIR)/libnurbs/interface/glrenderer.o		\
		$(GLU_DIR)/libnurbs/interface/glsurfeval.o		\
		$(GLU_DIR)/libnurbs/interface/incurveeval.o		\
		$(GLU_DIR)/libnurbs/interface/insurfeval.o		\
		$(GLU_DIR)/libnurbs/internals/arc.o			\
		$(GLU_DIR)/libnurbs/internals/arcsorter.o			\
		$(GLU_DIR)/libnurbs/internals/arctess.o			\
		$(GLU_DIR)/libnurbs/internals/backend.o			\
		$(GLU_DIR)/libnurbs/internals/basiccrveval.o		\
		$(GLU_DIR)/libnurbs/internals/basicsurfeval.o		\
		$(GLU_DIR)/libnurbs/internals/bin.o			\
		$(GLU_DIR)/libnurbs/internals/bufpool.o			\
		$(GLU_DIR)/libnurbs/internals/cachingeval.o		\
		$(GLU_DIR)/libnurbs/internals/ccw.o			\
		$(GLU_DIR)/libnurbs/internals/coveandtiler.o		\
		$(GLU_DIR)/libnurbs/internals/curve.o			\
		$(GLU_DIR)/libnurbs/internals/curvelist.o			\
		$(GLU_DIR)/libnurbs/internals/curvesub.o			\
		$(GLU_DIR)/libnurbs/internals/dataTransform.o		\
		$(GLU_DIR)/libnurbs/internals/displaylist.o		\
		$(GLU_DIR)/libnurbs/internals/flist.o			\
		$(GLU_DIR)/libnurbs/internals/flistsorter.o		\
		$(GLU_DIR)/libnurbs/internals/hull.o			\
		$(GLU_DIR)/libnurbs/internals/intersect.o			\
		$(GLU_DIR)/libnurbs/internals/knotvector.o		\
		$(GLU_DIR)/libnurbs/internals/mapdesc.o			\
		$(GLU_DIR)/libnurbs/internals/mapdescv.o			\
		$(GLU_DIR)/libnurbs/internals/maplist.o			\
		$(GLU_DIR)/libnurbs/internals/mesher.o			\
		$(GLU_DIR)/libnurbs/internals/monoTriangulationBackend.o	\
		$(GLU_DIR)/libnurbs/internals/monotonizer.o		\
		$(GLU_DIR)/libnurbs/internals/mycode.o			\
		$(GLU_DIR)/libnurbs/internals/nurbsinterfac.o		\
		$(GLU_DIR)/libnurbs/internals/nurbstess.o			\
		$(GLU_DIR)/libnurbs/internals/patch.o			\
		$(GLU_DIR)/libnurbs/internals/patchlist.o			\
		$(GLU_DIR)/libnurbs/internals/quilt.o			\
		$(GLU_DIR)/libnurbs/internals/reader.o			\
		$(GLU_DIR)/libnurbs/internals/renderhints.o		\
		$(GLU_DIR)/libnurbs/internals/slicer.o			\
		$(GLU_DIR)/libnurbs/internals/sorter.o			\
		$(GLU_DIR)/libnurbs/internals/splitarcs.o			\
		$(GLU_DIR)/libnurbs/internals/subdivider.o		\
		$(GLU_DIR)/libnurbs/internals/tobezier.o			\
		$(GLU_DIR)/libnurbs/internals/trimline.o			\
		$(GLU_DIR)/libnurbs/internals/trimregion.o		\
		$(GLU_DIR)/libnurbs/internals/trimvertpool.o		\
		$(GLU_DIR)/libnurbs/internals/uarray.o			\
		$(GLU_DIR)/libnurbs/internals/varray.o			\
		$(GLU_DIR)/libnurbs/nurbtess/directedLine.o		\
		$(GLU_DIR)/libnurbs/nurbtess/gridWrap.o			\
		$(GLU_DIR)/libnurbs/nurbtess/monoChain.o			\
		$(GLU_DIR)/libnurbs/nurbtess/monoPolyPart.o		\
		$(GLU_DIR)/libnurbs/nurbtess/monoTriangulation.o		\
		$(GLU_DIR)/libnurbs/nurbtess/partitionX.o			\
		$(GLU_DIR)/libnurbs/nurbtess/partitionY.o			\
		$(GLU_DIR)/libnurbs/nurbtess/polyDBG.o			\
		$(GLU_DIR)/libnurbs/nurbtess/polyUtil.o			\
		$(GLU_DIR)/libnurbs/nurbtess/primitiveStream.o		\
		$(GLU_DIR)/libnurbs/nurbtess/quicksort.o			\
		$(GLU_DIR)/libnurbs/nurbtess/rectBlock.o			\
		$(GLU_DIR)/libnurbs/nurbtess/sampleComp.o			\
		$(GLU_DIR)/libnurbs/nurbtess/sampleCompBot.o		\
		$(GLU_DIR)/libnurbs/nurbtess/sampleCompRight.o		\
		$(GLU_DIR)/libnurbs/nurbtess/sampleCompTop.o		\
		$(GLU_DIR)/libnurbs/nurbtess/sampleMonoPoly.o		\
		$(GLU_DIR)/libnurbs/nurbtess/sampledLine.o		\
		$(GLU_DIR)/libnurbs/nurbtess/searchTree.o
endif

INCLUDES = \
	-I../common \
	-I$(TOP)/src/mesa \
	-I$(TOP)/src/mesa/array_cache \
	-I$(TOP)/src/mesa/main \
	-I$(TOP)/src/mesa/glapi \
	-I$(TOP)/src/mesa/math \
	-I$(TOP)/src/mesa/shader \
	-I$(TOP)/src/mesa/swrast \
	-I$(TOP)/src/mesa/swrast_setup \
	-I$(TOP)/src/mesa/tnl \
	-I$(TOP)/src/mesa/tnl_dd \
	-I$(TOP)/src/mesa/x86 \
	-I. \
	-I- \
	-I$(TOP)/include

DRIVER_SOURCES = \
	GLView.cpp \
	../common/driverfuncs.c \
	$(addprefix ../../, $(GLAPI_SOURCES))

ifeq ($(CPU), x86)
	DRIVER_SOURCES += $(addprefix ../../, $(X86_API))
else
	# No GL API PPC optimization yet
endif 
	
DRIVER_OBJECTS = $(DRIVER_SOURCES:.c=.o)
DRIVER_OBJECTS := $(DRIVER_OBJECTS:.S=.o)

OBJECTS := $(DRIVER_OBJECTS:.cpp=.o)


# Rules

.c.o:
	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@

.cpp.o:
	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@

.S.o:
	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@


default: depend $(LIB_DIR) $(LIB_DIR)/$(GL_LIB_NAME)

$(MESA_MODULES):
	cd $(TOP)/src/mesa; $(MAKE) mesa.a ;
	
$(GLU_MODULES):
	cd $(GLU_DIR); $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ; 
	
$(LIB_DIR):
	mkdir $(LIB_DIR)

$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
	@$(TOP)/bin/mklib -o $(GL_LIB) -install $(LIB_DIR) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
		$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)

# $(GLU_OBJECTS):
#	cd $(GLU_DIR); $(MAKE) $< ;

depend: $(DRIVER_SOURCES) $(GLU_SOURCES)
	touch depend
	$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null 2>&1

clean:
	rm -f depend $(OBJECTS)
		
include depend