From 7048095513f8e91db26736eee0343b1a00d18f6f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 11 Dec 2010 03:27:54 +0800 Subject: mapi: Clean up sources.mk. Rename MAPI_GLAPI_SOURCES to MAPI_UTIL_SOURCES. Rename macro MAPI_GLAPI_CURRENT to MAPI_MODE_UTIL. Update the comments to make it clear that mapi may be used in two ways and how. --- src/mapi/mapi/sources.mak | 14 ++++++++------ src/mapi/mapi/u_current.c | 2 +- src/mapi/mapi/u_current.h | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src/mapi/mapi') diff --git a/src/mapi/mapi/sources.mak b/src/mapi/mapi/sources.mak index 5f327f3df6..ed36e1af48 100644 --- a/src/mapi/mapi/sources.mak +++ b/src/mapi/mapi/sources.mak @@ -1,12 +1,14 @@ # src/mapi/mapi/sources.mak # -# When MAPI_GLAPI_CURRENT is defined, MAPI_GLAPI_SOURCES can be built without -# MAPI_SOURCES and it is used by glapi. +# mapi may be used in several ways # -# Otherwise, MAPI_ABI_HEADER must be defined. It should expand to the header -# generated by mapi_abi.py. +# - In default mode, mapi implements the interface defined by mapi.h. To use +# this mode, compile MAPI_SOURCES. +# +# - In util mode, mapi provides utility functions for use with glapi. To use +# this mode, compile MAPI_UTIL_SOURCES with MAPI_MODE_UTIL defined. -MAPI_GLAPI_SOURCES = \ +MAPI_UTIL_SOURCES = \ u_current.c \ u_execmem.c \ u_thread.c @@ -16,4 +18,4 @@ MAPI_SOURCES = \ mapi.c \ stub.c \ table.c \ - $(MAPI_GLAPI_SOURCES) + $(MAPI_UTIL_SOURCES) diff --git a/src/mapi/mapi/u_current.c b/src/mapi/mapi/u_current.c index d84520f313..7946d2a274 100644 --- a/src/mapi/mapi/u_current.c +++ b/src/mapi/mapi/u_current.c @@ -51,7 +51,7 @@ #include "u_current.h" #include "u_thread.h" -#ifndef MAPI_GLAPI_CURRENT +#ifndef MAPI_MODE_UTIL #include "table.h" #include "stub.h" diff --git a/src/mapi/mapi/u_current.h b/src/mapi/mapi/u_current.h index 373d48fb93..061fccc949 100644 --- a/src/mapi/mapi/u_current.h +++ b/src/mapi/mapi/u_current.h @@ -1,7 +1,7 @@ #ifndef _U_CURRENT_H_ #define _U_CURRENT_H_ -#ifdef MAPI_GLAPI_CURRENT +#ifdef MAPI_MODE_UTIL #include "glapi/glapi.h" @@ -21,7 +21,7 @@ #define u_current_table_tsd _gl_DispatchTSD -#else /* MAPI_GLAPI_CURRENT */ +#else /* MAPI_MODE_UTIL */ #include "u_compiler.h" @@ -42,7 +42,7 @@ extern void *u_current_user; #endif /* GLX_USE_TLS */ -#endif /* MAPI_GLAPI_CURRENT */ +#endif /* MAPI_MODE_UTIL */ void u_current_init(void); -- cgit v1.2.3