CXX=g++ C=gcc uname_m := $(shell uname -m) ifeq ($(uname_m),armv7l) CFLAGS=-O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -lrt `pkg-config --cflags --libs glib-2.0` else ifeq ($(uname_m),armv6l) CFLAGS=-O3 -march=armv6 -mfpu=vfp -mfloat-abi=hard -lrt `pkg-config --cflags --libs glib-2.0` else CFLAGS=-O3 `pkg-config --cflags --libs glib-2.0` endif endif %.o: %.c $(C) -c -o $@ $< $(CFLAGS) version_linux.o: version_linux.c $(C) -c -o $@ $< $(CFLAGS) clean: rm -rf *.o version_linux