summaryrefslogtreecommitdiff
path: root/src/mapi/vgapi/Makefile
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-26 16:48:59 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-07 10:41:12 +0800
commitbdc4504252692b2eb971c08114182828870cc0f8 (patch)
treee54701da9110256d83448e499e9ec59a12620323 /src/mapi/vgapi/Makefile
parentd4589d381697b4b3dd291a3c93a34370508ef1e8 (diff)
mapi: Add vgapi.
vgapi is a dispatcher for OpenVG.
Diffstat (limited to 'src/mapi/vgapi/Makefile')
-rw-r--r--src/mapi/vgapi/Makefile50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile
new file mode 100644
index 0000000000..f2d3eb12a4
--- /dev/null
+++ b/src/mapi/vgapi/Makefile
@@ -0,0 +1,50 @@
+# src/mapi/vgapi/Makefile
+
+TOP := ../../..
+include $(TOP)/configs/current
+
+MAPI := $(TOP)/src/mapi/mapi
+
+include $(MAPI)/sources.mak
+VGAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_SOURCES))
+VGAPI_OBJECTS := $(MAPI_SOURCES:.c=.o)
+
+VGAPI_CPPFLAGS := -DMAPI_ABI_HEADER=\"vgapi/vgapi_tmp.h\"
+
+GENERATED_SOURCES := vgapi_tmp.h
+
+INCLUDE_DIRS := \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mapi
+
+.PHONY: default
+default: depend libvgapi.a
+
+libvgapi.a: $(VGAPI_OBJECTS)
+ @$(MKLIB) -o vgapi -static $(VGAPI_OBJECTS)
+
+$(VGAPI_SOURCES): | $(GENERATED_SOURCES)
+
+$(VGAPI_OBJECTS): %.o: $(MAPI)/%.c
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(VGAPI_CPPFLAGS) $< -o $@
+
+vgapi_tmp.h: vgapi.csv $(MAPI)/mapi_abi.py
+ $(PYTHON2) $(PYTHON_FLAGS) $(MAPI)/mapi_abi.py \
+ -i vgapi/vgapi_defines.h $< > $@
+
+.PHONY: clean
+clean:
+ -rm -f libvgapi.a
+ -rm -f $(VGAPI_OBJECTS)
+ -rm -f depend depend.bak
+ -rm -f $(GENERATED_SOURCES)
+
+# nothing to install
+install:
+
+depend: $(VGAPI_SOURCES)
+ @echo "running $(MKDEP)"
+ @touch depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
+ $(VGAPI_CPPFLAGS) $(VGAPI_SOURCES) 2>/dev/null | \
+ sed -e 's,^$(MAPI)/,,' > depend