Makefile 626 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Makefile for Gemin kernel copy stub
  3. #
  4. # Copyright (C) 2019 Linus Walleij <[email protected]>
  5. #
  6. # This program is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License version 2 as published
  8. # by the Free Software Foundation.
  9. #
  10. AS := $(CROSS_COMPILE)as
  11. OBJCOPY := $(CROSS_COMPILE)objcopy
  12. BIN_FLAGS := -O binary -S
  13. all: copy-kernel.bin
  14. # Don't build dependencies, this may die if $(CC) isn't gcc
  15. dep:
  16. install:
  17. %.o : %.S
  18. $(AS) $(ASFLAGS) -k -o $@ $<
  19. %.bin: %.o
  20. $(OBJCOPY) $(BIN_FLAGS) $< $@
  21. mrproper: clean
  22. clean:
  23. rm -f copy-kernel.bin copy-kernel.o