Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. ################################################################################
  2. #
  3. # Copyright (c) 2012 Minoca Corp. All Rights Reserved
  4. #
  5. # Binary Name:
  6. #
  7. # Kernel
  8. #
  9. # Abstract:
  10. #
  11. # This is the core of the operating system.
  12. #
  13. # Author:
  14. #
  15. # Evan Green 26-Jul-2012
  16. #
  17. # Environment:
  18. #
  19. # Kernel
  20. #
  21. ################################################################################
  22. BINARY = kernel
  23. BINPLACE = bin
  24. BINARYTYPE = so
  25. ##
  26. ## Link in all object files of the included libraries as they are exported.
  27. ##
  28. EXTRA_LDFLAGS += -Wl,--whole-archive
  29. ENTRY = KepStartSystem
  30. ifeq (armv7, $(ARCH))
  31. ARCHLIB = $(OBJROOT)/os/kernel/armv7/armsup.a
  32. endif
  33. ifeq (armv6, $(ARCH))
  34. ARCHLIB = $(OBJROOT)/os/kernel/armv6/armsup.a
  35. endif
  36. ifeq (x86, $(ARCH))
  37. ARCHLIB = $(OBJROOT)/os/kernel/x86/x86sup.a
  38. endif
  39. TARGETLIBS = $(OBJROOT)/$(THISDIR)/acpi/acpi.a \
  40. $(OBJROOT)/os/lib/crypto/crypto.a \
  41. $(OBJROOT)/$(THISDIR)/ob/ob.a \
  42. $(OBJROOT)/os/lib/rtl/base/basertl.a \
  43. $(OBJROOT)/os/lib/rtl/kmode/krtl.a \
  44. $(OBJROOT)/os/lib/im/im.a \
  45. $(OBJROOT)/os/lib/basevid/basevid.a \
  46. $(OBJROOT)/os/lib/termlib/termlib.a \
  47. $(OBJROOT)/$(THISDIR)/kd/kd.a \
  48. $(OBJROOT)/$(THISDIR)/kd/kdusb/kdusb.a \
  49. $(OBJROOT)/$(THISDIR)/ps/ps.a \
  50. $(OBJROOT)/$(THISDIR)/ke/ke.a \
  51. $(OBJROOT)/$(THISDIR)/io/io.a \
  52. $(OBJROOT)/$(THISDIR)/hl/hl.a \
  53. $(OBJROOT)/$(THISDIR)/mm/mm.a \
  54. $(OBJROOT)/$(THISDIR)/sp/sp.a \
  55. $(ARCHLIB) \
  56. OBJS = init.o
  57. DIRS = mm \
  58. ob \
  59. acpi \
  60. hl \
  61. io \
  62. ke \
  63. ps \
  64. x86 \
  65. armv7 \
  66. armv6 \
  67. kd \
  68. sp \
  69. include $(SRCROOT)/os/minoca.mk
  70. $(OBJROOT)/$(THISDIR)/acpi/acpi.a: acpi
  71. $(OBJROOT)/$(THISDIR)/ob/ob.a: ob
  72. $(OBJROOT)/$(THISDIR)/kd/kd.a: kd
  73. $(OBJROOT)/$(THISDIR)/kd/kdusb/kdusb.a: kd
  74. $(OBJROOT)/$(THISDIR)/ps/ps.a: ps
  75. $(OBJROOT)/$(THISDIR)/ke/ke.a: ke
  76. $(OBJROOT)/$(THISDIR)/io/io.a: io
  77. $(OBJROOT)/$(THISDIR)/hl/hl.a: hl
  78. $(OBJROOT)/$(THISDIR)/mm/mm.a: mm
  79. $(OBJROOT)/$(THISDIR)/sp/sp.a: sp
  80. $(ARCHLIB): armv7 armv6 x86
  81. VPATH += $(BINROOT)
  82. postbuild: $(BINROOT)/dev2drv.set $(BINROOT)/devmap.set $(BINROOT)/init.set
  83. postbuild: $(BINROOT)/init.sh
  84. $(BINROOT)/dev2drv.set: config/dev2drv.set
  85. @cp -pv $^ $@
  86. $(BINROOT)/devmap.set: config/devmap.set
  87. @cp -pv $^ $@
  88. $(BINROOT)/init.set: config/init.set
  89. @cp -pv $^ $@
  90. $(BINROOT)/init.sh: config/init.sh
  91. @cp -pv $^ $@