aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/Makefile
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-29 22:05:53 +0000
committermarha <marha@users.sourceforge.net>2010-11-29 22:05:53 +0000
commitfed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7 (patch)
treefa1ba494685a71e28a096990a8707680c7cb378b /mesalib/src/mapi/glapi/Makefile
parentae340911c1ba1f98b418bd8f1a487fa4d79491b0 (diff)
parent6fda93be42ace9eeab0e82ceebb6798961c9105c (diff)
downloadvcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.gz
vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.bz2
vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mapi/glapi/Makefile')
-rw-r--r--mesalib/src/mapi/glapi/Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/mesalib/src/mapi/glapi/Makefile b/mesalib/src/mapi/glapi/Makefile
new file mode 100644
index 000000000..ca9381d42
--- /dev/null
+++ b/mesalib/src/mapi/glapi/Makefile
@@ -0,0 +1,53 @@
+# src/mapi/glapi/Makefile
+
+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 lib$(TARGET).a
+
+lib$(TARGET).a: $(TARGET_OBJECTS)
+ @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS)
+
+$(GLAPI_OBJECTS): %.o: %.c
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+$(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 $(TARGET_OBJECTS)
+ -rm -f lib$(TARGET).a
+ -rm -f depend depend.bak
+
+depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ touch depend
+ @$(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