Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #
  2. # Makefile for ich9deblob utility from libreboot project
  3. #
  4. # Copyright (C) 2014, 2015, 2019 Leah Rowe <info@minifree.org>
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. CC=gcc
  20. FORCEC99=-std=c99
  21. CFLAGS=-I. -Wall -Wextra -g $(FORCEC99)
  22. NOLINKER=-c
  23. all: ich9deblob ich9gen demefactory ich9show
  24. ich9deblob: obj/ich9deblob.o obj/common/descriptor_gbe.o \
  25. obj/descriptor/descriptor.o obj/gbe/gbe.o obj/common/x86compatibility.o
  26. $(CC) $(CFLAGS) obj/ich9deblob.o obj/common/descriptor_gbe.o \
  27. obj/common/x86compatibility.o obj/descriptor/descriptor.o obj/gbe/gbe.o \
  28. -o ich9deblob
  29. ich9gen: obj/ich9gen.o obj/ich9gen/mkdescriptor.o obj/ich9gen/mkgbe.o \
  30. obj/common/descriptor_gbe.o \
  31. obj/descriptor/descriptor.o obj/gbe/gbe.o obj/common/x86compatibility.o
  32. $(CC) $(CFLAGS) obj/ich9gen.o obj/ich9gen/mkdescriptor.o obj/ich9gen/mkgbe.o \
  33. obj/common/descriptor_gbe.o \
  34. obj/common/x86compatibility.o obj/descriptor/descriptor.o obj/gbe/gbe.o \
  35. -o ich9gen
  36. demefactory: obj/demefactory.o obj/common/descriptor_gbe.o \
  37. obj/descriptor/descriptor.o obj/gbe/gbe.o obj/common/x86compatibility.o
  38. $(CC) $(CFLAGS) obj/demefactory.o obj/common/descriptor_gbe.o \
  39. obj/common/x86compatibility.o obj/descriptor/descriptor.o obj/gbe/gbe.o \
  40. -o demefactory
  41. ich9show: obj/ich9show.o obj/common/descriptor_gbe.o \
  42. obj/descriptor/descriptor.o obj/gbe/gbe.o obj/common/x86compatibility.o
  43. $(CC) $(CFLAGS) obj/ich9show.o obj/common/descriptor_gbe.o \
  44. obj/common/x86compatibility.o obj/descriptor/descriptor.o obj/gbe/gbe.o \
  45. -o ich9show
  46. # for demefactory
  47. # ----------------------------------------------------------------------
  48. obj/demefactory.o:
  49. $(CC) $(CFLAGS) $(NOLINKER) src/demefactory.c -o obj/demefactory.o
  50. # for ich9deblob
  51. # ----------------------------------------------------------------------
  52. obj/ich9deblob.o:
  53. $(CC) $(CFLAGS) $(NOLINKER) src/ich9deblob.c -o obj/ich9deblob.o
  54. # for ich9show
  55. # ----------------------------------------------------------------------
  56. obj/ich9show.o:
  57. $(CC) $(CFLAGS) $(NOLINKER) src/ich9show.c -o obj/ich9show.o
  58. # for ich9gen
  59. # ----------------------------------------------------------------------
  60. obj/ich9gen.o:
  61. $(CC) $(CFLAGS) $(NOLINKER) src/ich9gen.c -o obj/ich9gen.o
  62. obj/ich9gen/mkdescriptor.o:
  63. $(CC) $(CFLAGS) $(NOLINKER) src/ich9gen/mkdescriptor.c -o obj/ich9gen/mkdescriptor.o
  64. obj/ich9gen/mkgbe.o:
  65. $(CC) $(CFLAGS) $(NOLINKER) src/ich9gen/mkgbe.c -o obj/ich9gen/mkgbe.o
  66. # for demefactory, ich9deblob and ich9gen:
  67. # ----------------------------------------------------------------------
  68. obj/common/descriptor_gbe.o:
  69. $(CC) $(CFLAGS) $(NOLINKER) src/common/descriptor_gbe.c -o obj/common/descriptor_gbe.o
  70. obj/common/x86compatibility.o:
  71. $(CC) $(CFLAGS) $(NOLINKER) src/common/x86compatibility.c -o obj/common/x86compatibility.o
  72. obj/descriptor/descriptor.o:
  73. $(CC) $(CFLAGS) $(NOLINKER) src/descriptor/descriptor.c -o obj/descriptor/descriptor.o
  74. obj/gbe/gbe.o:
  75. $(CC) $(CFLAGS) $(NOLINKER) src/gbe/gbe.c -o obj/gbe/gbe.o
  76. # make clean
  77. # ----------------------------------------------------------------------
  78. clean:
  79. rm -Rf ich9deblob ich9gen demefactory ich9show obj/*.o obj/*/*.o *.bin