Makefile 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. # Makefile for intel6deblob 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: intel6deblob intel6gen
  24. intel6deblob: obj/intel6deblob.o obj/common/descriptor_gbe.o \
  25. obj/descriptor/descriptor.o obj/gbe/gbe.o obj/common/x86compatibility.o
  26. $(CC) $(CFLAGS) obj/intel6deblob.o obj/common/descriptor_gbe.o \
  27. obj/common/x86compatibility.o obj/descriptor/descriptor.o obj/gbe/gbe.o \
  28. -o intel6deblob
  29. intel6gen: obj/intel6gen.o obj/intel6gen/mkdescriptor.o obj/intel6gen/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/intel6gen.o obj/intel6gen/mkdescriptor.o obj/intel6gen/mkgbe.o \
  33. obj/common/descriptor_gbe.o \
  34. obj/common/x86compatibility.o obj/descriptor/descriptor.o obj/gbe/gbe.o \
  35. -o intel6gen
  36. # for intel6deblob
  37. # ----------------------------------------------------------------------
  38. obj/intel6deblob.o:
  39. $(CC) $(CFLAGS) $(NOLINKER) src/intel6deblob.c -o obj/intel6deblob.o
  40. # for intel6gen
  41. # ----------------------------------------------------------------------
  42. obj/intel6gen.o:
  43. $(CC) $(CFLAGS) $(NOLINKER) src/intel6gen.c -o obj/intel6gen.o
  44. obj/intel6gen/mkdescriptor.o:
  45. $(CC) $(CFLAGS) $(NOLINKER) src/intel6gen/mkdescriptor.c -o obj/intel6gen/mkdescriptor.o
  46. obj/intel6gen/mkgbe.o:
  47. $(CC) $(CFLAGS) $(NOLINKER) src/intel6gen/mkgbe.c -o obj/intel6gen/mkgbe.o
  48. # for intel6deblob and intel6gen:
  49. # ----------------------------------------------------------------------
  50. obj/common/descriptor_gbe.o:
  51. $(CC) $(CFLAGS) $(NOLINKER) src/common/descriptor_gbe.c -o obj/common/descriptor_gbe.o
  52. obj/common/x86compatibility.o:
  53. $(CC) $(CFLAGS) $(NOLINKER) src/common/x86compatibility.c -o obj/common/x86compatibility.o
  54. obj/descriptor/descriptor.o:
  55. $(CC) $(CFLAGS) $(NOLINKER) src/descriptor/descriptor.c -o obj/descriptor/descriptor.o
  56. obj/gbe/gbe.o:
  57. $(CC) $(CFLAGS) $(NOLINKER) src/gbe/gbe.c -o obj/gbe/gbe.o
  58. # make clean
  59. # ----------------------------------------------------------------------
  60. clean:
  61. rm -Rf intel6deblob intel6gen obj/*.o obj/*/*.o