build fixes
[mesa.git] / src / mesa / drivers / dri / i810 / Makefile
1 # src/mesa/drivers/dri/i810/Makefile
2
3 TOP = ../../../../..
4 include $(TOP)/configs/default
5
6
7 SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver
8 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
9
10 DEFINES += \
11 -D_HAVE_SWRAST=1 \
12 -D_HAVE_SWTNL=1 \
13 -D_HAVE_SANITY=1 \
14 -D_HAVE_CODEGEN=1 \
15 -D_HAVE_LIGHTING=1 \
16 -D_HAVE_TEXGEN=1 \
17 -D_HAVE_USERCLIP=1 \
18 -DGLX_DIRECT_RENDERING
19
20 # Not yet
21 # MINIGLX_SOURCES = server/i810_dri.c
22
23 DRIVER_SOURCES = \
24 i810context.c \
25 i810ioctl.c \
26 i810render.c \
27 i810screen.c \
28 i810span.c \
29 i810state.c \
30 i810tex.c \
31 i810texmem.c \
32 i810texstate.c \
33 i810tris.c \
34 i810vb.c \
35 ../../common/driverfuncs.c \
36 ../common/mm.c \
37 ../common/utils.c \
38 ../common/texmem.c \
39 ../common/vblank.c
40
41 INCLUDES = $(MINIGLX_INCLUDES) \
42 $(SHARED_INCLUDES)
43
44
45 C_SOURCES = $(DRIVER_SOURCES) \
46 $(MINIGLX_SOURCES)
47
48 MESA_MODULES = $(TOP)/src/mesa/mesa.a
49
50
51 ifeq ($(WINDOW_SYSTEM),dri)
52 WINOBJ=$(MESABUILDDIR)/dri/dri.a
53 WINLIB=
54 else
55 WINOBJ=
56 WINLIB=-L$(MESA)/src/glx/mini
57 endif
58
59 ASM_SOURCES =
60 OBJECTS = $(C_SOURCES:.c=.o) \
61 $(ASM_SOURCES:.S=.o)
62
63 ### Include directories
64
65 INCLUDE_DIRS = \
66 -I$(TOP)/include \
67 -I$(TOP)/src/mesa \
68 -I$(TOP)/src/mesa/main \
69 -I$(TOP)/src/mesa/glapi \
70 -I$(TOP)/src/mesa/math \
71 -I$(TOP)/src/mesa/transform \
72 -I$(TOP)/src/mesa/swrast \
73 -I$(TOP)/src/mesa/swrast_setup
74
75
76 ##### RULES #####
77
78 .c.o:
79 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
80
81 .S.o:
82 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
83
84
85 ##### TARGETS #####
86
87 default: depend i810_dri.so
88
89 i810_dri.so: $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.solo
90 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
91 rm -f $(LIB_DIR)/i810_dri.so && \
92 install i810_dri.so $(LIB_DIR)/i810_dri.so
93
94 $(LIB_DIR)/i810_dri.so: i810_dri.so
95 rm -f $(LIB_DIR)/i810_dri.so && \
96 install i810_dri.so $(LIB_DIR)/i810_dri.so
97
98 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
99 # what's included by any source file.
100 depend: $(C_SOURCES) $(ASM_SOURCES)
101 touch depend
102 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \
103 $(C_SOURCES) $(ASM_SOURCES)
104
105
106 # Emacs tags
107 tags:
108 etags `find . -name \*.[ch]` `find ../include`
109
110
111 # Remove .o and backup files
112 clean:
113 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
114
115
116 include depend