radeon: add cflags to decide whether to link libdrm_radeon or not.
[mesa.git] / src / mesa / drivers / dri / r300 / Makefile
1 # src/mesa/drivers/dri/r300/Makefile
2
3 TOP = ../../../../..
4 include $(TOP)/configs/current
5
6 CFLAGS += $(RADEON_CFLAGS)
7
8 LIBNAME = r300_dri.so
9
10 MINIGLX_SOURCES = server/radeon_dri.c
11
12 ifeq ($(USING_EGL), 1)
13 EGL_SOURCES = server/radeon_egl.c
14 endif
15
16 COMMON_SOURCES = \
17 ../../common/driverfuncs.c \
18 ../common/mm.c \
19 ../common/utils.c \
20 ../common/texmem.c \
21 ../common/vblank.c \
22 ../common/xmlconfig.c \
23 ../common/dri_util.c
24
25 RADEON_COMMON_SOURCES = \
26 radeon_texture.c \
27 radeon_common_context.c \
28 radeon_common.c \
29 radeon_dma.c \
30 radeon_lock.c \
31 radeon_bo_legacy.c \
32 radeon_cs_legacy.c \
33 radeon_mipmap_tree.c \
34 radeon_span.c
35
36 DRIVER_SOURCES = \
37 radeon_screen.c \
38 r300_context.c \
39 r300_ioctl.c \
40 r300_cmdbuf.c \
41 r300_state.c \
42 r300_render.c \
43 r300_tex.c \
44 r300_texstate.c \
45 radeon_program.c \
46 radeon_program_alu.c \
47 radeon_program_pair.c \
48 radeon_nqssadce.c \
49 r300_vertprog.c \
50 r300_fragprog.c \
51 r300_fragprog_swizzle.c \
52 r300_fragprog_emit.c \
53 r500_fragprog.c \
54 r500_fragprog_emit.c \
55 r300_shader.c \
56 r300_emit.c \
57 r300_swtcl.c \
58 $(RADEON_COMMON_SOURCES) \
59 $(EGL_SOURCES)
60
61 C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
62
63 DRIVER_DEFINES = -DCOMPILE_R300 -DR200_MERGED=0 \
64 -DRADEON_COMMON=1 -DRADEON_COMMON_FOR_R300 \
65 # -DRADEON_BO_TRACK \
66 -Wall
67
68 SYMLINKS = \
69 server/radeon_dri.c \
70 server/radeon_dri.h \
71 server/radeon.h \
72 server/radeon_macros.h \
73 server/radeon_reg.h \
74 server/radeon_egl.c
75
76 COMMON_SYMLINKS = \
77 radeon_chipset.h \
78 radeon_screen.c \
79 radeon_screen.h \
80 radeon_span.h \
81 radeon_span.c \
82 radeon_bo_legacy.c \
83 radeon_cs_legacy.c \
84 radeon_bo_legacy.h \
85 radeon_cs_legacy.h \
86 radeon_bocs_wrapper.h \
87 radeon_lock.c \
88 radeon_lock.h \
89 radeon_common.c \
90 radeon_common.h \
91 radeon_common_context.c \
92 radeon_common_context.h \
93 radeon_cmdbuf.h \
94 radeon_dma.c \
95 radeon_dma.h \
96 radeon_mipmap_tree.c \
97 radeon_mipmap_tree.h \
98 radeon_texture.c \
99 radeon_texture.h
100
101 DRI_LIB_DEPS += $(RADEON_LDFLAGS)
102
103 ##### TARGETS #####
104
105 include ../Makefile.template
106
107 server:
108 mkdir -p server
109
110 $(SYMLINKS): server
111 @[ -e $@ ] || ln -sf ../../radeon/$@ server/
112
113 $(COMMON_SYMLINKS):
114 @[ -e $@ ] || ln -sf ../radeon/$@ ./
115
116 symlinks: $(SYMLINKS) $(COMMON_SYMLINKS)