lots of Makefile updates for new build system
[mesa.git] / src / mesa / drivers / dri / ffb / Makefile
1 # src/mesa/drivers/dri/ffb/Makefile
2
3 TOP = ../../../../..
4 include $(TOP)/configs/current
5
6 LIBNAME = ffb_dri.so
7
8 DEFINES += \
9 -D_HAVE_SWRAST=1 \
10 -D_HAVE_SWTNL=1 \
11 -D_HAVE_SANITY=1 \
12 -D_HAVE_CODEGEN=1 \
13 -D_HAVE_LIGHTING=1 \
14 -D_HAVE_TEXGEN=1 \
15 -D_HAVE_USERCLIP=1 \
16 -DGLX_DIRECT_RENDERING
17
18 # not yet
19 # MINIGLX_SOURCES = server/ffb_dri.c
20
21 COMMON_SOURCES = \
22 ../../common/driverfuncs.c \
23 ../common/mm.c \
24 ../common/utils.c \
25 ../common/texmem.c \
26 ../common/vblank.c \
27 ../common/xmlconfig.c \
28
29 DRIVER_SOURCES = \
30 ffb_bitmap.c \
31 ffb_clear.c \
32 ffb_dd.c \
33 ffb_depth.c \
34 ffb_fog.c \
35 ffb_lines.c \
36 ffb_points.c \
37 ffb_span.c \
38 ffb_state.c \
39 ffb_stencil.c \
40 ffb_tex.c \
41 ffb_tris.c \
42 ffb_vb.c \
43 ffb_vtxfmt.c \
44 ffb_xmesa.c
45
46 C_SOURCES = \
47 $(COMMON_SOURCES) \
48 $(MINIGLX_SOURCES) \
49 $(DRIVER_SOURCES)
50
51 # Include directories
52 INCLUDE_DIRS = \
53 -I. \
54 -I../common \
55 -Iserver \
56 -I$(TOP)/src/glx/mini \
57 -I$(TOP)/include \
58 -I$(TOP)/src/mesa/drivers/dri/drm/shared \
59 -I$(TOP)/src/mesa \
60 -I$(TOP)/src/mesa/main \
61 -I$(TOP)/src/mesa/glapi \
62 -I$(TOP)/src/mesa/math \
63 -I$(TOP)/src/mesa/transform \
64 -I$(TOP)/src/mesa/shader \
65 -I$(TOP)/src/mesa/swrast \
66 -I$(TOP)/src/mesa/swrast_setup
67
68 # Core Mesa objects
69 MESA_MODULES = $(TOP)/src/mesa/mesa.a
70
71 # Libraries that the driver shared lib depends on
72 LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
73
74
75 ifeq ($(WINDOW_SYSTEM),dri)
76 WINOBJ=$(MESABUILDDIR)/dri/dri.a
77 WINLIB=
78 else
79 WINOBJ=
80 WINLIB=-L$(MESA)/src/glx/mini
81 endif
82
83 ASM_SOURCES =
84
85 OBJECTS = $(C_SOURCES:.c=.o) \
86 $(ASM_SOURCES:.S=.o)
87
88
89 ##### RULES #####
90
91 .c.o:
92 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
93
94 .S.o:
95 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
96
97
98 ##### TARGETS #####
99
100 default: depend $(LIB_DIR)/$(LIBNAME)
101
102
103 $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
104 $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
105 $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
106
107
108 $(SYMLINKS):
109 mkdir -p server
110 cd server
111 rm -f $@ && ln -s ../../radeon/$@ $@
112
113
114 depend: $(C_SOURCES) $(ASM_SOURCES)
115 touch depend
116 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
117 >& /dev/null
118
119
120 # Emacs tags
121 tags:
122 etags `find . -name \*.[ch]` `find ../include`
123
124
125 clean:
126 -rm -f *.o server/*.o
127
128
129 include depend