1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this
3
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
topsrcdir = @top_srcdir@
10
include $(DEPTH)/config/autoconf.mk
15
CC_BASE = $(shell basename $(CC))
17
ifeq ($(CC_BASE),clang)
18
LDFLAGS += -dynamiclib -install_name @executable_path/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1 -single_module
21
LDFLAGS += -shared -Wl,-Bsymbolic
24
$(error "Unknown compiler. please specify compiler and linker options (CFLAGS and LDFLAGS)")
28
ifeq ($(OS_ARCH),WINNT)
33
objfiles = subprocess.$(OBJ_SUFF)
34
libname = $(DLL_PREFIX)subprocess$(DLL_SUFFIX)
39
$(CC) $(LDFLAGS) -o $(libname) $(objfiles)
42
$(CC) $(CFLAGS) -Wno-return-type-c-linkage -c -o $(objfiles) $^
46
rm -f $(objfiles) $(libname)