Makefile 974 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # If you copy this file for an Enyo/Amber project, just
  3. # modify these first two lines
  4. # and then add .st files as you please. This Makefile
  5. # should pick them all up and compile into Program.js.
  6. #
  7. PACKAGE := amber.helloamber
  8. VERSION := 1.0.0
  9. # -O for Closure optimization of js code.
  10. FLAGS := -O
  11. IPK := $(PACKAGE)_$(VERSION)_all.ipk
  12. FILE := Program
  13. SOURCES := $(wildcard *.st)
  14. OBJECTS := $(patsubst %.st,%.js,$(wildcard *.st))
  15. FILEJS := $(FILE).js
  16. $(FILEJS): $(SOURCES)
  17. ../../../bin/amberc $(FLAGS) $(SOURCES) $(FILE)
  18. $(IPK): $(FILEJS)
  19. palm-package .
  20. clean:
  21. rm -f $(FILEJS) $(OBJECTS) $(IPK)
  22. palm-install -r $(PACKAGE)
  23. install: $(IPK)
  24. palm-install $(IPK)
  25. # If you want to run it in the emulator, start the emulator first with palm-emulator
  26. run: $(IPK)
  27. palm-install $(IPK)
  28. palm-launch $(PACKAGE)
  29. # This should fire it up in Chromium (at least under Ubuntu)
  30. chromium: $(FILEJS)
  31. chromium-browser --allow-file-access-from-files index.html