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