diff options
author | Chia-I Wu <[email protected]> | 2010-04-23 16:06:26 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-05-07 10:41:11 +0800 |
commit | a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c (patch) | |
tree | edeb695b6ed24d3cb0016fbabadea48931de779f /src/mapi/glapi/Makefile | |
parent | 296adbd545b8efd38c9ed508166b2de2764a444b (diff) |
mapi: Add mapi and share the code with glapi.
Specifically, move all or most of
glapi/glapi.c to mapi/u_current.c,
glapi/glapi_execmem.c to mapi/u_execmem.c,
glapi/glthread.[ch] to mapi/u_thread.[ch]
and remove their dependencies on core Mesa headers.
Diffstat (limited to 'src/mapi/glapi/Makefile')
-rw-r--r-- | src/mapi/glapi/Makefile | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/mapi/glapi/Makefile b/src/mapi/glapi/Makefile index 13c8c54de21..ca9381d4253 100644 --- a/src/mapi/glapi/Makefile +++ b/src/mapi/glapi/Makefile @@ -3,19 +3,29 @@ TOP = ../../.. include $(TOP)/configs/current +TARGET = glapi + +MAPI = $(TOP)/src/mapi/mapi + include sources.mak GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o) GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o) +include $(MAPI)/sources.mak +MAPI_GLAPI_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o) +MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES)) + +TARGET_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS) + INCLUDE_DIRS = \ -I$(TOP)/include \ -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa -default: depend libglapi.a +default: depend lib$(TARGET).a -libglapi.a: $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) - @ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) +lib$(TARGET).a: $(TARGET_OBJECTS) + @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS) $(GLAPI_OBJECTS): %.o: %.c $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ @@ -23,16 +33,21 @@ $(GLAPI_OBJECTS): %.o: %.c $(GLAPI_ASM_OBJECTS): %.o: %.S $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ +$(MAPI_GLAPI_OBJECTS): %.o: $(MAPI)/%.c + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) -DMAPI_GLAPI_CURRENT $< -o $@ + install: clean: - -rm -f $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) - -rm -f depend depend.bak libglapi.a + -rm -f $(TARGET_OBJECTS) + -rm -f lib$(TARGET).a + -rm -f depend depend.bak -depend: $(GLAPI_SOURCES) +depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) @ echo "running $(MKDEP)" @ touch depend - @$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(GLAPI_SOURCES) \ - > /dev/null 2>/dev/null + @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \ + -DMAPI_GLAPI_CURRENT $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) \ + 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend -include depend |