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