#! /bin/sh
# Copyright(c)'1994-2009 by The Givaro group
# This file is part of Givaro.
# Givaro is governed by the CeCILL-B license under French law
# and abiding by the rules of distribution of free software. 
# see the COPYRIGHT file for more details.


prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib

CXX = g++
AR  = ar

OPTFLAGS = -march=armv5te -O2 -pipe -fstack-protector-strong -fno-plt   -fabi-version=6  
GMP_CFLAGS = 
GMP_LIBS   =  -lgmp -lgmpxx

GIVARO_CXXFLAGS = -I${includedir}
GIVARO_LIBDIR = -L${libdir}
GIVARO_LIBS = -lgivaro 

CXXFLAGS += ${OPTFLAGS} 

CXXFLAGS += ${GIVARO_CXXFLAGS} ${GMP_CFLAGS}
LDFLAGS += ${GIVARO_LIBDIR} ${GMP_LIBDIR}
LOADLIBES += ${GIVARO_LIBS} ${GMP_LIBS}

LOADLIBES += ${OPTLIBES}

.SUFFIXES: .o .C .cpp

.C.o:
	${CXX} ${CXXFLAGS} -o $@ -c $<  

.cpp.o:
	${CXX} ${CXXFLAGS} -o $@ -c $<  

.C:
	${CXX} ${CXXFLAGS} $(LDFLAGS) -o $@ $<  $(LOADLIBES)

.cpp:
	${CXX} ${CXXFLAGS} $(LDFLAGS) -o $@ $<  $(LOADLIBES)
