PageRenderTime 130ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/Makefile

http://github.com/chengchangwu/jonesforth
Makefile | 50 lines | 31 code | 15 blank | 4 comment | 0 complexity | bd1c4fb4bfd02994e14278c7aed04c48 MD5 | raw file
  1. # $Id: Makefile,v 1.9 2007-10-22 18:53:12 rich Exp $
  2. #BUILD_ID_NONE := -Wl,--build-id=none
  3. BUILD_ID_NONE :=
  4. SHELL := /bin/bash
  5. all: jonesforth
  6. jonesforth: jonesforth.S
  7. gcc -m32 -nostdlib -static -Wl,-Ttext,0 $(BUILD_ID_NONE) -o $@ $<
  8. run:
  9. cat jonesforth.f $(PROG) - | ./jonesforth
  10. clean:
  11. rm -f jonesforth perf_dupdrop *~ core .test_*
  12. # Tests.
  13. TESTS := $(patsubst %.f,%.test,$(wildcard test_*.f))
  14. test check: $(TESTS)
  15. test_%.test: test_%.f jonesforth
  16. @echo -n "$< ... "
  17. @rm -f .$@
  18. @cat <(echo ': TEST-MODE ;') jonesforth.f $< <(echo 'TEST') | \
  19. ./jonesforth 2>&1 | \
  20. sed 's/DSP=[0-9]*//g' > .$@
  21. @diff -u .$@ $<.out
  22. @rm -f .$@
  23. @echo "ok"
  24. # Performance.
  25. perf_dupdrop: perf_dupdrop.c
  26. gcc -O3 -Wall -Werror -o $@ $<
  27. run_perf_dupdrop: jonesforth
  28. cat <(echo ': TEST-MODE ;') jonesforth.f perf_dupdrop.f | ./jonesforth
  29. .SUFFIXES: .f .test
  30. .PHONY: test check run run_perf_dupdrop
  31. remote:
  32. scp jonesforth.S jonesforth.f rjones@oirase:Desktop/
  33. ssh rjones@oirase sh -c '"rm -f Desktop/jonesforth; \
  34. gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o Desktop/jonesforth Desktop/jonesforth.S; \
  35. cat Desktop/jonesforth.f - | Desktop/jonesforth arg1 arg2 arg3"'