From 8f2a974cf2c9b6c00dfac11be4316a7d121dfbb4 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 6 Dec 2010 10:27:39 +0800 Subject: 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. --- src/mapi/vgapi/Makefile | 4 +++- src/mapi/vgapi/SConscript | 4 ++-- src/mapi/vgapi/vgapi_defines.h | 11 ----------- 3 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 src/mapi/vgapi/vgapi_defines.h (limited to 'src/mapi/vgapi') 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 */ -- cgit v1.2.3