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