yank bgr233 texformat. minor comment updates.
[mesa.git] / src / mesa / drivers / dri / radeon / Makefile.solo
1
2 # Mesa 3-D graphics library
3 # Version: 5.0
4 # Copyright (C) 1995-2002 Brian Paul
5
6 TOP = ../../../../..
7
8 default: linux-solo
9
10 SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver -I../drm/shared
11 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
12
13 ifeq ($(EMBEDDED),true)
14 TARGET = radeon_es_dri.so
15 DEFINES += \
16 -D_EMBEDDED \
17 -D_HAVE_SWRAST=0 \
18 -D_HAVE_SWTNL=0 \
19 -D_HAVE_SANITY=0 \
20 -D_HAVE_CODEGEN=0 \
21 -D_HAVE_LIGHTING=0 \
22 -D_HAVE_TEXGEN=0 \
23 -D_HAVE_USERCLIP=0 \
24 -DGLX_DIRECT_RENDERING
25 else
26 TARGET = radeon_dri.so
27 DEFINES += \
28 -D_HAVE_SWRAST=1 \
29 -D_HAVE_SWTNL=1 \
30 -D_HAVE_SANITY=1 \
31 -D_HAVE_CODEGEN=1 \
32 -D_HAVE_LIGHTING=1 \
33 -D_HAVE_TEXGEN=1 \
34 -D_HAVE_USERCLIP=1 \
35 -DGLX_DIRECT_RENDERING
36 endif
37
38 MESA_MODULES = $(TOP)/src/mesa/mesa.a
39
40 MINIGLX_SOURCES = server/radeon_dri.c
41
42 DRIVER_SOURCES = radeon_context.c \
43 radeon_ioctl.c \
44 radeon_lock.c \
45 radeon_screen.c \
46 radeon_state.c \
47 radeon_state_init.c \
48 ../../common/driverfuncs.c \
49 ../common/mm.c \
50 ../common/utils.c \
51 ../common/texmem.c \
52 ../common/vblank.c \
53 ../common/xmlconfig.c
54
55 SUBSET_DRIVER_SOURCES = \
56 radeon_subset_bitmap.c \
57 radeon_subset_readpix.c \
58 radeon_subset_select.c \
59 radeon_subset_tex.c \
60 radeon_subset_vtx.c
61
62 FULL_DRIVER_SOURCES = \
63 radeon_tex.c \
64 radeon_texmem.c \
65 radeon_texstate.c \
66 radeon_tcl.c \
67 radeon_swtcl.c \
68 radeon_span.c \
69 radeon_maos.c \
70 radeon_sanity.c \
71 radeon_compat.c \
72 radeon_vtxfmt.c \
73 radeon_vtxfmt_c.c \
74 radeon_vtxfmt_sse.c \
75 radeon_vtxfmt_x86.c
76
77
78 INCLUDES = $(MINIGLX_INCLUDES) \
79 $(SHARED_INCLUDES)
80
81
82 ifeq ($(EMBEDDED),true)
83 C_SOURCES = $(DRIVER_SOURCES) \
84 $(SUBSET_DRIVER_SOURCES) \
85 $(MINIGLX_SOURCES)
86 else
87 C_SOURCES = $(DRIVER_SOURCES) \
88 $(FULL_DRIVER_SOURCES) \
89 $(MINIGLX_SOURCES)
90 endif
91
92
93 ifeq ($(WINDOW_SYSTEM),dri)
94 WINOBJ=$(MESABUILDDIR)/dri/dri.a
95 WINLIB=
96 else
97 WINOBJ=
98 WINLIB=-L$(MESA)/src/glx/mini
99 endif
100
101 ASM_SOURCES =
102 OBJECTS = $(C_SOURCES:.c=.o) \
103 $(ASM_SOURCES:.S=.o)
104
105 ### Include directories
106
107 INCLUDE_DIRS = \
108 -I$(TOP)/include \
109 -I$(TOP)/src/mesa \
110 -I$(TOP)/src/mesa/main \
111 -I$(TOP)/src/mesa/glapi \
112 -I$(TOP)/src/mesa/math \
113 -I$(TOP)/src/mesa/transform \
114 -I$(TOP)/src/mesa/swrast \
115 -I$(TOP)/src/mesa/swrast_setup
116
117
118 ##### RULES #####
119
120 .c.o:
121 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
122
123 .S.o:
124 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
125
126
127 ##### TARGETS #####
128
129 targets: depend $(TARGET)
130
131 $(TARGET): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.solo
132 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
133 rm -f $(TOP)/lib/$(TARGET) && \
134 install $(TARGET) $(TOP)/lib/$(TARGET)
135
136 $(TOP)/lib/$(TARGET): $(TARGET)
137 rm -f $(TOP)/lib/$(TARGET) && \
138 install $(TARGET) $(TOP)/lib/$(TARGET)
139
140 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
141 # what's included by any source file.
142 depend: $(C_SOURCES) $(ASM_SOURCES)
143 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES)\
144 $(C_SOURCES) $(ASM_SOURCES)
145
146
147 # Emacs tags
148 tags:
149 etags `find . -name \*.[ch]` `find ../include`
150
151
152 # Remove .o and backup files
153 clean:
154 -rm -f *.o *~ *.o *~ *.so server/*.o
155
156
157 include $(TOP)/Make-config
158
159 include depend