Hacking with Makefile for machine architecture detection

# SPDX-License-Identifier: GPL-2.0
INCLUDEDIR := -I.
CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g

TEST_GEN_FILES := adi-test
UNAME := $(shell uname -m)

all: $(TEST_GEN_FILES)	

$(TEST_GEN_FILES): adi-test.c 
ifeq ($(UNAME), sparc64)
	$(info Machine architecture does match)
else
	$(info exit)
	$(error Machine architecture does not match)
endif  

TEST_PROGS := drivers_test.sh

include ../../lib.mk

$(OUTPUT)/adi-test: adi-test.c