ref: 452fb868c7e1467a7900dd7623ab8a1b3b6e6efc
parent: 195d13612ce421c0263416e52299464b4c048cc4
parent: e415c3fe702eabda2ce6586c41e754aad3886c68
author: sijchen <sijchen@cisco.com>
date: Thu Oct 23 12:40:22 EDT 2014
Merge pull request #1432 from mstorsjo/rename-makefiles Remove the "platform-" prefix from common shared makefiles
--- /dev/null
+++ b/build/arch.mk
@@ -1,0 +1,17 @@
+ifneq ($(filter %86 x86_64, $(ARCH)),)
+include $(SRC_PATH)build/x86-common.mk
+endif
+ifneq ($(filter-out arm64, $(filter arm%, $(ARCH))),)
+ifeq ($(USE_ASM), Yes)
+ASM_ARCH = arm
+ASMFLAGS += -I$(SRC_PATH)codec/common/arm/
+CFLAGS += -DHAVE_NEON
+endif
+endif
+ifneq ($(filter arm64 aarch64, $(ARCH)),)
+ifeq ($(USE_ASM), Yes)
+ASM_ARCH = arm64
+ASMFLAGS += -I$(SRC_PATH)codec/common/arm64/
+CFLAGS += -DHAVE_NEON_AARCH64
+endif
+endif
--- /dev/null
+++ b/build/msvc-common.mk
@@ -1,0 +1,41 @@
+include $(SRC_PATH)build/arch.mk
+ifeq ($(ASM_ARCH), x86)
+ifeq ($(ENABLE64BIT), Yes)
+ASMFLAGS += -f win64
+ASMFLAGS_PLATFORM = -DWIN64
+else
+ASMFLAGS += -f win32 -DPREFIX
+endif
+else
+endif
+ifeq ($(ASM_ARCH), arm)
+CCAS = gas-preprocessor.pl -as-type armasm -force-thumb -- armasm
+CCASFLAGS = -nologo -DHAVE_NEON
+endif
+
+CC=cl
+CXX=cl
+AR=lib
+CXX_O=-Fo$@
+# -D_VARIADIC_MAX=10 is required to fix building gtest on MSVC 2012, but
+# since we don't (easily) know which version of MSVC we use here, we add
+# it unconditionally. The same issue can also be worked around by adding
+# -DGTEST_HAS_TR1_TUPLE=0 instead, but we prefer this version since it
+# matches what gtest itself does.
+CFLAGS += -nologo -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope -D_VARIADIC_MAX=10
+CXX_LINK_O=-nologo -Fe$@
+AR_OPTS=-nologo -out:$@
+CFLAGS_OPT=-O2 -Ob1 -Oy- -Zi -GF -Gm- -GS -Gy -DNDEBUG
+CFLAGS_DEBUG=-Od -Oy- -Zi -RTC1 -D_DEBUG
+CFLAGS_M32=
+CFLAGS_M64=
+LINK_LOCAL_DIR=
+LINK_LIB=$(1).lib
+LIBSUFFIX=lib
+LIBPREFIX=
+EXEEXT=.exe
+OBJ=obj
+SHAREDLIBSUFFIX=dll
+SHARED=-LD
+SHLDFLAGS=-link -def:openh264.def -implib:$(PROJECT_NAME)_dll.lib
+EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -1,5 +1,5 @@
ARCH = arm
-include $(SRC_PATH)build/platform-arch.mk
+include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = so
NDKLEVEL = 12
ifeq ($(ARCH), arm)
--- a/build/platform-arch.mk
+++ /dev/null
@@ -1,17 +1,0 @@
-ifneq ($(filter %86 x86_64, $(ARCH)),)
-include $(SRC_PATH)build/platform-x86-common.mk
-endif
-ifneq ($(filter-out arm64, $(filter arm%, $(ARCH))),)
-ifeq ($(USE_ASM), Yes)
-ASM_ARCH = arm
-ASMFLAGS += -I$(SRC_PATH)codec/common/arm/
-CFLAGS += -DHAVE_NEON
-endif
-endif
-ifneq ($(filter arm64 aarch64, $(ARCH)),)
-ifeq ($(USE_ASM), Yes)
-ASM_ARCH = arm64
-ASMFLAGS += -I$(SRC_PATH)codec/common/arm64/
-CFLAGS += -DHAVE_NEON_AARCH64
-endif
-endif
--- a/build/platform-darwin.mk
+++ b/build/platform-darwin.mk
@@ -1,4 +1,4 @@
-include $(SRC_PATH)build/platform-arch.mk
+include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = dylib
SHARED = -dynamiclib
CFLAGS += -Wall -fPIC -MMD -MP
--- a/build/platform-freebsd.mk
+++ b/build/platform-freebsd.mk
@@ -1,4 +1,4 @@
-include $(SRC_PATH)build/platform-arch.mk
+include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = so
CFLAGS += -fPIC
LDFLAGS += -lpthread
--- a/build/platform-linux.mk
+++ b/build/platform-linux.mk
@@ -1,4 +1,4 @@
-include $(SRC_PATH)build/platform-arch.mk
+include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = so
CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
LDFLAGS += -lpthread
--- a/build/platform-mingw_nt.mk
+++ b/build/platform-mingw_nt.mk
@@ -1,4 +1,4 @@
-include $(SRC_PATH)build/platform-x86-common.mk
+include $(SRC_PATH)build/x86-common.mk
SHAREDLIBSUFFIX = dll
CFLAGS += -MMD -MP
LDFLAGS +=
--- a/build/platform-msvc-common.mk
+++ /dev/null
@@ -1,41 +1,0 @@
-include $(SRC_PATH)build/platform-arch.mk
-ifeq ($(ASM_ARCH), x86)
-ifeq ($(ENABLE64BIT), Yes)
-ASMFLAGS += -f win64
-ASMFLAGS_PLATFORM = -DWIN64
-else
-ASMFLAGS += -f win32 -DPREFIX
-endif
-else
-endif
-ifeq ($(ASM_ARCH), arm)
-CCAS = gas-preprocessor.pl -as-type armasm -force-thumb -- armasm
-CCASFLAGS = -nologo -DHAVE_NEON
-endif
-
-CC=cl
-CXX=cl
-AR=lib
-CXX_O=-Fo$@
-# -D_VARIADIC_MAX=10 is required to fix building gtest on MSVC 2012, but
-# since we don't (easily) know which version of MSVC we use here, we add
-# it unconditionally. The same issue can also be worked around by adding
-# -DGTEST_HAS_TR1_TUPLE=0 instead, but we prefer this version since it
-# matches what gtest itself does.
-CFLAGS += -nologo -W3 -EHsc -fp:precise -Zc:wchar_t -Zc:forScope -D_VARIADIC_MAX=10
-CXX_LINK_O=-nologo -Fe$@
-AR_OPTS=-nologo -out:$@
-CFLAGS_OPT=-O2 -Ob1 -Oy- -Zi -GF -Gm- -GS -Gy -DNDEBUG
-CFLAGS_DEBUG=-Od -Oy- -Zi -RTC1 -D_DEBUG
-CFLAGS_M32=
-CFLAGS_M64=
-LINK_LOCAL_DIR=
-LINK_LIB=$(1).lib
-LIBSUFFIX=lib
-LIBPREFIX=
-EXEEXT=.exe
-OBJ=obj
-SHAREDLIBSUFFIX=dll
-SHARED=-LD
-SHLDFLAGS=-link -def:openh264.def -implib:$(PROJECT_NAME)_dll.lib
-EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
--- a/build/platform-msvc-wp.mk
+++ b/build/platform-msvc-wp.mk
@@ -1,5 +1,5 @@
ARCH = arm
-include $(SRC_PATH)build/platform-msvc-common.mk
+include $(SRC_PATH)build/msvc-common.mk
CFLAGS_OPT += -MD
CFLAGS_DEBUG += -MDd
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
--- a/build/platform-msvc.mk
+++ b/build/platform-msvc.mk
@@ -1,4 +1,4 @@
-include $(SRC_PATH)build/platform-msvc-common.mk
+include $(SRC_PATH)build/msvc-common.mk
LDFLAGS += user32.lib
CFLAGS_OPT += -MT
CFLAGS_DEBUG += -MTd -Gm
--- a/build/platform-x86-common.mk
+++ /dev/null
@@ -1,23 +1,0 @@
-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)
--- /dev/null
+++ b/build/x86-common.mk
@@ -1,0 +1,23 @@
+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)