Makefile 3.1 KB

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