Makefile 391 B

1234567891011121314151617181920212223
  1. noarg:
  2. $(MAKE) -C ../
  3. PROGS := count_instructions
  4. EXTRA_SOURCES := ../harness.c event.c
  5. all: $(PROGS)
  6. $(PROGS): $(EXTRA_SOURCES)
  7. # loop.S can only be built 64-bit
  8. count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
  9. $(CC) $(CFLAGS) -m64 -o $@ $^
  10. run_tests: all
  11. @-for PROG in $(PROGS); do \
  12. ./$$PROG; \
  13. done;
  14. clean:
  15. rm -f $(PROGS) loop.o
  16. .PHONY: all run_tests clean