Advertisement
xerpi

.3ds Makefile

Aug 27th, 2014
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.89 KB | None | 0 0
  1. TARGET  = CHIP-3DS
  2. OBJS    = crt0.o main.o chip-8.o utils.o
  3.  
  4. CC      = arm-none-eabi-gcc
  5. OBJCOPY = arm-none-eabi-objcopy
  6. CFLAGS  = -Wall -std=c99 -march=armv6 -O3 -I"$(CTRULIB)/include"
  7. LDFLAGS = -nostartfiles -nostdlib -T ccd00.ld -L"$(DEVKITARM)/arm-none-eabi/lib" -L"$(CTRULIB)/lib"
  8. LIBS    = -lctru -lm
  9.  
  10. all: $(TARGET).3ds
  11.  
  12. CCI    := $(TARGET).3ds
  13. RSF    := $(TARGET).rsf
  14. ICON   := $(TARGET).icn
  15. BANNER := $(TARGET).bnr
  16. ROMFS  := $(TARGET).romfs
  17.  
  18. $(TARGET).3ds: $(TARGET).elf
  19.     $(MAKEROM) -f cci -o $(CCI) -rsf $(RSF) -target d -exefslogo -elf $(TARGET).elf # -icon $(ICON) -banner $(BANNER)
  20.  
  21. $(TARGET).bin: $(TARGET).elf
  22.     $(OBJCOPY) -O binary $< $@
  23.  
  24. $(TARGET).elf: $(OBJS)
  25.     $(CC) $(LDFLAGS) $(LIBS) $(filter-out crt0.o, $^) -o $@
  26.  
  27. %.o: %.c
  28.     $(CC) $(CFLAGS) -c $< -o $@
  29. %.o: %.s
  30.     $(CC) $(CFLAGS) -c $< -o $@
  31.  
  32. clean:
  33.     @rm -rf $(OBJS) $(TARGET).3ds $(TARGET).elf $(TARGET).bin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement