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