gba-x3dtest

diff Makefile @ 17:0a7f402892b3

texture mapping
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 26 Jun 2014 06:57:51 +0300
parents 02cf4011f566
children f907b2c50a8b
line diff
     1.1 --- a/Makefile	Wed Jun 25 18:18:05 2014 +0300
     1.2 +++ b/Makefile	Thu Jun 26 06:57:51 2014 +0300
     1.3 @@ -1,5 +1,6 @@
     1.4  src = $(filter-out src/main_sdl.c,$(wildcard src/*.c))
     1.5 -obj = $(src:.c=.o)
     1.6 +imgfiles = $(wildcard *.png)
     1.7 +obj = $(src:.c=.o) $(imgfiles:.png=.img.o)
     1.8  dep = $(obj:.o=.d)
     1.9  name = x3dtest
    1.10  elf = $(name).elf
    1.11 @@ -18,7 +19,7 @@
    1.12  opt = -O3 -fomit-frame-pointer -mcpu=arm7tdmi -mtune=arm7tdmi
    1.13  #dbg = -g
    1.14  
    1.15 -CFLAGS = $(opt) $(dbg) -pedantic -Wall -I../gbasys/src
    1.16 +CFLAGS = $(opt) $(dbg) -pedantic -Wall -I. -I../gbasys/src
    1.17  LDFLAGS = ../gbasys/libgbasys.a -lm
    1.18  EMUFLAGS = -T 100 -f 1
    1.19  
    1.20 @@ -45,6 +46,9 @@
    1.21  %.d: %.c
    1.22  	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.23  
    1.24 +%.img.c: %.png
    1.25 +	img2gba $<
    1.26 +
    1.27  .PHONY: clean
    1.28  clean:
    1.29  	rm -f $(obj) $(dep) $(bin) $(bin_mb) $(elf) $(elf_mb)