Makefile 1.3 KB

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