openh264/build/x86-common.mk
Martin Storsjö 24f8f2138a Use ARCH instead of ENABLE64BIT for distinguishing between x86 and x86_64
Keep support for the ENABLE64BIT flag (as a flag for choosing between
32 and 64 bit, if the current arch happens to be x86) but avoid using
it in code that wants to know the exact architecture used.

This makes the platform build files more straightforward and
consistent.
2015-04-20 12:22:46 +03:00

29 lines
521 B
Makefile

CFLAGS_M32=-m32
CFLAGS_M64=-m64
ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
ifneq ($(ENABLE64BIT),)
ifeq ($(ENABLE64BIT), Yes)
ARCH = x86_64
else
ARCH = x86
endif
endif
ifeq ($(ARCH), x86_64)
CFLAGS += $(CFLAGS_M64)
LDFLAGS += $(CFLAGS_M64)
ASMFLAGS_PLATFORM = -DUNIX64
else
CFLAGS += $(CFLAGS_M32)
LDFLAGS += $(CFLAGS_M32)
ASMFLAGS_PLATFORM = -DX86_32
endif
ifeq ($(USE_ASM),Yes)
CFLAGS += -DX86_ASM
ifneq ($(ARCH), x86_64)
CFLAGS += -DX86_32_ASM
endif
ASM_ARCH = x86
endif
ASM = nasm
ASMFLAGS += $(ASMFLAGS_PLATFORM)