#	
#
CC=gcc
LIB_VERSION=7.10

SOLIB_OBJ := caio.o
SOLIB_SRC := libcaio.so.$(LIB_VERSION)
SOLIB_DES := /usr/lib

ifeq ($(shell arch),aarch64)
	SOLIB_SRC_DIR := arm64
else ifeq ($(shell arch),armv7l)
	SOLIB_SRC_DIR := arm32
else ifeq ($(shell arch),x86_64)
	SOLIB_SRC_DIR := amd64
else
	SOLIB_SRC_DIR := i386
endif

SOLIB_NAME := libcaio.so

install:	
		cp $(SOLIB_SRC_DIR)/$(SOLIB_SRC) $(SOLIB_DES)
		ln -sf $(SOLIB_DES)/$(SOLIB_SRC) $(SOLIB_DES)/$(SOLIB_NAME)
		ldconfig

clean:
		rm -f $(SOLIB_DES)/$(SOLIB_SRC)
		rm -f $(SOLIB_DES)/$(SOLIB_NAME)
