Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # Top-level Mesa makefile
  2. TOP = .
  3. SUBDIRS = src
  4. # The git command below generates an empty string when we're not
  5. # building in a GIT tree (i.e., building from a release tarball).
  6. default: $(TOP)/configs/current
  7. @$(TOP)/bin/extract_git_sha1
  8. @for dir in $(SUBDIRS) ; do \
  9. if [ -d $$dir ] ; then \
  10. (cd $$dir && $(MAKE)) || exit 1 ; \
  11. fi \
  12. done
  13. all: default
  14. doxygen:
  15. cd doxygen && $(MAKE)
  16. check:
  17. make -C src/glsl/tests check
  18. make -C tests check
  19. clean:
  20. -@touch $(TOP)/configs/current
  21. -@for dir in $(SUBDIRS) ; do \
  22. if [ -d $$dir ] ; then \
  23. (cd $$dir && $(MAKE) clean) ; \
  24. fi \
  25. done
  26. -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
  27. realclean: clean
  28. -rm -rf lib*
  29. -rm -f $(TOP)/configs/current
  30. -rm -f $(TOP)/configs/autoconf
  31. -rm -rf autom4te.cache
  32. -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
  33. -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
  34. distclean: realclean
  35. install:
  36. @for dir in $(SUBDIRS) ; do \
  37. if [ -d $$dir ] ; then \
  38. (cd $$dir && $(MAKE) install) || exit 1 ; \
  39. fi \
  40. done
  41. .PHONY: default doxygen clean realclean distclean install check
  42. # If there's no current configuration file
  43. $(TOP)/configs/current:
  44. @echo
  45. @echo
  46. @echo "Please run './configure' then 'make'"
  47. @echo "See './configure --help' for details"
  48. @echo
  49. @echo "(ignore the following error message)"
  50. @exit 1
  51. # Rules for making release tarballs
  52. PACKAGE_VERSION=8.1-devel
  53. PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
  54. PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
  55. EXTRA_FILES = \
  56. aclocal.m4 \
  57. configure \
  58. tests/Makefile.in \
  59. tests/glx/Makefile.in \
  60. src/glsl/glsl_parser.cpp \
  61. src/glsl/glsl_parser.h \
  62. src/glsl/glsl_lexer.cpp \
  63. src/glsl/glcpp/glcpp-lex.c \
  64. src/glsl/glcpp/glcpp-parse.c \
  65. src/glsl/glcpp/glcpp-parse.h \
  66. src/mesa/main/api_exec_es1.c \
  67. src/mesa/main/api_exec_es1_dispatch.h \
  68. src/mesa/main/api_exec_es1_remap_helper.h \
  69. src/mesa/main/api_exec_es2.c \
  70. src/mesa/main/api_exec_es2_dispatch.h \
  71. src/mesa/main/api_exec_es2_remap_helper.h \
  72. src/mesa/program/lex.yy.c \
  73. src/mesa/program/program_parse.tab.c \
  74. src/mesa/program/program_parse.tab.h
  75. IGNORE_FILES = \
  76. -x autogen.sh
  77. parsers: configure
  78. -@touch $(TOP)/configs/current
  79. $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
  80. $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
  81. $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
  82. # Everything for new a Mesa release:
  83. ARCHIVES = $(PACKAGE_NAME).tar.gz \
  84. $(PACKAGE_NAME).tar.bz2 \
  85. $(PACKAGE_NAME).zip \
  86. tarballs: md5
  87. rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
  88. # Helper for autoconf builds
  89. ACLOCAL = aclocal
  90. ACLOCAL_FLAGS =
  91. AUTOCONF = autoconf
  92. AC_FLAGS =
  93. aclocal.m4: configure.ac acinclude.m4
  94. $(ACLOCAL) $(ACLOCAL_FLAGS)
  95. configure: configure.ac aclocal.m4 acinclude.m4
  96. $(AUTOCONF) $(AC_FLAGS)
  97. manifest.txt: .git
  98. ( \
  99. ls -1 $(EXTRA_FILES) ; \
  100. git ls-files $(IGNORE_FILES) \
  101. ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
  102. ../$(PACKAGE_DIR):
  103. ln -s $(PWD) $@
  104. $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
  105. cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
  106. $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
  107. gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
  108. $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
  109. bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
  110. $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
  111. rm -f $(PACKAGE_NAME).zip ; \
  112. cd .. ; \
  113. zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
  114. mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
  115. md5: $(ARCHIVES)
  116. @-md5sum $(PACKAGE_NAME).tar.gz
  117. @-md5sum $(PACKAGE_NAME).tar.bz2
  118. @-md5sum $(PACKAGE_NAME).zip
  119. am--refresh:
  120. .PHONY: tarballs md5 am--refresh