summaryrefslogtreecommitdiff
path: root/src/mapi/vgapi
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-12-06 10:27:39 +0800
committerChia-I Wu <olv@lunarg.com>2010-12-06 15:40:37 +0800
commit8f2a974cf2c9b6c00dfac11be4316a7d121dfbb4 (patch)
tree33f4139d4adb57568a9e020a06a696ffdb3922f2 /src/mapi/vgapi
parent5ae4b6693a8254236435960ef84701fe405fe59b (diff)
mapi: Rewrite mapi_abi.py to get rid of preprocessor magic.
The preprocessor magic in mapi was nothing but obfuscation. Rewrite mapi_abi.py to generate real C code. This commit removes the hack added in 43121f20866bb89e8dac92bd92ec85a943704b7e.
Diffstat (limited to 'src/mapi/vgapi')
-rw-r--r--src/mapi/vgapi/Makefile4
-rw-r--r--src/mapi/vgapi/SConscript4
-rw-r--r--src/mapi/vgapi/vgapi_defines.h11
3 files changed, 5 insertions, 14 deletions
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile
index 702db03d15..e239e20987 100644
--- a/src/mapi/vgapi/Makefile
+++ b/src/mapi/vgapi/Makefile
@@ -44,7 +44,7 @@ $(VGAPI_OBJECTS): %.o: $(MAPI)/%.c
vgapi_tmp.h: vgapi.csv $(MAPI)/mapi_abi.py
$(PYTHON2) $(PYTHON_FLAGS) $(MAPI)/mapi_abi.py \
- -i vgapi/vgapi_defines.h $< > $@
+ --printer vgapi --mode lib $< > $@
.PHONY: clean
clean:
@@ -87,3 +87,5 @@ depend: $(VGAPI_SOURCES)
@$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
$(VGAPI_CPPFLAGS) $(VGAPI_SOURCES) 2>/dev/null | \
sed -e 's,^$(MAPI)/,,' > depend
+
+-include depend
diff --git a/src/mapi/vgapi/SConscript b/src/mapi/vgapi/SConscript
index 20d7f2744d..42d86b69ee 100644
--- a/src/mapi/vgapi/SConscript
+++ b/src/mapi/vgapi/SConscript
@@ -13,7 +13,7 @@ if env['platform'] != 'winddk':
target = '#src/mapi/vgapi/vgapi_tmp.h',
script = '../mapi/mapi_abi.py',
source = 'vgapi.csv',
- command = python_cmd + ' $SCRIPT -i vgapi/vgapi_defines.h $SOURCE > $TARGET'
+ command = python_cmd + ' $SCRIPT --printer vgapi --mode lib $SOURCE > $TARGET'
)
env.Append(CPPDEFINES = [
@@ -53,4 +53,4 @@ if env['platform'] != 'winddk':
vgapi = [env.FindIxes(openvg, 'LIBPREFIX', 'LIBSUFFIX')]
- Export(['vgapi', 'vgapi_header'])
+ Export(['vgapi'])
diff --git a/src/mapi/vgapi/vgapi_defines.h b/src/mapi/vgapi/vgapi_defines.h
deleted file mode 100644
index fb9f68c7ad..0000000000
--- a/src/mapi/vgapi/vgapi_defines.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef VGAPI_DEFINES_H
-#define VGAPI_DEFINES_H
-
-#include "VG/openvg.h"
-#include "VG/vgext.h"
-
-#define MAPI_ABI_PREFIX vg
-#define MAPI_ABI_PUBLIC VG_API_CALL
-#define MAPI_ABI_ATTR VG_API_ENTRY
-
-#endif /* VGAPI_DEFINES_H */