TOOLCHAIN       ?= /usr/local/pandora/arm-2009q3
CROSS_COMPILE   ?= $(TOOLCHAIN)/bin/arm-none-linux-gnueabi-
PANDORA_LIBPATH ?= $(PREFIX)/lib
PANDORA_INCPATH ?= $(PREFIX)/include

CC              = $(CROSS_COMPILE)gcc
CXX             = $(CROSS_COMPILE)g++
AR              = $(CROSS_COMPILE)ar
OBJCOPY         = $(CROSS_COMPILE)objcopy
STRIP           = $(CROSS_COMPILE)strip --strip-unneeded

ARCH_CFLAGS     = -march=armv7-a -mtune=cortex-a8 -fPIC -I$(PANDORA_INCPATH)
ARCH_CXXFLAGS   = $(ARCH_CFLAGS)

ARCH_LDFLAGS    = -L$(PANDORA_LIBPATH)

LIBPNG_CFLAGS   = -I$(PANDORA_INCPATH)/libpng12
LIBPNG_LDFLAGS  = -lpng12 -lz

ifeq (${BUILD_LIBSDL2},)
SDL_CFLAGS      = $(shell $(TOOLCHAIN)/usr/bin/sdl-config --cflags)
SDL_LDFLAGS     = $(shell $(TOOLCHAIN)/usr/bin/sdl-config --libs)
else
SDL_CFLAGS      = $(shell $(TOOLCHAIN)/usr/bin/sdl2-config --cflags)
SDL_LDFLAGS     = $(shell $(TOOLCHAIN)/usr/bin/sdl2-config --libs)
endif

DSOLDFLAGS      = -shared
DSOPRE          = lib
DSOPOST         = .so
DSORPATH        = -Wl,-rpath,$(LIBDIR)
DSOSONAME       = -Wl,-soname,

include arch/zip.inc
