Makefile revision e799163dec1fd23dadc9d3eaf5e71e9e7d23a818
1# src/gallium/state_trackers/vega/Makefile
2
3TOP = ../../../..
4include $(TOP)/configs/current
5
6VG_LIB = OpenVG
7VG_LIB_NAME = lib$(VG_LIB).so
8
9VG_MAJOR = 1
10VG_MINOR = 0
11VG_TINY = 0
12
13### Lists of source files, included by Makefiles
14
15VG_SOURCES = \
16           api_context.c   \
17           api_filters.c   \
18           api_images.c    \
19           api_masks.c     \
20           api_misc.c      \
21           api_paint.c     \
22           api_params.c    \
23           api_path.c      \
24           api_text.c      \
25           api_transform.c \
26           vgu.c        \
27           vg_context.c \
28           vg_state.c   \
29           vg_tracker.c \
30           vg_translate.c \
31           polygon.c    \
32           bezier.c     \
33           path.c       \
34           paint.c      \
35           arc.c \
36           image.c \
37           renderer.c \
38           stroker.c \
39           mask.c \
40           shader.c \
41           shaders_cache.c
42
43VG_OBJECTS = $(VG_SOURCES:.c=.o)
44
45VG_LIBS = $(GALLIUM_AUXILIARIES) -lm
46
47### Include directories
48
49INCLUDE_DIRS = \
50	-I$(TOP)/include \
51	-I$(TOP)/src/gallium/include \
52	-I$(TOP)/src/gallium/auxiliary
53
54
55.c.o:
56	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
57
58default: depend $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME)
59
60# Make the OpenVG library
61$(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(VG_LIBS)
62	$(MKLIB) -o $(VG_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
63		-major $(VG_MAJOR) \
64		-minor $(VG_MINOR) \
65		-patch $(VG_TINY) \
66		-install $(TOP)/$(LIB_DIR) \
67		$(VG_OBJECTS) $(VG_LIBS)
68
69######################################################################
70# Generic stuff
71
72depend: $(VG_SOURCES)
73	@ echo "running $(MKDEP)"
74	@ rm -f depend  # workaround oops on gutsy?!?
75	@ touch depend
76	@ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(VG_SOURCES) \
77		> /dev/null 2>/dev/null
78
79install: default
80	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/VG
81	$(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_DIR)/include/VG
82	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
83	$(MINSTALL) $(TOP)/$(LIB_DIR)/libOpenVG* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
84
85# Emacs tags
86tags:
87	etags `find . -name \*.[ch]` $(TOP)/include/VG/*.h
88
89clean:
90	rm -f $(VG_OBJECTS)
91	rm -f depend depend.bak
92
93sinclude depend
94