1# This makefile template is used to build libvdpau_g3dvl.so 2 3LIBNAME = lib$(LIBBASENAME).so 4VDPAU_LIB_GLOB=lib$(LIBBASENAME).*so* 5VDPAU_MAJOR = 1 6VDPAU_MINOR = 0 7INCLUDES = -I$(TOP)/src/gallium/include \ 8 -I$(TOP)/src/gallium/drivers \ 9 -I$(TOP)/src/gallium/auxiliary \ 10 -I$(TOP)/src/gallium/winsys \ 11 $(DRIVER_INCLUDES) 12DEFINES = -DGALLIUM_TRACE -DVER_MAJOR=$(VDPAU_MAJOR) -DVER_MINOR=$(VDPAU_MINOR) $(DRIVER_DEFINES) 13LIBS = $(DRIVER_LIBS) -lvdpau -lX11-xcb -lxcb-dri2 -lm -lrt 14STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/vdpau/libvdpautracker.a 15 16ifeq ($(MESA_LLVM),1) 17LDFLAGS += $(LLVM_LDFLAGS) 18DRIVER_EXTRAS = $(LLVM_LIBS) 19LD=$(CXX) 20else 21 ifeq ($(LINK_WITH_CXX),1) 22 LD=$(CXX) 23 else 24 LD=$(CC) 25 endif 26endif 27 28# XXX: Hack, VDPAU public funcs aren't exported if we link to libvdpautracker.a :( 29C_SOURCES += $(TOP)/src/gallium/state_trackers/vdpau/device.c 30OBJECTS = $(C_SOURCES:.c=.o) \ 31 $(ASM_SOURCES:.S=.o) 32 33##### RULES ##### 34 35.c.o: 36 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ 37 38.S.o: 39 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ 40 41##### TARGETS ##### 42 43default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME) 44 45$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) Makefile 46 $(MKLIB) -o $(LIBBASENAME) -linker '$(LD)' -ldflags '$(LDFLAGS)' \ 47 -major $(VDPAU_MAJOR) -minor $(VDPAU_MINOR) $(MKLIB_OPTIONS) \ 48 -install $(TOP)/$(LIB_DIR)/gallium \ 49 $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS) 50 51$(TOP)/$(LIB_DIR)/gallium: 52 mkdir -p $@ 53 54depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS) 55 rm -f depend 56 touch depend 57 $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) \ 58 $(ASM_SOURCES) 2> /dev/null 59 60# Emacs tags 61tags: 62 etags `find . -name \*.[ch]` `find ../include` 63 64# Remove .o and backup files 65clean: 66 -rm -f $(OBJECTS) *~ *.so $(SYMLINKS) 67 -rm -f depend depend.bak 68 69install: default 70 $(INSTALL) -d $(DESTDIR)$(VDPAU_LIB_INSTALL_DIR) 71 $(MINSTALL) -m 755 $(TOP)/$(LIB_DIR)/gallium/$(VDPAU_LIB_GLOB) $(DESTDIR)$(VDPAU_LIB_INSTALL_DIR) 72 73include depend 74