4eeeeff264e2db5e1cc2d22183521177b8dcf025
[mesa.git] / src / mesa / drivers / dri / sis / 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 # Not yet
24 # MINIGLX_SOURCES = server/sis_dri.c
25
26 DRIVER_SOURCES = \
27 sis_alloc.c \
28 sis_clear.c \
29 sis_context.c \
30 sis_dd.c \
31 sis_fog.c \
32 sis_lock.c \
33 sis_screen.c \
34 sis_span.c \
35 sis_state.c \
36 sis_stencil.c \
37 sis_tex.c \
38 sis_texstate.c \
39 sis_tris.c \
40 sis_vb.c \
41 ../../common/driverfuncs.c \
42 ../common/mm.c \
43 ../common/utils.c \
44 ../common/texmem.c \
45 ../common/vblank.c
46
47 INCLUDES = $(MINIGLX_INCLUDES) \
48 $(SHARED_INCLUDES)
49
50
51 C_SOURCES = $(DRIVER_SOURCES) \
52 $(MINIGLX_SOURCES)
53
54 MESA_MODULES = $(TOP)/src/mesa/mesa.a
55
56
57 ifeq ($(WINDOW_SYSTEM),dri)
58 WINOBJ=$(MESABUILDDIR)/dri/dri.a
59 WINLIB=
60 else
61 WINOBJ=
62 WINLIB=-L$(MESA)/src/glx/mini
63 endif
64
65 ASM_SOURCES =
66 OBJECTS = $(C_SOURCES:.c=.o) \
67 $(ASM_SOURCES:.S=.o)
68
69 ### Include directories
70
71 INCLUDE_DIRS = \
72 -I$(TOP)/include \
73 -I$(TOP)/src/mesa \
74 -I$(TOP)/src/mesa/main \
75 -I$(TOP)/src/mesa/glapi \
76 -I$(TOP)/src/mesa/math \
77 -I$(TOP)/src/mesa/transform \
78 -I$(TOP)/src/mesa/swrast \
79 -I$(TOP)/src/mesa/swrast_setup
80
81
82 ##### RULES #####
83
84 .c.o:
85 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
86
87 .S.o:
88 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
89
90
91 ##### TARGETS #####
92
93 targets: depend sis_dri.so
94
95 sis_dri.so: $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.solo
96 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
97 rm -f $(TOP)/lib/sis_dri.so && \
98 install sis_dri.so $(TOP)/lib/sis_dri.so
99
100 $(TOP)/lib/sis_dri.so: sis_dri.so
101 rm -f $(TOP)/lib/sis_dri.so && \
102 install sis_dri.so $(TOP)/lib/sis_dri.so
103
104 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
105 # what's included by any source file.
106 depend: $(C_SOURCES) $(ASM_SOURCES)
107 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \
108 $(C_SOURCES) $(ASM_SOURCES)
109
110
111 # Emacs tags
112 tags:
113 etags `find . -name \*.[ch]` `find ../include`
114
115
116 # Remove .o and backup files
117 clean:
118 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
119
120
121 include $(TOP)/Make-config
122
123 include depend