PageRenderTime 55ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Examples/chicken/egg/Makefile

#
Makefile | 39 lines | 25 code | 9 blank | 5 comment | 4 complexity | d16fc907b2bc7d67045d0441194ef141 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. SWIG = ../../../preinst-swig
  2. all: single multi
  3. # This creates an egg which contains only the single module. Any additional implementation files
  4. # that implement the interface being wrapped should also be added to this egg
  5. single: single_wrap.cxx
  6. mkdir -p eggs
  7. tar czf eggs/single.egg single.setup single.scm single_wrap.cxx
  8. rm -f single.scm single_wrap.cxx
  9. # complie the single module with -nounit
  10. single_wrap.cxx: single.i
  11. $(SWIG) -chicken -c++ -proxy -nounit single.i
  12. # Now build both mod1 and mod2 into a single egg
  13. multi: mod1_wrap.cxx mod2_wrap.cxx
  14. mkdir -p eggs
  15. tar czf eggs/multi.egg multi.setup multi_init.scm mod1.scm mod1_wrap.cxx mod2.scm mod2_wrap.cxx
  16. rm -f mod1.scm mod1_wrap.cxx mod2.scm mod2_wrap.cxx
  17. mod1_wrap.cxx: mod1.i
  18. $(SWIG) -chicken -c++ -proxy mod1.i
  19. mod2_wrap.cxx: mod2.i
  20. $(SWIG) -chicken -c++ -proxy mod2.i
  21. clean:
  22. rm -rf eggs
  23. # this part is for testing...
  24. setup:
  25. cd eggs && \
  26. mkdir -p install && \
  27. chicken-setup -repository `pwd`/install single.egg && \
  28. chicken-setup -repository `pwd`/install multi.egg
  29. check:
  30. cd eggs/install && csi ../../test.scm