Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. include ../../../../Scripts/Makefile.configs
  2. include Makefile.am
  3. CFLAGS += -I. -Iinclude -I../.. -I../../../include -I../../../include/pal \
  4. -I../../../include/host/Linux -I../../../include/lib \
  5. -I../../../linux-kernel/graphene
  6. ASFLAGS += -I. -Iinclude -I../.. -I../../../include
  7. host_files = libpal-Linux.a pal.map
  8. defs = -DIN_PAL -DPAL_DIR=$(PAL_DIR) -DRUNTIME_DIR=$(RUNTIME_DIR)
  9. CFLAGS += $(defs)
  10. ASFLAGS += $(defs)
  11. objs = $(addprefix db_,files devices pipes eventfd sockets streams memory threading \
  12. mutex events process object main rtld misc \
  13. exception) clone-x86_64
  14. graphene_lib = .lib/graphene-lib.a
  15. .PHONY: all
  16. all: $(host_files)
  17. libpal-Linux.a: $(addsuffix .o,$(objs)) $(graphene_lib)
  18. $(call cmd,ar_a_o)
  19. %.o: %.c
  20. $(call cmd,cc_o_c)
  21. %.i: %.c
  22. $(call cmd,cpp_i_c)
  23. %.s: %.c
  24. $(call cmd,cc_s_c)
  25. %.o: %.S
  26. $(call cmd,as_o_S)
  27. %.s: %.S
  28. $(call cmd,cpp_s_S)
  29. include ../../../../Scripts/Makefile.rules
  30. ifeq ($(filter %clean,$(MAKECMDGOALS)),)
  31. -include $(addsuffix .d,$(objs)) $(addsuffix .i.d,$(objs)) $(addsuffix .s.d,$(objs))
  32. endif
  33. CLEAN_FILES += $(notdir $(pal_static) $(pal_lib) $(pal_sec) $(pal_loader))
  34. .PHONY: clean
  35. clean:
  36. $(RM) $(addsuffix .o,$(objs)) $(host_files) $(CLEAN_FILES) \
  37. $(addsuffix .d,$(objs)) $(addsuffix .i.d,$(objs)) \
  38. $(addsuffix .s.d,$(objs))
  39. .PHONY: distclean
  40. distclean: clean
  41. .PHONY: test
  42. test: