SHELL = /bin/sh

CC = arm-elina-linux-gnueabi-g++ -mfpu=vfp -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi
#CFLAGS =   -pipe -g -feliminate-unused-debug-types -O3 -fomit-frame-pointer
CPPFLAGS = 
CCFLAGS = -O2 -pipe -g -feliminate-unused-debug-types -fPIC
AR=arm-elina-linux-gnueabi-ar

INCLUDES = -I/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi/usr/include -I/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi/usr/include/gstreamer-1.0 -I/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi/usr/lib/gstreamer-1.0/include  -I/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi/usr/include/glib-2.0 -I/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi/usr/lib/glib-2.0/include

LDFLAGS = -L/opt/elina/2.0.2015143A.orinoco/sysroots/cortexa9hf-vfp-neon-elina-linux-gnueabi/usr/lib/

SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp = .o)
		

TEST_APP = testApp

.PHONY: all clean
all: $(TEST_APP)

$(TEST_APP): main.o
	 $(CC) $^ -o $@ $(LDFLAGS) -lgstreamer-1.0 -lgstapp-1.0 -lglib-2.0 -lgobject-2.0 -lstdc++ -Wl,--no-as-needed -ldl
	 
	 
%.o : %.cpp
	$(CC) -c $< $(CCFLAGS) $(INCLUDES)
			

clean:
	rm -f ./$(TEST_APP) *.o

	
