Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. SYS ?= $(shell gcc -dumpmachine)
  2. export SYS
  3. apps = lmbench gcc busybox lighttpd bash apache make python r openjdk
  4. packed_apps = lmbench
  5. target = pal pal_sec
  6. clean-extra = clean-all
  7. level = ../
  8. include ../Makefile
  9. ifeq ($(SYS),x86_64-linux-gnu)
  10. HOSTDIR =
  11. PAL = $(abspath $(PWD)/../pal_loader)
  12. else
  13. HOSTDIR = /tmp/host
  14. PAL = $(abspath $(PWD)/../pal)
  15. endif
  16. manifest_rules = \
  17. -e 's:\$$(PAL):$(PAL):g' \
  18. -e 's:\$$(PWD):$(PWD)/:g' \
  19. -e 's:\$$(BIN):$(subst .manifest,,$(notdir $@)):g' \
  20. -e 's:\$$(SHIMPATH):$(abspath ../../src/libsysdb.so):g' \
  21. -e 's:\$$(GLIBCDIR):$(abspath $(glibc_dir))/:g' \
  22. -e 's:\$$(HOSTDIR):$(HOSTDIR):g' \
  23. $(extra_rules)
  24. %.manifest: %.manifest.template
  25. sed $(manifest_rules) $< >$@
  26. chmod +x $@
  27. ifeq ($(SYS),x86_64-linux-gnu)
  28. build-all:
  29. for f in $(apps); do (cd $$f; $(MAKE) $(DEBUG) || true; cd ..); done
  30. .PHONY: pack
  31. pack:
  32. for f in $(packed_apps); do (cd $$f; $(MAKE) pack; cd ..); done
  33. else
  34. build-all:
  35. for f in $(packed_apps); do (cd $$f; $(MAKE) || true; cd ..); done
  36. endif
  37. clean-all:
  38. for f in $(apps); do (cd $$f; $(MAKE) clean; cd ..); done