Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. # Module Name:
  11. #
  12. # BIOS UEFI Firmware
  13. #
  14. # Abstract:
  15. #
  16. # This module implements a UEFI-compatible firmware layer on top of a
  17. # legacy PC/AT BIOS.
  18. #
  19. # Author:
  20. #
  21. # Evan Green 26-Feb-2014
  22. #
  23. # Environment:
  24. #
  25. # Firmware
  26. #
  27. ################################################################################
  28. include $(SRCDIR)/../common
  29. BINARY := biosfw.elf
  30. BINARYTYPE = staticapp
  31. BINPLACE = bin
  32. VPATH += $(BINROOT):
  33. LDFLAGS += -nodefaultlibs -nostartfiles -nostdlib
  34. OBJS += acpi.o \
  35. bioscall.o \
  36. biosfwv.o \
  37. disk.o \
  38. debug.o \
  39. fwvol.o \
  40. intr.o \
  41. main.o \
  42. memmap.o \
  43. timer.o \
  44. video.o \
  45. X86_OBJS = x86/entry.o \
  46. x86/realmexe.o \
  47. TEXT_ADDRESS = 0x100000
  48. TARGETLIBS += $(OBJROOT)/os/uefi/dev/ns16550/ns16550.a \
  49. EXTRA_SRC_DIRS = x86
  50. DIRS = runtime
  51. include $(SRCROOT)/os/minoca.mk
  52. postbuild: biosfw.bin
  53. biosfw.bin: $(BINARY)
  54. @echo Flattening - $(notdir $<)
  55. @$(OBJCOPY) -O binary $< $@
  56. @cp -p $@ $(BINROOT)/
  57. ##
  58. ## Define the target that creates the firmware volume object file.
  59. ##
  60. FWVOL_IMAGES = $(RTBASE) runtime/biosrt.ffs
  61. biosfwv.o: biosfwv
  62. biosfwv: $(FWVOL_IMAGES)
  63. @echo Generating - $@
  64. @genfv -o $@ $^
  65. runtime/biosrt.ffs: runtime