Makefile revision 154d9242de865c3cca8e597be911d69a53077ab1
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)
46VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lm
47
48### Include directories
49
50INCLUDE_DIRS = \
51	-I$(TOP)/include \
52	-I$(TOP)/src/gallium/include \
53	-I$(TOP)/src/gallium/auxiliary
54
55
56.c.o:
57	$(CC) -c $(INCLUDE_DIRS) $(DEFINES) $(CFLAGS) $< -o $@
58
59default: depend $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME)
60
61# Make the OpenVG library
62$(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(VG_LIBS)
63	$(MKLIB) -o $(VG_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
64		-major $(VG_MAJOR) \
65		-minor $(VG_MINOR) \
66		-patch $(VG_TINY) \
67		-install $(TOP)/$(LIB_DIR) \
68		$(VG_OBJECTS) $(VG_LIBS) $(VG_LIB_DEPS)
69
70######################################################################
71# Generic stuff
72
73depend: $(VG_SOURCES)
74	@ echo "running $(MKDEP)"
75	@ rm -f depend  # workaround oops on gutsy?!?
76	@ touch depend
77	@ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(VG_SOURCES) \
78		> /dev/null 2>/dev/null
79
80install: default
81	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/VG
82	$(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_DIR)/include/VG
83	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
84	$(MINSTALL) $(TOP)/$(LIB_DIR)/libOpenVG* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
85
86# Emacs tags
87tags:
88	etags `find . -name \*.[ch]` $(TOP)/include/VG/*.h
89
90clean:
91	rm -f $(VG_OBJECTS)
92	rm -f depend depend.bak
93
94sinclude depend
95