2010-05-30 17:46:36 +03:00
|
|
|
####### openwrt-xburst path
|
|
|
|
|
|
|
|
BASEPATH = /home/fcarello/Projects/openwrt-xburst
|
2010-10-20 08:21:35 +03:00
|
|
|
TARGETPATH ?= $(BASEPATH)/staging_dir/target-mipsel_uClibc-0.9.32
|
2010-05-30 17:46:36 +03:00
|
|
|
|
|
|
|
####### Compiler, tools and options
|
|
|
|
|
2010-10-20 08:21:35 +03:00
|
|
|
CC = mipsel-openwrt-linux-gcc
|
|
|
|
STRIP = mipsel-openwrt-linux-strip
|
2010-05-30 20:07:02 +03:00
|
|
|
CFLAGS := $(CFLAGS) -pipe -O2 -fomit-frame-pointer -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -Wall -W -D_REENTRANT
|
2010-05-30 18:42:50 +03:00
|
|
|
INCPATH = -I$(TARGETPATH)/usr/include/ -I$(TARGETPATH)/usr/include/SDL -I.
|
2010-10-20 08:21:35 +03:00
|
|
|
LIBS = -L$(TARGETPATH)/usr/lib/ -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lfreetype -ldirectfb -ldirect -lfusion -lz -lpthread
|
2010-05-30 17:46:36 +03:00
|
|
|
|
|
|
|
SOURCE1 = sdl-imageviewer.c
|
|
|
|
TARGET1 = imgv
|
|
|
|
|
|
|
|
####### Build rules
|
|
|
|
|
2010-05-30 18:42:50 +03:00
|
|
|
all:
|
2010-05-30 17:46:36 +03:00
|
|
|
$(CC) $(CFLAGS) $(INCPATH) $(SOURCE1) -o $(TARGET1) $(LIBS)
|
|
|
|
$(STRIP) $(TARGET1)
|
2010-05-30 18:42:50 +03:00
|
|
|
clean:
|
|
|
|
rm -f $(TARGET1)
|
2010-10-20 08:21:35 +03:00
|
|
|
|