/src/wrappers/llvm/library/externals/Makefile

http://github.com/tybor/Liberty · Makefile · 24 lines · 13 code · 6 blank · 5 comment · 0 complexity · a67cbc8f1921c7ab66d859e70b83e157 MD5 · raw file

  1. XML=llvm.gcc-xml
  2. HEADER=plugin/c/llvm-liberty.h
  3. HEADERS=`llvm-config --includedir`/llvm-c/*
  4. LLVM_VERSION=`llvm-config --version`
  5. .PHONY: clean
  6. wrappers: $(XML)
  7. wrappers_generator --verbose $(XML) $(HEADERS)
  8. $(XML):
  9. @echo "Using LLVM $(LLVM_VERSION)"
  10. gccxml `llvm-config --cppflags` $(HEADER) -fxml=$(XML)
  11. ## Sometimes gccxml cannot process sources behaving like the default compiler.
  12. ## We force it to try to behave like versions known to work until it finds one that is actually available.
  13. ## See https://bugs.launchpad.net/ubuntu/+source/gccxml/+bug/293807 for further informations.
  14. ## gccxml --gccxml-compiler gcc-4.2 `llvm-config --cflags all` $(HEADER) -fxml=$(XML) || \
  15. ## gccxml --gccxml-compiler gcc-4.1 `llvm-config --cflags all` $(HEADER) -fxml=$(XML)
  16. clean:
  17. @echo Removing generated files
  18. rm $(XML) *.e