summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCooper Yuan <cooperyuan@gmail.com>2009-09-24 14:02:22 +0800
committerCooper Yuan <cooperyuan@gmail.com>2009-09-24 14:02:22 +0800
commitba68bf8f403b34d5fd4192fa9a7ea40bb2adb2d3 (patch)
tree897ec8b1b343bb5367d4e20ece8696f01bd09493
parent8838756524a1d5e7254b25eaa62f19e3bcf3e641 (diff)
xvmc: refine Makefile
-rw-r--r--src/gallium/winsys/g3dvl/radeon/Makefile131
1 files changed, 85 insertions, 46 deletions
diff --git a/src/gallium/winsys/g3dvl/radeon/Makefile b/src/gallium/winsys/g3dvl/radeon/Makefile
index 2ad5f035c..9520ecab1 100644
--- a/src/gallium/winsys/g3dvl/radeon/Makefile
+++ b/src/gallium/winsys/g3dvl/radeon/Makefile
@@ -1,48 +1,87 @@
-TARGET = libradeon_vl.so
-GALLIUMDIR = ../../..
-DRMDIR ?= /usr
-DRIDIR = ../../../../driclient
-GLXDIR = ../../../../glx
-
-OBJECTS = radeon_vl.o
-
-CFLAGS += -g -Wall -Werror=implicit-function-declaration -fPIC \
- -I${GALLIUMDIR}/include \
- -I${GALLIUMDIR}/winsys/g3dvl \
- -I${GALLIUMDIR}/winsys/drm/radeon/core \
- -I${DRMDIR}/include \
- -I${DRMDIR}/include/drm \
- -I${DRMDIR}/include/nouveau \
- -I${GALLIUMDIR}/drivers \
- -I${GALLIUMDIR}/auxiliary \
- -I${DRIDIR}/include \
- -I${GALLIUMDIR}/drivers/r300 \
- -I${GLXDIR}/x11
-
-LDFLAGS += -L${DRIDIR}/lib \
- -L${GALLIUMDIR}/winsys/drm/radeon/core \
- -L${GALLIUMDIR}/auxiliary/draw \
- -L${GALLIUMDIR}/auxiliary/tgsi \
- -L${GALLIUMDIR}/auxiliary/translate \
- -L${GALLIUMDIR}/auxiliary/rtasm \
- -L${GALLIUMDIR}/auxiliary/cso_cache \
- -L${GALLIUMDIR}/auxiliary/util \
- -L${GALLIUMDIR}/drivers/r300
-
-LIBS += -ldriclient -lauxutil -lradeonwinsys -ldrm_radeon -lr300 -ldrm -ldraw -ltgsi -ltranslate -lrtasm -lcso_cache -lm
-
-#############################################
-
-.PHONY = all clean libdriclient
-
-all: ${TARGET}
-
-${TARGET}: ${OBJECTS} libdriclient
- $(CC) ${LDFLAGS} -shared -o $@ ${OBJECTS} ${LIBS}
-
-libdriclient:
- cd ${DRIDIR}/src; ${MAKE}
+# src/gallium/winsys/egl_xlib/Makefile
+
+# Build softpipe/xlib/EGL driver library/object: "egl_softpipe.so"
+
+
+TOP = ../../../../..
+include $(TOP)/configs/current
+
+
+DRIVER_NAME = libradeon_vl.so
+
+
+INCLUDE_DIRS = \
+ -I$(TOP)/include \
+ -I$(TOP)/src/egl/main \
+ -I$(TOP)/src/mesa \
+ -I$(TOP)/src/mesa/main \
+ -I$(TOP)/src/gallium/include \
+ -I$(TOP)/src/gallium/drivers \
+ -I$(TOP)/src/gallium/auxiliary
+
+WINSYS_SOURCES = \
+ radeon_vl.c
+
+WINSYS_OBJECTS = $(WINSYS_SOURCES:.c=.o)
+
+LIBS = \
+ $(GALLIUM_DRIVERS) \
+ $(GALLIUM_AUXILIARIES)
+
+# XXX temporary (should create a separate lib with the GL API funcs and
+# mesa code, as done for ES 1.x, 2.x, OpenVG, etc)
+UNUSED_LIBS = \
+ $(TOP)/src/mesa/libglapi.a \
+ $(TOP)/src/mesa/libmesagallium.a \
+
+
+LOCAL_CFLAGS =
+
+
+.c.o:
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(LOCAL_CFLAGS) $< -o $@
+
+
+.PHONY: library
+
+
+default: depend library Makefile
+
+
+library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME)
+
+
+# Make the egl_softpipe.so library
+$(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(WINSYS_OBJECTS) $(LIBS)
+ $(TOP)/bin/mklib -o $(DRIVER_NAME) \
+ -linker "$(CC)" \
+ -noprefix \
+ -install $(TOP)/$(LIB_DIR) \
+ $(MKLIB_OPTIONS) $(WINSYS_OBJECTS) \
+ -Wl,--whole-archive $(LIBS) -Wl,--no-whole-archive
+
+
+depend: $(ALL_SOURCES)
+ @ echo "running $(MKDEP)"
+ @ rm -f depend # workaround oops on gutsy?!?
+ @ touch depend
+ @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \
+ > /dev/null 2>/dev/null
+
+
+install: default
+ $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
+ @if [ -e $(TOP)/$(LIB_DIR) ]; then \
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) $(INSTALL_DIR)/$(LIB_DIR); \
+ fi
+
+
+# Emacs tags
+tags:
+ etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
clean:
- cd ${DRIDIR}/src; ${MAKE} clean
- rm -rf ${OBJECTS} ${TARGET}
+ -rm -f *.o *~ *.bak
+
+
+include depend