Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ## The MIT License
  2. ##
  3. ## Copyright (c) 2008 Ulf Wiger <ulf@wiger.net>,
  4. ##
  5. ## Permission is hereby granted, free of charge, to any person obtaining a
  6. ## copy of this software and associated documentation files (the "Software"),
  7. ## to deal in the Software without restriction, including without limitation
  8. ## the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. ## and/or sell copies of the Software, and to permit persons to whom the
  10. ## Software is furnished to do so, subject to the following conditions:
  11. ##
  12. ## The above copyright notice and this permission notice shall be included in
  13. ## all copies or substantial portions of the Software.
  14. ##
  15. ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. ## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  18. ## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. ## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. ## DEALINGS IN THE SOFTWARE.
  22. .SUFFIXES: .erl .beam
  23. APP = gproc
  24. vpath %.beam ../ebin
  25. vpath %.pdf ../doc
  26. ERLC = erlc -W -I ../include -o ../ebin
  27. ERLC += +debug_info
  28. #EQC ?= /host/dev/eqc-1.16
  29. EQC_ERLC = $(ERLC) -pa $(EQC)/ebin -I ../include -DEQC
  30. EQC_ERL = erl -pz ../ebin -pz $(EQC)/ebin -pz ../test/eqc
  31. SOURCES = $(wildcard *.erl)
  32. beams = gproc.beam \
  33. gproc_app.beam \
  34. gproc_dist.beam \
  35. gproc_lib.beam \
  36. gproc_sup.beam
  37. all : $(beams)
  38. clean :
  39. rm -f *~ ../ebin/*.beam ../test/eqc/*.beam
  40. ## erlc targets
  41. $(beams) : %.beam : %.erl
  42. $(ERLC) $<
  43. ../test/eqc/gproc_eqc_tests.beam : ../test/eqc/gproc_eqc_tests.erl
  44. $(EQC_ERLC) $<
  45. ../test/eqc/gproc_pulse.beam : ../test/eqc/gproc_pulse.erl
  46. $(EQC_ERLC) $<
  47. doc: ../doc/edoc-info
  48. ../doc/edoc-info: ../doc/overview.edoc $(SOURCES)
  49. erl -noshell -eval 'edoc:application($(APP),"..",[])' -s init stop
  50. ## test targets
  51. eunit: all
  52. erl -noshell -boot start_clean -sasl errlog_type error \
  53. -pa ../ebin -eval 'eunit:test("../ebin", [verbose])' -s init stop
  54. eqc : all ../test/eqc/gproc_eqc_tests.beam
  55. $(EQC_ERL) -s gproc_eqc_tests run -s erlang halt
  56. itest : all ../test/eqc/gproc_eqc_tests.beam
  57. $(EQC_ERL) -s eqc start
  58. pulsetest : all ../test/eqc/gproc_pulse.beam
  59. $(EQC_ERL) -pa ../../scheduler_msg -pa -s eqc start