Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Makefile for ich9deblob utility from libreboot project
  3. #
  4. # Copyright (C) 2014, 2015 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
  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. # for demefactory
  42. # ----------------------------------------------------------------------
  43. obj/demefactory.o:
  44. $(CC) $(CFLAGS) $(NOLINKER) src/demefactory.c -o obj/demefactory.o
  45. # for ich9deblob
  46. # ----------------------------------------------------------------------
  47. obj/ich9deblob.o:
  48. $(CC) $(CFLAGS) $(NOLINKER) src/ich9deblob.c -o obj/ich9deblob.o
  49. # for ich9gen
  50. # ----------------------------------------------------------------------
  51. obj/ich9gen.o:
  52. $(CC) $(CFLAGS) $(NOLINKER) src/ich9gen.c -o obj/ich9gen.o
  53. obj/ich9gen/mkdescriptor.o:
  54. $(CC) $(CFLAGS) $(NOLINKER) src/ich9gen/mkdescriptor.c -o obj/ich9gen/mkdescriptor.o
  55. obj/ich9gen/mkgbe.o:
  56. $(CC) $(CFLAGS) $(NOLINKER) src/ich9gen/mkgbe.c -o obj/ich9gen/mkgbe.o
  57. # for demefactory, ich9deblob and ich9gen:
  58. # ----------------------------------------------------------------------
  59. obj/common/descriptor_gbe.o:
  60. $(CC) $(CFLAGS) $(NOLINKER) src/common/descriptor_gbe.c -o obj/common/descriptor_gbe.o
  61. obj/common/x86compatibility.o:
  62. $(CC) $(CFLAGS) $(NOLINKER) src/common/x86compatibility.c -o obj/common/x86compatibility.o
  63. obj/descriptor/descriptor.o:
  64. $(CC) $(CFLAGS) $(NOLINKER) src/descriptor/descriptor.c -o obj/descriptor/descriptor.o
  65. obj/gbe/gbe.o:
  66. $(CC) $(CFLAGS) $(NOLINKER) src/gbe/gbe.c -o obj/gbe/gbe.o
  67. # make clean
  68. # ----------------------------------------------------------------------
  69. clean:
  70. rm -Rf ich9deblob ich9gen demefactory obj/*.o obj/*/*.o