summaryrefslogtreecommitdiff
path: root/src/mapi/mapi
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-12-11 03:27:54 +0800
committerChia-I Wu <olv@lunarg.com>2010-12-18 15:05:58 +0800
commit7048095513f8e91db26736eee0343b1a00d18f6f (patch)
treee4be2fcf5a7214d3fd1e47afb078b198bc18d0e3 /src/mapi/mapi
parentc17d4999f108d86c468cf4b11b08f915c282ce12 (diff)
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.
Diffstat (limited to 'src/mapi/mapi')
-rw-r--r--src/mapi/mapi/sources.mak14
-rw-r--r--src/mapi/mapi/u_current.c2
-rw-r--r--src/mapi/mapi/u_current.h6
3 files changed, 12 insertions, 10 deletions
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);