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 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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. cd src/glsl/tests/ && ./optimization-test
  18. @echo "All tests passed."
  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 choose a configuration from the following list:"
  47. @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
  48. @echo
  49. @echo "Then type 'make <config>' (ex: 'make linux-x86')"
  50. @echo
  51. @echo "Or, run './configure' then 'make'"
  52. @echo "See './configure --help' for details"
  53. @echo
  54. @echo "(ignore the following error message)"
  55. @exit 1
  56. # Rules to set/install a specific build configuration
  57. aix \
  58. aix-64 \
  59. aix-64-static \
  60. aix-gcc \
  61. aix-static \
  62. autoconf \
  63. bluegene-osmesa \
  64. bluegene-xlc-osmesa \
  65. catamount-osmesa-pgi \
  66. darwin \
  67. darwin-fat-32bit \
  68. darwin-fat-all \
  69. freebsd \
  70. freebsd-dri \
  71. freebsd-dri-amd64 \
  72. freebsd-dri-x86 \
  73. hpux10 \
  74. hpux10-gcc \
  75. hpux10-static \
  76. hpux11-32 \
  77. hpux11-32-static \
  78. hpux11-32-static-nothreads \
  79. hpux11-64 \
  80. hpux11-64-static \
  81. hpux11-ia64 \
  82. hpux11-ia64-static \
  83. hpux9 \
  84. hpux9-gcc \
  85. irix6-64 \
  86. irix6-64-static \
  87. irix6-n32 \
  88. irix6-n32-static \
  89. irix6-o32 \
  90. irix6-o32-static \
  91. linux \
  92. linux-i965 \
  93. linux-alpha \
  94. linux-alpha-static \
  95. linux-cell \
  96. linux-cell-debug \
  97. linux-debug \
  98. linux-dri \
  99. linux-dri-debug \
  100. linux-dri-x86 \
  101. linux-dri-x86-64 \
  102. linux-dri-ppc \
  103. linux-dri-xcb \
  104. linux-egl \
  105. linux-indirect \
  106. linux-fbdev \
  107. linux-ia64-icc \
  108. linux-ia64-icc-static \
  109. linux-icc \
  110. linux-icc-static \
  111. linux-llvm \
  112. linux-llvm-debug \
  113. linux-opengl-es \
  114. linux-osmesa \
  115. linux-osmesa-static \
  116. linux-osmesa16 \
  117. linux-osmesa16-static \
  118. linux-osmesa32 \
  119. linux-ppc \
  120. linux-ppc-static \
  121. linux-profile \
  122. linux-sparc \
  123. linux-sparc5 \
  124. linux-static \
  125. linux-ultrasparc \
  126. linux-tcc \
  127. linux-x86 \
  128. linux-x86-debug \
  129. linux-x86-32 \
  130. linux-x86-64 \
  131. linux-x86-64-debug \
  132. linux-x86-64-profile \
  133. linux-x86-64-static \
  134. linux-x86-profile \
  135. linux-x86-static \
  136. netbsd \
  137. openbsd \
  138. osf1 \
  139. osf1-static \
  140. solaris-x86 \
  141. solaris-x86-gcc \
  142. solaris-x86-gcc-static \
  143. sunos4 \
  144. sunos4-gcc \
  145. sunos4-static \
  146. sunos5 \
  147. sunos5-gcc \
  148. sunos5-64-gcc \
  149. sunos5-smp \
  150. sunos5-v8 \
  151. sunos5-v8-static \
  152. sunos5-v9 \
  153. sunos5-v9-static \
  154. sunos5-v9-cc-g++ \
  155. ultrix-gcc:
  156. @ if test -f configs/current -o -L configs/current; then \
  157. if ! cmp configs/$@ configs/current > /dev/null; then \
  158. echo "Please run 'make realclean' before changing configs" ; \
  159. exit 1 ; \
  160. fi ; \
  161. else \
  162. cd configs && rm -f current && ln -s $@ current ; \
  163. fi
  164. $(MAKE) default
  165. # Rules for making release tarballs
  166. PACKAGE_VERSION=7.12-devel
  167. PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
  168. PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
  169. EXTRA_FILES = \
  170. aclocal.m4 \
  171. configure \
  172. src/glsl/glsl_parser.cpp \
  173. src/glsl/glsl_parser.h \
  174. src/glsl/glsl_lexer.cpp \
  175. src/glsl/glcpp/glcpp-lex.c \
  176. src/glsl/glcpp/glcpp-parse.c \
  177. src/glsl/glcpp/glcpp-parse.h \
  178. src/mesa/program/lex.yy.c \
  179. src/mesa/program/program_parse.tab.c \
  180. src/mesa/program/program_parse.tab.h
  181. IGNORE_FILES = \
  182. -x autogen.sh
  183. parsers: configure
  184. -@touch $(TOP)/configs/current
  185. $(MAKE) -C src/glsl glsl_parser.cpp glsl_parser.h glsl_lexer.cpp
  186. $(MAKE) -C src/glsl/glcpp glcpp-lex.c glcpp-parse.c glcpp-parse.h
  187. $(MAKE) -C src/mesa program/lex.yy.c program/program_parse.tab.c program/program_parse.tab.h
  188. # Everything for new a Mesa release:
  189. ARCHIVES = $(PACKAGE_NAME).tar.gz \
  190. $(PACKAGE_NAME).tar.bz2 \
  191. $(PACKAGE_NAME).zip \
  192. tarballs: md5
  193. rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar
  194. # Helper for autoconf builds
  195. ACLOCAL = aclocal
  196. ACLOCAL_FLAGS =
  197. AUTOCONF = autoconf
  198. AC_FLAGS =
  199. aclocal.m4: configure.ac acinclude.m4
  200. $(ACLOCAL) $(ACLOCAL_FLAGS)
  201. configure: configure.ac aclocal.m4 acinclude.m4
  202. $(AUTOCONF) $(AC_FLAGS)
  203. manifest.txt: .git
  204. ( \
  205. ls -1 $(EXTRA_FILES) ; \
  206. git ls-files $(IGNORE_FILES) \
  207. ) | sed -e '/^\(.*\/\)\?\./d' -e "s@^@$(PACKAGE_DIR)/@" > $@
  208. ../$(PACKAGE_DIR):
  209. ln -s $(PWD) $@
  210. $(PACKAGE_NAME).tar: parsers ../$(PACKAGE_DIR) manifest.txt
  211. cd .. ; tar -cf $(PACKAGE_DIR)/$(PACKAGE_NAME).tar -T $(PACKAGE_DIR)/manifest.txt
  212. $(PACKAGE_NAME).tar.gz: $(PACKAGE_NAME).tar ../$(PACKAGE_DIR)
  213. gzip --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.gz
  214. $(PACKAGE_NAME).tar.bz2: $(PACKAGE_NAME).tar
  215. bzip2 --stdout --best $(PACKAGE_NAME).tar > $(PACKAGE_NAME).tar.bz2
  216. $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt
  217. rm -f $(PACKAGE_NAME).zip ; \
  218. cd .. ; \
  219. zip -q -@ $(PACKAGE_NAME).zip < $(PACKAGE_DIR)/manifest.txt ; \
  220. mv $(PACKAGE_NAME).zip $(PACKAGE_DIR)
  221. md5: $(ARCHIVES)
  222. @-md5sum $(PACKAGE_NAME).tar.gz
  223. @-md5sum $(PACKAGE_NAME).tar.bz2
  224. @-md5sum $(PACKAGE_NAME).zip
  225. .PHONY: tarballs md5