27499895f7
This allows building two versions for different architectures at the same time, without the built files clobbering each other. This is very helpful when trying to track down differences between two build configurations. To build outside of the source tree, create the other directory to use for building (either outside of the openh264 directory, or as a subdirectory), enter that directory, and do "make -f path/to/openh264/Makefile".
24 lines
454 B
Makefile
24 lines
454 B
Makefile
CFLAGS_M32=-m32
|
|
CFLAGS_M64=-m64
|
|
ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
|
|
ifeq (, $(ENABLE64BIT))
|
|
ifeq ($(ARCH), x86_64)
|
|
ENABLE64BIT=Yes
|
|
endif
|
|
endif
|
|
ifeq ($(ENABLE64BIT), Yes)
|
|
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
|
|
ASM_ARCH = x86
|
|
endif
|
|
ASM = nasm
|
|
ASMFLAGS += $(ASMFLAGS_PLATFORM)
|