Makefile.fpc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Makefile.fpc for Free Pascal libndsfpc 2.x.y Examples
  3. #
  4. [target]
  5. loaders=
  6. programs=dsMotion
  7. [require]
  8. packages=libndsfpc
  9. tools=bin2s mmutil grit
  10. nortl=y
  11. [install]
  12. fpcpackage=y
  13. [compiler]
  14. options=-Xm
  15. [default]
  16. cpu=arm
  17. target=nds
  18. fpcdir=../../../..
  19. [clean]
  20. files=*.elf *.o *.s *.nds *.nef *.h *.bin \
  21. $(BUILD)/*
  22. units=*
  23. [prerules]
  24. BUILD = build
  25. AUDIO_FILES = $(foreach dir,$(notdir $(wildcard audio/*.*)),$(CURDIR)/audio/$(dir))
  26. GFX_FILES = $(foreach dir,gfx,$(notdir $(wildcard $(dir)/*.png)))
  27. [rules]
  28. .NOTPARALLEL:
  29. all: direc fpc_all
  30. direc:
  31. ifneq ($(BUILD), $(CURDIR))
  32. $(MKDIR) $(BUILD)
  33. endif
  34. soundbank.bin.o : $(AUDIO_FILES)
  35. @$(MMUTIL) $^ -d -o$(BUILD)/soundbank.bin -h$(BUILD)/soundbank.h
  36. $(BIN2S) $(BUILD)/soundbank.bin > $(BUILD)/soundbank.bin.s
  37. $(AS) -o $(BUILD)/soundbank.bin.o $(BUILD)/soundbank.bin.s
  38. $(GFX_FILES).o:
  39. $(GRIT) gfx/$(GFX_FILES) -fts -ff gfx/$(basename $(GFX_FILES)).grit -o$(BUILD)/$(GFX_FILES)
  40. $(AS) -o $(BUILD)/$(basename $(GFX_FILES)).o $(BUILD)/$(basename $(GFX_FILES)).s