summaryrefslogtreecommitdiffstats
path: root/src/mapi/es1api
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-26 12:56:44 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-07 10:41:11 +0800
commit296adbd545b8efd38c9ed508166b2de2764a444b (patch)
treeb146a292769007902a0aca98cfdd9d8ce7c44b59 /src/mapi/es1api
parent73ded0624de66bc83ae990530febb129d950d04b (diff)
downloadexternal_mesa3d-296adbd545b8efd38c9ed508166b2de2764a444b.zip
external_mesa3d-296adbd545b8efd38c9ed508166b2de2764a444b.tar.gz
external_mesa3d-296adbd545b8efd38c9ed508166b2de2764a444b.tar.bz2
glapi: Move to src/mapi/.
Move glapi to src/mapi/{glapi,es1api,es2api}.
Diffstat (limited to 'src/mapi/es1api')
-rw-r--r--src/mapi/es1api/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile
new file mode 100644
index 0000000..9130d0b
--- /dev/null
+++ b/src/mapi/es1api/Makefile
@@ -0,0 +1,60 @@
+# src/mapi/es1api/Makefile
+
+TOP := ../../..
+include $(TOP)/configs/current
+
+# this Makefile can build both libes1api.a and libes2api.a
+ifeq ($(ES),)
+ES := es1
+endif
+
+ESAPI = $(ES)api
+
+GLAPI := ../glapi
+include $(GLAPI)/sources.mak
+ESAPI_SOURCES := $(addprefix $(GLAPI)/, $(GLAPI_SOURCES))
+ESAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
+ESAPI_ASM_SOURCES := $(addprefix glapi/, $(GLAPI_ASM_SOURCES))
+ESAPI_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
+
+INCLUDE_DIRS = \
+ -I$(TOP)/include \
+ -I$(TOP)/src/mapi/$(ESAPI) \
+ -I$(TOP)/src/mapi \
+ -I$(TOP)/src/mesa
+
+.PHONY: default
+default: depend lib$(ESAPI).a
+
+lib$(ESAPI).a: $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS)
+ @$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS)
+
+$(ESAPI_OBJECTS): %.o: $(GLAPI)/%.c
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+$(ESAPI_ASM_OBJECTS): %.o: glapi/%.S
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+
+$(ESAPI_SOURCES) $(ESAPI_ASM_SOURCES): | glapi-stamp
+
+glapi-stamp:
+ @$(MAKE) -C $(GLAPI)/gen-es $(ES)
+ @touch $@
+
+.PHONY: clean
+clean:
+ -rm -f $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS)
+ -rm -f lib$(ESAPI).a
+ -rm -f depend depend.bak
+ @$(MAKE) -C $(GLAPI)/gen-es clean-$(ES)
+ -rm -f glapi-stamp
+
+# nothing to install
+install:
+
+depend: $(ESAPI_SOURCES)
+ @echo "running $(MKDEP)"
+ @touch depend
+ @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
+ $(ESAPI_SOURCES) 2>/dev/null | \
+ sed -e 's,^$(GLAPI)/,,' > depend