lots of Makefile updates for new build system
[mesa.git] / src / mesa / drivers / dri / tdfx / Makefile
1 # src/mesa/drivers/dri/tdfx/Makefile
2
3 TOP = ../../../../..
4 include $(TOP)/configs/current
5
6 LIBNAME = tdfx_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/tdfx_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 tdfx_context.c \
31 tdfx_dd.c \
32 tdfx_lock.c \
33 tdfx_pixels.c \
34 tdfx_render.c \
35 tdfx_screen.c \
36 tdfx_span.c \
37 tdfx_state.c \
38 tdfx_tex.c \
39 tdfx_texman.c \
40 tdfx_texstate.c \
41 tdfx_tris.c \
42 tdfx_vb.c
43
44 C_SOURCES = \
45 $(COMMON_SOURCES) \
46 $(MINIGLX_SOURCES) \
47 $(DRIVER_SOURCES)
48
49 # Include directories
50 INCLUDE_DIRS = \
51 -I. \
52 -I../common \
53 -Iserver \
54 -I$(TOP)/src/glx/mini \
55 -I$(TOP)/include \
56 -I$(TOP)/src/mesa/drivers/dri/drm/shared \
57 -I$(TOP)/src/mesa \
58 -I$(TOP)/src/mesa/main \
59 -I$(TOP)/src/mesa/glapi \
60 -I$(TOP)/src/mesa/math \
61 -I$(TOP)/src/mesa/transform \
62 -I$(TOP)/src/mesa/shader \
63 -I$(TOP)/src/mesa/swrast \
64 -I$(TOP)/src/mesa/swrast_setup
65
66 # Core Mesa objects
67 MESA_MODULES = $(TOP)/src/mesa/mesa.a
68
69 # Libraries that the driver shared lib depends on
70 LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lexpat -ldl -lc
71
72
73 ifeq ($(WINDOW_SYSTEM),dri)
74 WINOBJ=$(MESABUILDDIR)/dri/dri.a
75 WINLIB=
76 else
77 WINOBJ=
78 WINLIB=-L$(MESA)/src/glx/mini
79 endif
80
81 ASM_SOURCES =
82
83 OBJECTS = $(C_SOURCES:.c=.o) \
84 $(ASM_SOURCES:.S=.o)
85
86
87 ##### RULES #####
88
89 .c.o:
90 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
91
92 .S.o:
93 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
94
95
96 ##### TARGETS #####
97
98 default: depend $(LIB_DIR)/$(LIBNAME)
99
100
101 $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
102 $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
103 $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
104
105
106 depend: $(C_SOURCES) $(ASM_SOURCES)
107 touch depend
108 $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
109 >& /dev/null
110
111
112 # Emacs tags
113 tags:
114 etags `find . -name \*.[ch]` `find ../include`
115
116
117 clean:
118 -rm -f *.o server/*.o
119
120
121 include depend