Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. LMBENCHDIR = lmbench-2.5
  2. LINUXDIR = $(LMBENCHDIR)/bin/linux/
  3. host_files = /bin/sh /usr/include/x86_64-linux-gnu/sys/types.h
  4. lmbench_tests = $(addprefix $(LINUXDIR),lat_syscall lat_connect lat_fcntl \
  5. lat_select lat_fs lat_mmap lat_fifo lat_mem_rd lat_msg \
  6. lat_tcp lat_udp lat_unix_connect lat_pagefault \
  7. bw_tcp bw_mem bw_unix lat_proc lat_ctx lat_rpc \
  8. lat_unix lat_sig lat_http lat_pipe \
  9. bw_pipe bw_file_rd bw_mmap_rd lmhttp lmdd)
  10. manifests = $(addprefix $(LINUXDIR),$(patsubst %.template,%,$(wildcard *.manifest.template)) manifest)
  11. target = $(lmbench_tests)
  12. clean-extra = clean-lmbench
  13. level = ../../
  14. include ../../Makefile
  15. export CC
  16. export CFLAGS
  17. $(LINUXDIR)Makefile: Makefile.lmbench
  18. ln -sf ../../../$< $@
  19. build-manifest: $(LINUXDIR) $(LINUXDIR)Makefile
  20. $(MAKE) -C $(LINUXDIR)
  21. $(lmbench_tests): $(LINUXDIR) build-manifest
  22. $(LINUXDIR): $(wildcard $(LMBENCHDIR)/src/*.c) $(wildcard $(LMBENCHDIR)/src/*.h)
  23. $(MAKE) -C $(LMBENCHDIR)/src OS=linux
  24. lmbench_config = $(LINUXDIR)$(shell $(LMBENCHDIR)/scripts/config)
  25. $(lmbench_config):
  26. cd $(LMBENCHDIR)/scripts && env OS=linux ./config-run
  27. test-native: $(lmbench_tests) $(lmbench_config)
  28. cd $(LMBENCHDIR)/scripts && env OS=linux ./results
  29. test-graphene: all $(lmbench_config)
  30. cd $(LMBENCHDIR)/scripts && \
  31. env LOADER=./pal_loader OS=linux RESULTS=results/graphene \
  32. ./results
  33. regression: all
  34. cp -f $(LMBENCHDIR)/lmbench-regression $(LMBENCHDIR)/bin/linux
  35. cd $(LMBENCHDIR)/bin/linux && \
  36. env LOADER=./pal_loader OS=linux \
  37. ./lmbench-regression
  38. clean-lmbench:
  39. $(MAKE) -C $(LMBENCHDIR) clean