Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / src / gallium / state_trackers / vega / Makefile
1 # src/mesa/Makefile
2
3 TOP = ../../../..
4 include $(TOP)/configs/current
5 GALLIUM = $(TOP)
6
7 ### Lists of source files, included by Makefiles
8
9 VG_SOURCES = \
10 api_context.c \
11 api_filters.c \
12 api_images.c \
13 api_masks.c \
14 api_misc.c \
15 api_paint.c \
16 api_params.c \
17 api_path.c \
18 api_text.c \
19 api_transform.c \
20 vgu.c \
21 vg_context.c \
22 vg_state.c \
23 vg_tracker.c \
24 vg_translate.c \
25 polygon.c \
26 bezier.c \
27 path.c \
28 paint.c \
29 arc.c \
30 image.c \
31 renderer.c \
32 stroker.c \
33 mask.c \
34 shader.c \
35 shaders_cache.c
36
37
38 ### All the core C sources
39
40 ALL_SOURCES = \
41 $(VG_SOURCES)
42
43
44 ### Object files
45 VG_OBJECTS = \
46 $(VG_SOURCES:.c=.o)
47
48 ### Include directories
49
50 INCLUDE_DIRS = \
51 -I$(TOP)/include \
52 -I$(GALLIUM)/include \
53 -I$(GALLIUM)/src/gallium/include \
54 -I$(GALLIUM)/src/gallium/auxiliary
55
56 VG_LIB = OpenVG
57 VG_LIB_NAME = lib$(VG_LIB).so
58
59 VG_MAJOR = 1
60 VG_MINOR = 0
61 VG_TINY = 0
62
63 GALLIUM_LIBS = \
64 $(GALLIUM)/src/gallium/auxiliary/pipebuffer/libpipebuffer.a \
65 $(GALLIUM)/src/gallium/auxiliary/sct/libsct.a \
66 $(GALLIUM)/src/gallium/auxiliary/draw/libdraw.a \
67 $(GALLIUM)/src/gallium/auxiliary/rtasm/librtasm.a \
68 $(GALLIUM)/src/gallium/auxiliary/translate/libtranslate.a \
69 $(GALLIUM)/src/gallium/auxiliary/cso_cache/libcso_cache.a \
70 $(GALLIUM)/src/gallium/auxiliary/util/libutil.a \
71 $(GALLIUM)/src/gallium/auxiliary/tgsi/libtgsi.a
72
73 .SUFFIXES : .cpp
74
75 .c.o:
76 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
77
78 .cpp.o:
79 $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
80
81 .S.o:
82 $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
83
84
85 default: depend subdirs $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME)
86
87 # Make the OpenVG library
88 $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(GALLIUM_LIBS)
89 $(TOP)/bin/mklib -o $(VG_LIB) \
90 -major $(VG_MAJOR) \
91 -minor $(VG_MINOR) \
92 -patch $(VG_TINY) \
93 -install $(TOP)/$(LIB_DIR) \
94 $(VG_OBJECTS) $(GALLIUM_LIBS) \
95 -Wl,--whole-archive $(LIBS) -Wl,--no-whole-archive $(SYS_LIBS)
96
97 ######################################################################
98 # Generic stuff
99
100 depend: $(ALL_SOURCES)
101 @ echo "running $(MKDEP)"
102 @ rm -f depend # workaround oops on gutsy?!?
103 @ touch depend
104 @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
105 > /dev/null 2>/dev/null
106
107
108 subdirs:
109
110 install: default
111 $(INSTALL) -d $(INSTALL_DIR)/include/VG
112 $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
113 $(INSTALL) -m 644 $(TOP)/include/VG/*.h $(INSTALL_DIR)/include/VG
114 @if [ -e $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME) ]; then \
115 $(INSTALL) $(TOP)/$(LIB_DIR)/libOpenVG* $(INSTALL_DIR)/$(LIB_DIR); \
116 fi
117
118 # Emacs tags
119 tags:
120 etags `find . -name \*.[ch]` $(TOP)/include/VG/*.h
121
122 clean:
123 -rm -f *.o
124 -rm -f */*.o
125 -rm -f */*/*.o
126 -rm -f depend depend.bak
127
128 include depend