/src/wrappers/posix/library/externals/Makefile

http://github.com/tybor/Liberty · Makefile · 23 lines · 10 code · 5 blank · 8 comment · 0 complexity · 791a73095e076e4099ba2ab11e181bbe MD5 · raw file

  1. ## To avoid an Ubuntu Intrepid Ibex bug.
  2. ## See https://bugs.launchpad.net/ubuntu/+source/gccxml/+bug/293807 for further informations.
  3. ## export GCCXML_COMPILER = gcc-4.5
  4. XML=posix.gcc-xml
  5. HEADER=plugin/c/liberty-posix.h
  6. HEADERS=/usr/include/fcntl.h \
  7. /usr/include/sys/mman.h \
  8. /usr/include/unistd.h \
  9. /usr/include/*/*
  10. wrappers: $(XML)
  11. wrappers-generator --local $(XML) $(HEADERS)
  12. $(XML): $(HEADER)
  13. gccxml $(HEADER) -fxml=$(XML)
  14. ## Ideally here we should make wrappers for include files not already wrapped in common wrapper cluster using a command like
  15. ## (gcc -M ../../../common/library/externals/plugin/c/standard-c-lib.h; gcc -M plugin/c/liberty-posix.h)|sort |uniq --repeated
  16. ## i.e. print the dependecies of standard-c-lib.g and liberty-posix.h, sort
  17. ## them and leave only the lines that are not repeated. Too bad gcc insist putting
  18. ## more than one file on each line and using make syntax....