I have a source file that needs to be compiled for ARM A-32. A-32 includes ARMv4 and ARMv7 (but not Aarch32 or Aarch64). Our GNU makefile has:
IS_ARM32 := $(shell echo "$(HOSTX)" | $(GREP) -i -c -E 'arm|armhf|arm7l|eabihf')
...
ifeq ($(IS_ARM32),1)
AES_ARCH = -march=armv7-a -marm
SRCS += aes-armv4.S
endif
...
ifeq ($(IS_ARM32),1)
aes-armv4.o : aes-armv4.S
$(CC) $(strip $(CXXFLAGS) $(AES_ARCH) -mfloat-abi=$(FP_ABI) -c) $<
endif
According to the Conditional Compilation using Automake Conditionals manual:
An often simpler way to compile source files conditionally is to use Automake conditionals. For instance, you could use this Makefile.am construct to build the same hello example:
bin_PROGRAMS = hello if LINUX hello_SOURCES = hello-linux.c hello-common.c else hello_SOURCES = hello-generic.c hello-common.c endif
In this case, configure.ac should setup the LINUX conditional using AM_CONDITIONAL (see Conditionals).
Following the link to conditionals I don't see a list of the conditionals like LINUX
as used in the example. It also lacks a discussion of conditional compilation for architectures, like ARM and PowerPC.
What conditional does Automake use for ARM A-32?
Or how does one conditionally compile for ARM A-32?