Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. # leave these lines alone
  2. .SUFFIXES: .erl .beam .yrl
  3.  
  4. .erl.beam:
  5. erlc -W $<
  6.  
  7. .yrl.erl:
  8. erlc -W $<
  9.  
  10. ERL = erl -boot start_clean
  11.  
  12. # Here's a list of the erlang modules you want compiling
  13. # If the modules don't fit onto one line add a \ character
  14. # to the end of the line and continue on the next line
  15.  
  16. # Edit the lines below
  17. MODS = module1 module2 \
  18. module3 ... special1 ...\
  19. ...
  20. moduleN
  21.  
  22. # The first target in any makefile is the default target.
  23. # If you just type "make" then "make all" is assumed (because
  24. # "all" is the first target in this makefile)
  25.  
  26. all: compile
  27.  
  28. compile: ${MODS:%=%.beam} subdirs
  29.  
  30. ## special compilation requirements are added here
  31.  
  32. special1.beam: special1.erl
  33. ${ERL} -Dflag1 -W0 special1.erl
  34.  
  35. ## run an application from the makefile
  36.  
  37. application1: compile
  38. ${ERL} -pa Dir1 -s application1 start Arg1 Arg2
  39.  
  40. # the subdirs target compiles any code in
  41. # sub-directories
  42.  
  43. subdirs:
  44. cd dir1; make
  45. cd dir2; make
  46. ...
  47.  
  48. # remove all the code
  49.  
  50. clean:
  51. rm -rf *.beam erl_crash.dump
  52. cd dir1; make clean
  53. cd dir2; make clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement