gba-x3dtest

diff Makefile.sdl @ 17:0a7f402892b3

texture mapping
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 26 Jun 2014 06:57:51 +0300
parents 02cf4011f566
children
line diff
     1.1 --- a/Makefile.sdl	Wed Jun 25 18:18:05 2014 +0300
     1.2 +++ b/Makefile.sdl	Thu Jun 26 06:57:51 2014 +0300
     1.3 @@ -1,12 +1,13 @@
     1.4  # vi:set filetype=make:
     1.5  src = $(filter-out src/main.c,$(wildcard src/*.c)) $(wildcard src/sdlsys/*.c)
     1.6 -obj = $(src:.c=.x86.o)
     1.7 +imgfiles = $(wildcard *.png)
     1.8 +obj = $(src:.c=.x86.o) $(imgfiles:.png=.img.x86.o)
     1.9  dep = $(obj:.o=.d)
    1.10  bin = x3dtest
    1.11  
    1.12  warn = -Wall -Wno-unused-function
    1.13  
    1.14 -CFLAGS = -pedantic $(warn) -g `pkg-config sdl --cflags` -Isrc -Isrc/sdlsys
    1.15 +CFLAGS = -pedantic $(warn) -g `pkg-config sdl --cflags` -I. -Isrc -Isrc/sdlsys
    1.16  LDFLAGS = `pkg-config sdl --libs` -lm
    1.17  
    1.18  $(bin): $(obj)
    1.19 @@ -20,6 +21,9 @@
    1.20  %.x86.d: %.c
    1.21  	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.22  
    1.23 +%.img.c: %.png
    1.24 +	img2gba $<
    1.25 +
    1.26  .PHONY: clean
    1.27  clean:
    1.28  	rm -f $(obj) $(bin)