199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell# src/gallium/targets/libgl-xlib/Makefile 299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell# This makefile produces a "stand-alone" libGL.so which is based on 499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell# Xlib (no DRI HW acceleration) 599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellTOP = ../../../.. 899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellinclude $(TOP)/configs/current 999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 1099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 1199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellGL_MAJOR = 1 1299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellGL_MINOR = 5 13988b246c471c9c7ece1082682853e3744b702dd2Brian PaulGL_TINY = 0$(MESA_MAJOR)$(MESA_MINOR)0$(MESA_TINY) 1499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 1599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 1699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellINCLUDE_DIRS = \ 1799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -I$(TOP)/include \ 18296adbd545b8efd38c9ed508166b2de2764a444bChia-I Wu -I$(TOP)/src/mapi \ 1999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -I$(TOP)/src/mesa \ 2099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -I$(TOP)/src/mesa/main \ 2199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -I$(TOP)/src/gallium/include \ 2299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -I$(TOP)/src/gallium/drivers \ 2399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -I$(TOP)/src/gallium/state_trackers/glx/xlib \ 244f8bf353bd7e896268e0eb445c61270a8823892aDan Nicholson -I$(TOP)/src/gallium/auxiliary \ 254e7a4bed372a6da4dde8926f3bc30c56e3fbe07bDan Nicholson $(X11_CFLAGS) 2699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 2799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellDEFINES += \ 28f1de38b851d274b16e8b58669a110b0124e0f40bBrian Paul -DGALLIUM_SOFTPIPE \ 29c30656d8c24eafeb29276fa31503b30608239468Jakob Bornecrantz -DGALLIUM_RBUG \ 30c30656d8c24eafeb29276fa31503b30608239468Jakob Bornecrantz -DGALLIUM_TRACE \ 31f1de38b851d274b16e8b58669a110b0124e0f40bBrian Paul -DGALLIUM_GALAHAD 3299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 3399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellXLIB_TARGET_SOURCES = \ 3499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell xlib.c 3599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 3699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 3799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellXLIB_TARGET_OBJECTS = $(XLIB_TARGET_SOURCES:.c=.o) 3899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 3999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 4099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 4199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith WhitwellLIBS = \ 4299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(GALLIUM_DRIVERS) \ 4399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \ 440d0220fedc7a8d490162f7385d19b2d0ab3fb8d9Jakob Bornecrantz $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \ 45999932bf1feed4cbf834b2c81510aab09dda56dcKeith Whitwell $(TOP)/src/gallium/drivers/trace/libtrace.a \ 4653cbb81576671d6d39e6a353e79ebda2c512d735Jakob Bornecrantz $(TOP)/src/gallium/drivers/rbug/librbug.a \ 47c30656d8c24eafeb29276fa31503b30608239468Jakob Bornecrantz $(TOP)/src/gallium/drivers/galahad/libgalahad.a \ 48296adbd545b8efd38c9ed508166b2de2764a444bChia-I Wu $(TOP)/src/mapi/glapi/libglapi.a \ 4999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(TOP)/src/mesa/libmesagallium.a \ 5099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(GALLIUM_AUXILIARIES) \ 5199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 5299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 5328c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I Wu# LLVM 5428c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I Wuifeq ($(MESA_LLVM),1) 5567aba799bc9f32bf60b1587bc7e6072dfadff13dMarek OlšákPIPE_DRIVERS += $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a 5628c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I WuDEFINES += -DGALLIUM_LLVMPIPE 5728c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I WuGL_LIB_DEPS += $(LLVM_LIBS) 5828c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I WuLDFLAGS += $(LLVM_LDFLAGS) 5928c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I Wuendif 6028c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I Wu 61027ce0c493a85c863df88b43f61aea34bcd4cd58Matt Turnerifeq ($(SHARED_GLAPI),1) 62e8c7d7598fb48237508f566204c71ba8f74d544fChia-I WuGL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS) 63027ce0c493a85c863df88b43f61aea34bcd4cd58Matt Turnerendif 64e8c7d7598fb48237508f566204c71ba8f74d544fChia-I Wu 6528c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I Wu 6699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell.SUFFIXES : .cpp 6799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 6899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell.c.o: 6999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ 7099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 7199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell.cpp.o: 7299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@ 7399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 7499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 7599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 7699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwelldefault: $(TOP)/$(LIB_DIR)/gallium $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME) 7799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 7899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell$(TOP)/$(LIB_DIR)/gallium: 7999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell @ mkdir -p $(TOP)/$(LIB_DIR)/gallium 8099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 8199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell# Make the libGL.so library 8299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell$(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME): $(XLIB_TARGET_OBJECTS) $(LIBS) Makefile 8399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(TOP)/bin/mklib -o $(GL_LIB) \ 8428c790ab3118ee4c4171120cba2abf2ae3e84805Chia-I Wu -linker "$(CXX)" -ldflags '$(LDFLAGS)' \ 8599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ 86ad58f0d9e021065d8e6d82e1aa7387dcd206f86eBrian Paul -cplusplus \ 8799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -install $(TOP)/$(LIB_DIR)/gallium \ 8899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(MKLIB_OPTIONS) $(XLIB_TARGET_OBJECTS) \ 8999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell -Wl,--start-group $(LIBS) -Wl,--end-group $(GL_LIB_DEPS) 9099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 9199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 9299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwelldepend: $(XLIB_TARGET_SOURCES) 9399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell @ echo "running $(MKDEP)" 9499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell @ rm -f depend # workaround oops on gutsy?!? 9599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell @ touch depend 9699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(XLIB_TARGET_SOURCES) \ 9799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell > /dev/null 2>/dev/null 9899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 9999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 10099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellinstall: default 10199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL 10299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) 10399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL 10499f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \ 10599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell $(MINSTALL) $(TOP)/$(LIB_DIR)/libGL* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \ 10699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell fi 10799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 10899f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 10999f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell# Emacs tags 11099f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwelltags: 11199f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h 11299f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 11399f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellclean: 114271af2a8748583794b570630cfd5a4d12d740da6Brian Paul -rm -f *.o depend 11599f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 11699f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwell 11799f11d0e18e1ff5a433c84d52ffc13b9684c2650Keith Whitwellinclude depend 118