FNAME=mx_dio_control
#CC=/usr/libexec/icecc/bin/gcc
#CC=arm-linux-gnueabihf-gcc
#STRIP=arm-linux-gnueabihf-strip

ifeq ($(ARCH), x86_64)
	CC:=gcc
        STRIP:=strip -s
endif
ifeq ($(ARCH), armv71)
	CC:=arm-linux-gnueabihf-gcc
	STRIP:=arm-linux-gnueabihf-strip
endif
release:
	$(CC) -o $(FNAME) $(FNAME).c dio.c -lpthread
	$(STRIP) $(FNAME)
debug:
	$(CC) -DDEBUG -o $(FNAME)-dbg $(FNAME).cxx dio.cxx -lpthread

clean:
	/bin/rm -f $(FNAME) $(FNAME)-dbg *.o
