Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 16th, 2011  |  syntax: None  |  size: 0.82 KB  |  views: 170  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CC=arm-elf-eabi-gcc
  2. LD=arm-elf-eabi-gcc
  3. AS=arm-elf-eabi-gcc
  4. OC=arm-elf-eabi-objcopy
  5. ELF2SB=./elftosb2
  6. ELF2SB_CMD=recovery.db
  7. ELF2SB_KEY=fuze+_key_file.txt
  8. CFLAGS=-Wall -O2 -std=c99 -nostdlib -ffreestanding -mcpu=arm926ej-s -fomit-frame-pointer
  9. ASFLAGS=$(CFLAGS) -D__ASSEMBLER__
  10. OCFLAGS=
  11. LINKER_FILE=recovery.lds
  12. LDFLAGS=-lgcc -Os -nostdlib -T$(LINKER_FILE) -Wl,-Map,kernel.map
  13. SRC_C=$(wildcard *.c)
  14. SRC_S=$(wildcard *.S)
  15. OBJ_C=$(SRC_C:.c=.o)
  16. OBJ_S=$(SRC_S:.S=.o)
  17. OBJ=$(OBJ_C) $(OBJ_S)
  18. OBJ_EXCEPT_CRT0=$(filter-out crt0.o,$(OBJ))
  19.  
  20. all: recovery.sb
  21.  
  22. %.o: %.c
  23.         $(CC) $(CFLAGS) -c -o $@ $<
  24.  
  25. %.o: %.S
  26.         $(AS) $(ASFLAGS) -c -o $@ $<
  27.        
  28. recovery.elf: $(OBJ)
  29.         $(LD) $(LDFLAGS) -o $@ $(OBJ_EXCEPT_CRT0)
  30.  
  31. recovery.sb: recovery.elf
  32.         $(ELF2SB) -c $(ELF2SB_CMD) -k $(ELF2SB_KEY) -d -V -o $@
  33.  
  34. clean:
  35.         rm -rf $(OBJ)