etc: rework of how libuv is integrated into the build
- thanks to work in libuv's upstream, we can call libuv's Makefile directly with parameters, instead of descending in gyp-uv madness and generating our own.
This commit is contained in:
parent
0f04df8522
commit
3a813e29b6
|
@ -578,7 +578,7 @@ do
|
||||||
make_dir rt/$t
|
make_dir rt/$t
|
||||||
for i in \
|
for i in \
|
||||||
isaac linenoise sync test arch/i386 arch/x86_64 \
|
isaac linenoise sync test arch/i386 arch/x86_64 \
|
||||||
libuv libuv/src/ares libuv/src/eio libuv/src/ev
|
libuv
|
||||||
do
|
do
|
||||||
make_dir rt/$t/$i
|
make_dir rt/$t/$i
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crsT
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crs
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
||||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
# Due to circular dependencies between libraries :(, we wrap the
|
|
||||||
# special "figure out circular dependencies" flags around the entire
|
|
||||||
# input list during linking.
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
# We support two kinds of shared objects (.so):
|
|
||||||
# 1) shared_library, which is just bundling together many dependent libraries
|
|
||||||
# into a link line.
|
|
||||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
||||||
#
|
|
||||||
# They differ only slightly:
|
|
||||||
# In the former case, we want to package all dependent code into the .so.
|
|
||||||
# In the latter case, we want to package just the API exposed by the
|
|
||||||
# outermost module.
|
|
||||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
||||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
||||||
# normal linking.)
|
|
||||||
|
|
||||||
# Other shared-object link notes:
|
|
||||||
# - Set SONAME to the library filename so our binaries don't reference
|
|
||||||
# the local, absolute paths used on the link command-line.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
||||||
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/arm/unix/android" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=arm" "-DOS=linux" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,115 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,158 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/arm/unix/android/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,184 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_android.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_android.h"' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_android
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_android.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_android.h"' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_android
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/uv-eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/eio/eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/ev/ev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/linux.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
|
|
||||||
LIBS := -lm
|
|
||||||
|
|
||||||
$(obj).target/src/libuv/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(obj).target/src/libuv/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(obj).target/src/libuv/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(obj).target/src/libuv/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(obj).target/src/libuv/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,379 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= ./gyp-mac-tool flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crs
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crs
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_objc = CXX($(TOOLSET)) $@
|
|
||||||
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_objcxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
# Commands for precompiled header files.
|
|
||||||
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
# gyp-mac-tool is written next to the root Makefile by gyp.
|
|
||||||
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
|
|
||||||
# already.
|
|
||||||
quiet_cmd_mac_tool = MACTOOL $(4) $<
|
|
||||||
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
|
|
||||||
|
|
||||||
quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
|
|
||||||
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
|
|
||||||
|
|
||||||
quiet_cmd_infoplist = INFOPLIST $@
|
|
||||||
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = LIBTOOL-STATIC $@
|
|
||||||
cmd_alink = rm -f $@ && libtool -static -o $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
|
|
||||||
|
|
||||||
# TODO(thakis): Find out and document the difference between shared_library and
|
|
||||||
# loadable_module on mac.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
|
|
||||||
|
|
||||||
# TODO(thakis): The solink_module rule is likely wrong. Xcode seems to pass
|
|
||||||
# -bundle -single_module here (for osmesa.so).
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 2,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objcxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objcxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objcxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/ia32/mac" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=ia32" "-DOS=mac" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,193 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Generated by gyp. Do not edit.
|
|
||||||
# Copyright (c) 2011 Google Inc. All rights reserved.
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
"""Utility functions to perform Xcode-style build steps.
|
|
||||||
|
|
||||||
These functions are executed via gyp-mac-tool when using the Makefile generator.
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import fcntl
|
|
||||||
import plistlib
|
|
||||||
import shutil
|
|
||||||
import string
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
|
||||||
executor = MacTool()
|
|
||||||
executor.Dispatch(args)
|
|
||||||
|
|
||||||
|
|
||||||
class MacTool(object):
|
|
||||||
"""This class performs all the Mac tooling steps. The methods can either be
|
|
||||||
executed directly, or dispatched from an argument list."""
|
|
||||||
|
|
||||||
def Dispatch(self, args):
|
|
||||||
"""Dispatches a string command to a method."""
|
|
||||||
if len(args) < 1:
|
|
||||||
raise Exception("Not enough arguments")
|
|
||||||
|
|
||||||
method = "Exec%s" % self._CommandifyName(args[0])
|
|
||||||
getattr(self, method)(*args[1:])
|
|
||||||
|
|
||||||
def _CommandifyName(self, name_string):
|
|
||||||
"""Transforms a tool name like copy-info-plist to CopyInfoPlist"""
|
|
||||||
return name_string.title().replace('-', '')
|
|
||||||
|
|
||||||
def ExecFlock(self, lockfile, *cmd_list):
|
|
||||||
"""Emulates the most basic behavior of Linux's flock(1)."""
|
|
||||||
# Rely on exception handling to report errors.
|
|
||||||
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
|
|
||||||
fcntl.flock(fd, fcntl.LOCK_EX)
|
|
||||||
return subprocess.call(cmd_list)
|
|
||||||
|
|
||||||
def ExecCopyInfoPlist(self, source, dest):
|
|
||||||
"""Copies the |source| Info.plist to the destination directory |dest|."""
|
|
||||||
# Read the source Info.plist into memory.
|
|
||||||
fd = open(source, 'r')
|
|
||||||
lines = fd.read()
|
|
||||||
fd.close()
|
|
||||||
|
|
||||||
# Go through all the environment variables and replace them as variables in
|
|
||||||
# the file.
|
|
||||||
for key in os.environ:
|
|
||||||
if key.startswith('_'):
|
|
||||||
continue
|
|
||||||
evar = '${%s}' % key
|
|
||||||
lines = string.replace(lines, evar, os.environ[key])
|
|
||||||
|
|
||||||
# Write out the file with variables replaced.
|
|
||||||
fd = open(dest, 'w')
|
|
||||||
fd.write(lines)
|
|
||||||
fd.close()
|
|
||||||
|
|
||||||
# Now write out PkgInfo file now that the Info.plist file has been
|
|
||||||
# "compiled".
|
|
||||||
self._WritePkgInfo(dest)
|
|
||||||
|
|
||||||
def _WritePkgInfo(self, info_plist):
|
|
||||||
"""This writes the PkgInfo file from the data stored in Info.plist."""
|
|
||||||
plist = plistlib.readPlist(info_plist)
|
|
||||||
if not plist:
|
|
||||||
return
|
|
||||||
|
|
||||||
# Only create PkgInfo for executable types.
|
|
||||||
package_type = plist['CFBundlePackageType']
|
|
||||||
if package_type != 'APPL':
|
|
||||||
return
|
|
||||||
|
|
||||||
# The format of PkgInfo is eight characters, representing the bundle type
|
|
||||||
# and bundle signature, each four characters. If that is missing, four
|
|
||||||
# '?' characters are used instead.
|
|
||||||
signature_code = plist['CFBundleSignature']
|
|
||||||
if len(signature_code) != 4:
|
|
||||||
signature_code = '?' * 4
|
|
||||||
|
|
||||||
dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
|
|
||||||
fp = open(dest, 'w')
|
|
||||||
fp.write('%s%s' % (package_type, signature_code))
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
def ExecPackageFramework(self, framework, version):
|
|
||||||
"""Takes a path to Something.framework and the Current version of that and
|
|
||||||
sets up all the symlinks."""
|
|
||||||
# Find the name of the binary based on the part before the ".framework".
|
|
||||||
binary = os.path.basename(framework).split('.')[0]
|
|
||||||
|
|
||||||
CURRENT = 'Current'
|
|
||||||
RESOURCES = 'Resources'
|
|
||||||
VERSIONS = 'Versions'
|
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
|
|
||||||
# Binary-less frameworks don't seem to contain symlinks (see e.g.
|
|
||||||
# chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
|
|
||||||
return
|
|
||||||
|
|
||||||
# Move into the framework directory to set the symlinks correctly.
|
|
||||||
pwd = os.getcwd()
|
|
||||||
os.chdir(framework)
|
|
||||||
|
|
||||||
# Set up the Current version.
|
|
||||||
self._Relink(version, os.path.join(VERSIONS, CURRENT))
|
|
||||||
|
|
||||||
# Set up the root symlinks.
|
|
||||||
self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
|
|
||||||
self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
|
|
||||||
|
|
||||||
# Back to where we were before!
|
|
||||||
os.chdir(pwd)
|
|
||||||
|
|
||||||
def _Relink(self, dest, link):
|
|
||||||
"""Creates a symlink to |dest| named |link|. If |link| already exists,
|
|
||||||
it is overwritten."""
|
|
||||||
if os.path.lexists(link):
|
|
||||||
os.remove(link)
|
|
||||||
os.symlink(dest, link)
|
|
||||||
|
|
||||||
def ExecCopyBundleResource(self, source, dest):
|
|
||||||
"""Copies a resource file to the bundle/Resources directory, performing any
|
|
||||||
necessary compilation on each resource."""
|
|
||||||
extension = os.path.splitext(source)[1].lower()
|
|
||||||
if os.path.isdir(source):
|
|
||||||
# Copy tree.
|
|
||||||
if os.path.exists(dest):
|
|
||||||
shutil.rmtree(dest)
|
|
||||||
shutil.copytree(source, dest)
|
|
||||||
elif extension == '.xib':
|
|
||||||
self._CopyXIBFile(source, dest)
|
|
||||||
elif extension == '.strings':
|
|
||||||
self._CopyStringsFile(source, dest)
|
|
||||||
# TODO: Given that files with arbitrary extensions can be copied to the
|
|
||||||
# bundle, we will want to get rid of this whitelist eventually.
|
|
||||||
elif extension in [
|
|
||||||
'.icns', '.manifest', '.pak', '.pdf', '.png', '.sb', '.sh',
|
|
||||||
'.ttf', '.sdef']:
|
|
||||||
shutil.copyfile(source, dest)
|
|
||||||
else:
|
|
||||||
raise NotImplementedError(
|
|
||||||
"Don't know how to copy bundle resources of type %s while copying "
|
|
||||||
"%s to %s)" % (extension, source, dest))
|
|
||||||
|
|
||||||
def _CopyXIBFile(self, source, dest):
|
|
||||||
"""Compiles a XIB file with ibtool into a binary plist in the bundle."""
|
|
||||||
args = ['/Developer/usr/bin/ibtool', '--errors', '--warnings',
|
|
||||||
'--notices', '--output-format', 'human-readable-text', '--compile',
|
|
||||||
dest, source]
|
|
||||||
subprocess.call(args)
|
|
||||||
|
|
||||||
def _CopyStringsFile(self, source, dest):
|
|
||||||
"""Copies a .strings file using iconv to reconvert the input into UTF-16."""
|
|
||||||
input_code = self._DetectInputEncoding(source) or "UTF-8"
|
|
||||||
fp = open(dest, 'w')
|
|
||||||
args = ['/usr/bin/iconv', '--from-code', input_code, '--to-code',
|
|
||||||
'UTF-16', source]
|
|
||||||
subprocess.call(args, stdout=fp)
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
def _DetectInputEncoding(self, file_name):
|
|
||||||
"""Reads the first few bytes from file_name and tries to guess the text
|
|
||||||
encoding. Returns None as a guess if it can't detect it."""
|
|
||||||
fp = open(file_name, 'rb')
|
|
||||||
try:
|
|
||||||
header = fp.read(3)
|
|
||||||
except e:
|
|
||||||
fp.close()
|
|
||||||
return None
|
|
||||||
fp.close()
|
|
||||||
if header.startswith("\xFE\xFF"):
|
|
||||||
return "UTF-16BE"
|
|
||||||
elif header.startswith("\xFF\xFE"):
|
|
||||||
return "UTF-16LE"
|
|
||||||
elif header.startswith("\xEF\xBB\xBF"):
|
|
||||||
return "UTF-8"
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main(sys.argv[1:]))
|
|
|
@ -1,149 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch i386 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch i386 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(builddir)/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -Wl,-search_paths_first \
|
|
||||||
-arch i386 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LDFLAGS_Release := -Wl,-search_paths_first \
|
|
||||||
-arch i386 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LIBS := -framework Carbon \
|
|
||||||
-framework CoreServices
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(builddir)/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(builddir)/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,192 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch i386 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch i386 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(builddir)/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -Wl,-search_paths_first \
|
|
||||||
-arch i386 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LDFLAGS_Release := -Wl,-search_paths_first \
|
|
||||||
-arch i386 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LIBS := -framework Carbon \
|
|
||||||
-framework CoreServices
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(builddir)/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(builddir)/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/ia32/mac/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,202 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch i386 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_darwin
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch i386 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_darwin
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/uv-eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/eio/eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/ev/ev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/darwin.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/kqueue.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -arch i386 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LDFLAGS_Release := -arch i386 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LIBS := -lm
|
|
||||||
|
|
||||||
$(builddir)/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(builddir)/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(builddir)/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crsT
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crsT
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
||||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
# Due to circular dependencies between libraries :(, we wrap the
|
|
||||||
# special "figure out circular dependencies" flags around the entire
|
|
||||||
# input list during linking.
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
# We support two kinds of shared objects (.so):
|
|
||||||
# 1) shared_library, which is just bundling together many dependent libraries
|
|
||||||
# into a link line.
|
|
||||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
||||||
#
|
|
||||||
# They differ only slightly:
|
|
||||||
# In the former case, we want to package all dependent code into the .so.
|
|
||||||
# In the latter case, we want to package just the API exposed by the
|
|
||||||
# outermost module.
|
|
||||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
||||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
||||||
# normal linking.)
|
|
||||||
|
|
||||||
# Other shared-object link notes:
|
|
||||||
# - Set SONAME to the library filename so our binaries don't reference
|
|
||||||
# the local, absolute paths used on the link command-line.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
||||||
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/ia32/unix/linux" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=ia32" "-DOS=linux" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,122 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lrt
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,165 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lrt
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/ia32/unix/linux/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,189 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_linux
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_linux
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/uv-eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/eio/eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/ev/ev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/linux.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lm
|
|
||||||
|
|
||||||
$(obj).target/src/libuv/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(obj).target/src/libuv/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(obj).target/src/libuv/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(obj).target/src/libuv/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(obj).target/src/libuv/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crsT
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crsT
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
||||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
# Due to circular dependencies between libraries :(, we wrap the
|
|
||||||
# special "figure out circular dependencies" flags around the entire
|
|
||||||
# input list during linking.
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
# We support two kinds of shared objects (.so):
|
|
||||||
# 1) shared_library, which is just bundling together many dependent libraries
|
|
||||||
# into a link line.
|
|
||||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
||||||
#
|
|
||||||
# They differ only slightly:
|
|
||||||
# In the former case, we want to package all dependent code into the .so.
|
|
||||||
# In the latter case, we want to package just the API exposed by the
|
|
||||||
# outermost module.
|
|
||||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
||||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
||||||
# normal linking.)
|
|
||||||
|
|
||||||
# Other shared-object link notes:
|
|
||||||
# - Set SONAME to the library filename so our binaries don't reference
|
|
||||||
# the local, absolute paths used on the link command-line.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
||||||
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/ia32/win" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=ia32" "-DOS=win" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,110 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-win.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug :=
|
|
||||||
|
|
||||||
LDFLAGS_Release :=
|
|
||||||
|
|
||||||
LIBS := ws2_32.lib \
|
|
||||||
-lws2_32.lib \
|
|
||||||
-lpsapi.lib \
|
|
||||||
-liphlpapi.lib
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,153 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-win.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug :=
|
|
||||||
|
|
||||||
LDFLAGS_Release :=
|
|
||||||
|
|
||||||
LIBS := ws2_32.lib \
|
|
||||||
-lws2_32.lib \
|
|
||||||
-lpsapi.lib \
|
|
||||||
-liphlpapi.lib
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/ia32/win/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,171 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-D_WIN32_WINNT=0x0600' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_win32
|
|
||||||
|
|
||||||
DEFS_Release := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-D_WIN32_WINNT=0x0600' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_win32
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getenv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_platform.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/handle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/loop-watcher.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/req.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/winapi.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/winsock.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug :=
|
|
||||||
|
|
||||||
LDFLAGS_Release :=
|
|
||||||
|
|
||||||
LIBS :=
|
|
||||||
|
|
||||||
$(obj).target/src/libuv/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(obj).target/src/libuv/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(obj).target/src/libuv/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(obj).target/src/libuv/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(obj).target/src/libuv/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,379 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= ./gyp-mac-tool flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crs
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crs
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_objc = CXX($(TOOLSET)) $@
|
|
||||||
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_objcxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
# Commands for precompiled header files.
|
|
||||||
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
|
|
||||||
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
# gyp-mac-tool is written next to the root Makefile by gyp.
|
|
||||||
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
|
|
||||||
# already.
|
|
||||||
quiet_cmd_mac_tool = MACTOOL $(4) $<
|
|
||||||
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
|
|
||||||
|
|
||||||
quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
|
|
||||||
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
|
|
||||||
|
|
||||||
quiet_cmd_infoplist = INFOPLIST $@
|
|
||||||
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = LIBTOOL-STATIC $@
|
|
||||||
cmd_alink = rm -f $@ && libtool -static -o $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
|
|
||||||
|
|
||||||
# TODO(thakis): Find out and document the difference between shared_library and
|
|
||||||
# loadable_module on mac.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
|
|
||||||
|
|
||||||
# TODO(thakis): The solink_module rule is likely wrong. Xcode seems to pass
|
|
||||||
# -bundle -single_module here (for osmesa.so).
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 2,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objcxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objcxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,objcxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/x86_64/mac" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=x86_64" "-DOS=mac" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,193 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Generated by gyp. Do not edit.
|
|
||||||
# Copyright (c) 2011 Google Inc. All rights reserved.
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
"""Utility functions to perform Xcode-style build steps.
|
|
||||||
|
|
||||||
These functions are executed via gyp-mac-tool when using the Makefile generator.
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import fcntl
|
|
||||||
import plistlib
|
|
||||||
import shutil
|
|
||||||
import string
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
|
||||||
executor = MacTool()
|
|
||||||
executor.Dispatch(args)
|
|
||||||
|
|
||||||
|
|
||||||
class MacTool(object):
|
|
||||||
"""This class performs all the Mac tooling steps. The methods can either be
|
|
||||||
executed directly, or dispatched from an argument list."""
|
|
||||||
|
|
||||||
def Dispatch(self, args):
|
|
||||||
"""Dispatches a string command to a method."""
|
|
||||||
if len(args) < 1:
|
|
||||||
raise Exception("Not enough arguments")
|
|
||||||
|
|
||||||
method = "Exec%s" % self._CommandifyName(args[0])
|
|
||||||
getattr(self, method)(*args[1:])
|
|
||||||
|
|
||||||
def _CommandifyName(self, name_string):
|
|
||||||
"""Transforms a tool name like copy-info-plist to CopyInfoPlist"""
|
|
||||||
return name_string.title().replace('-', '')
|
|
||||||
|
|
||||||
def ExecFlock(self, lockfile, *cmd_list):
|
|
||||||
"""Emulates the most basic behavior of Linux's flock(1)."""
|
|
||||||
# Rely on exception handling to report errors.
|
|
||||||
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
|
|
||||||
fcntl.flock(fd, fcntl.LOCK_EX)
|
|
||||||
return subprocess.call(cmd_list)
|
|
||||||
|
|
||||||
def ExecCopyInfoPlist(self, source, dest):
|
|
||||||
"""Copies the |source| Info.plist to the destination directory |dest|."""
|
|
||||||
# Read the source Info.plist into memory.
|
|
||||||
fd = open(source, 'r')
|
|
||||||
lines = fd.read()
|
|
||||||
fd.close()
|
|
||||||
|
|
||||||
# Go through all the environment variables and replace them as variables in
|
|
||||||
# the file.
|
|
||||||
for key in os.environ:
|
|
||||||
if key.startswith('_'):
|
|
||||||
continue
|
|
||||||
evar = '${%s}' % key
|
|
||||||
lines = string.replace(lines, evar, os.environ[key])
|
|
||||||
|
|
||||||
# Write out the file with variables replaced.
|
|
||||||
fd = open(dest, 'w')
|
|
||||||
fd.write(lines)
|
|
||||||
fd.close()
|
|
||||||
|
|
||||||
# Now write out PkgInfo file now that the Info.plist file has been
|
|
||||||
# "compiled".
|
|
||||||
self._WritePkgInfo(dest)
|
|
||||||
|
|
||||||
def _WritePkgInfo(self, info_plist):
|
|
||||||
"""This writes the PkgInfo file from the data stored in Info.plist."""
|
|
||||||
plist = plistlib.readPlist(info_plist)
|
|
||||||
if not plist:
|
|
||||||
return
|
|
||||||
|
|
||||||
# Only create PkgInfo for executable types.
|
|
||||||
package_type = plist['CFBundlePackageType']
|
|
||||||
if package_type != 'APPL':
|
|
||||||
return
|
|
||||||
|
|
||||||
# The format of PkgInfo is eight characters, representing the bundle type
|
|
||||||
# and bundle signature, each four characters. If that is missing, four
|
|
||||||
# '?' characters are used instead.
|
|
||||||
signature_code = plist['CFBundleSignature']
|
|
||||||
if len(signature_code) != 4:
|
|
||||||
signature_code = '?' * 4
|
|
||||||
|
|
||||||
dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
|
|
||||||
fp = open(dest, 'w')
|
|
||||||
fp.write('%s%s' % (package_type, signature_code))
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
def ExecPackageFramework(self, framework, version):
|
|
||||||
"""Takes a path to Something.framework and the Current version of that and
|
|
||||||
sets up all the symlinks."""
|
|
||||||
# Find the name of the binary based on the part before the ".framework".
|
|
||||||
binary = os.path.basename(framework).split('.')[0]
|
|
||||||
|
|
||||||
CURRENT = 'Current'
|
|
||||||
RESOURCES = 'Resources'
|
|
||||||
VERSIONS = 'Versions'
|
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
|
|
||||||
# Binary-less frameworks don't seem to contain symlinks (see e.g.
|
|
||||||
# chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
|
|
||||||
return
|
|
||||||
|
|
||||||
# Move into the framework directory to set the symlinks correctly.
|
|
||||||
pwd = os.getcwd()
|
|
||||||
os.chdir(framework)
|
|
||||||
|
|
||||||
# Set up the Current version.
|
|
||||||
self._Relink(version, os.path.join(VERSIONS, CURRENT))
|
|
||||||
|
|
||||||
# Set up the root symlinks.
|
|
||||||
self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
|
|
||||||
self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
|
|
||||||
|
|
||||||
# Back to where we were before!
|
|
||||||
os.chdir(pwd)
|
|
||||||
|
|
||||||
def _Relink(self, dest, link):
|
|
||||||
"""Creates a symlink to |dest| named |link|. If |link| already exists,
|
|
||||||
it is overwritten."""
|
|
||||||
if os.path.lexists(link):
|
|
||||||
os.remove(link)
|
|
||||||
os.symlink(dest, link)
|
|
||||||
|
|
||||||
def ExecCopyBundleResource(self, source, dest):
|
|
||||||
"""Copies a resource file to the bundle/Resources directory, performing any
|
|
||||||
necessary compilation on each resource."""
|
|
||||||
extension = os.path.splitext(source)[1].lower()
|
|
||||||
if os.path.isdir(source):
|
|
||||||
# Copy tree.
|
|
||||||
if os.path.exists(dest):
|
|
||||||
shutil.rmtree(dest)
|
|
||||||
shutil.copytree(source, dest)
|
|
||||||
elif extension == '.xib':
|
|
||||||
self._CopyXIBFile(source, dest)
|
|
||||||
elif extension == '.strings':
|
|
||||||
self._CopyStringsFile(source, dest)
|
|
||||||
# TODO: Given that files with arbitrary extensions can be copied to the
|
|
||||||
# bundle, we will want to get rid of this whitelist eventually.
|
|
||||||
elif extension in [
|
|
||||||
'.icns', '.manifest', '.pak', '.pdf', '.png', '.sb', '.sh',
|
|
||||||
'.ttf', '.sdef']:
|
|
||||||
shutil.copyfile(source, dest)
|
|
||||||
else:
|
|
||||||
raise NotImplementedError(
|
|
||||||
"Don't know how to copy bundle resources of type %s while copying "
|
|
||||||
"%s to %s)" % (extension, source, dest))
|
|
||||||
|
|
||||||
def _CopyXIBFile(self, source, dest):
|
|
||||||
"""Compiles a XIB file with ibtool into a binary plist in the bundle."""
|
|
||||||
args = ['/Developer/usr/bin/ibtool', '--errors', '--warnings',
|
|
||||||
'--notices', '--output-format', 'human-readable-text', '--compile',
|
|
||||||
dest, source]
|
|
||||||
subprocess.call(args)
|
|
||||||
|
|
||||||
def _CopyStringsFile(self, source, dest):
|
|
||||||
"""Copies a .strings file using iconv to reconvert the input into UTF-16."""
|
|
||||||
input_code = self._DetectInputEncoding(source) or "UTF-8"
|
|
||||||
fp = open(dest, 'w')
|
|
||||||
args = ['/usr/bin/iconv', '--from-code', input_code, '--to-code',
|
|
||||||
'UTF-16', source]
|
|
||||||
subprocess.call(args, stdout=fp)
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
def _DetectInputEncoding(self, file_name):
|
|
||||||
"""Reads the first few bytes from file_name and tries to guess the text
|
|
||||||
encoding. Returns None as a guess if it can't detect it."""
|
|
||||||
fp = open(file_name, 'rb')
|
|
||||||
try:
|
|
||||||
header = fp.read(3)
|
|
||||||
except e:
|
|
||||||
fp.close()
|
|
||||||
return None
|
|
||||||
fp.close()
|
|
||||||
if header.startswith("\xFE\xFF"):
|
|
||||||
return "UTF-16BE"
|
|
||||||
elif header.startswith("\xFF\xFE"):
|
|
||||||
return "UTF-16LE"
|
|
||||||
elif header.startswith("\xEF\xBB\xBF"):
|
|
||||||
return "UTF-8"
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main(sys.argv[1:]))
|
|
|
@ -1,149 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch x86_64 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch x86_64 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(builddir)/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -Wl,-search_paths_first \
|
|
||||||
-arch x86_64 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LDFLAGS_Release := -Wl,-search_paths_first \
|
|
||||||
-arch x86_64 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LIBS := -framework Carbon \
|
|
||||||
-framework CoreServices
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(builddir)/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(builddir)/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,192 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch x86_64 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch x86_64 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(builddir)/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -Wl,-search_paths_first \
|
|
||||||
-arch x86_64 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LDFLAGS_Release := -Wl,-search_paths_first \
|
|
||||||
-arch x86_64 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LIBS := -framework Carbon \
|
|
||||||
-framework CoreServices
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(builddir)/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(builddir)/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/x86_64/mac/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,202 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch x86_64 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_darwin
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_darwin.h"' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -Os \
|
|
||||||
-gdwarf-2 \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-Wnewline-eof \
|
|
||||||
-arch x86_64 \
|
|
||||||
-fno-strict-aliasing \
|
|
||||||
-Wall \
|
|
||||||
-Wendif-labels \
|
|
||||||
-W \
|
|
||||||
-Wno-unused-parameter
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions \
|
|
||||||
-fvisibility-inlines-hidden \
|
|
||||||
-fno-threadsafe-statics
|
|
||||||
|
|
||||||
# Flags passed to only ObjC files.
|
|
||||||
CFLAGS_OBJC_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only ObjC++ files.
|
|
||||||
CFLAGS_OBJCC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_darwin
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/uv-eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/eio/eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/ev/ev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/darwin.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/kqueue.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -arch x86_64 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LDFLAGS_Release := -arch x86_64 \
|
|
||||||
-L$(builddir)
|
|
||||||
|
|
||||||
LIBS := -lm
|
|
||||||
|
|
||||||
$(builddir)/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(builddir)/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(builddir)/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crs
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crs
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
||||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
# Due to circular dependencies between libraries :(, we wrap the
|
|
||||||
# special "figure out circular dependencies" flags around the entire
|
|
||||||
# input list during linking.
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
# We support two kinds of shared objects (.so):
|
|
||||||
# 1) shared_library, which is just bundling together many dependent libraries
|
|
||||||
# into a link line.
|
|
||||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
||||||
#
|
|
||||||
# They differ only slightly:
|
|
||||||
# In the former case, we want to package all dependent code into the .so.
|
|
||||||
# In the latter case, we want to package just the API exposed by the
|
|
||||||
# outermost module.
|
|
||||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
||||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
||||||
# normal linking.)
|
|
||||||
|
|
||||||
# Other shared-object link notes:
|
|
||||||
# - Set SONAME to the library filename so our binaries don't reference
|
|
||||||
# the local, absolute paths used on the link command-line.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
||||||
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/x86_64/unix/freebsd" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=x86_64" "-DOS=freebsd" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,120 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lkvm
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,163 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lkvm
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/x86_64/unix/freebsd/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,188 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_freebsd.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_freebsd.h"' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_freebsd
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_freebsd.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_freebsd.h"' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_freebsd
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/uv-eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/eio/eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/ev/ev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/freebsd.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/kqueue.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lm
|
|
||||||
|
|
||||||
$(obj).target/src/libuv/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(obj).target/src/libuv/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(obj).target/src/libuv/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(obj).target/src/libuv/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(obj).target/src/libuv/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crs
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crs
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
||||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
# Due to circular dependencies between libraries :(, we wrap the
|
|
||||||
# special "figure out circular dependencies" flags around the entire
|
|
||||||
# input list during linking.
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
# We support two kinds of shared objects (.so):
|
|
||||||
# 1) shared_library, which is just bundling together many dependent libraries
|
|
||||||
# into a link line.
|
|
||||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
||||||
#
|
|
||||||
# They differ only slightly:
|
|
||||||
# In the former case, we want to package all dependent code into the .so.
|
|
||||||
# In the latter case, we want to package just the API exposed by the
|
|
||||||
# outermost module.
|
|
||||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
||||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
||||||
# normal linking.)
|
|
||||||
|
|
||||||
# Other shared-object link notes:
|
|
||||||
# - Set SONAME to the library filename so our binaries don't reference
|
|
||||||
# the local, absolute paths used on the link command-line.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
||||||
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/x86_64/unix/linux" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=x86_64" "-DOS=linux" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,122 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lrt
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,165 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-unix.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lrt
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/x86_64/unix/linux/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,189 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG' \
|
|
||||||
'-DEV_VERIFY=2'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_linux
|
|
||||||
|
|
||||||
DEFS_Release := '-D_LARGEFILE_SOURCE' \
|
|
||||||
'-D_FILE_OFFSET_BITS=64' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-DEV_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DEIO_CONFIG_H="config_linux.h"' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -pthread \
|
|
||||||
-Wall \
|
|
||||||
-ansi \
|
|
||||||
-pthread \
|
|
||||||
-fvisibility=hidden \
|
|
||||||
-g \
|
|
||||||
--std=gnu89 \
|
|
||||||
-pedantic \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Wno-unused-parameter \
|
|
||||||
-O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release := -fno-rtti \
|
|
||||||
-fno-exceptions
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/unix/ev \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_linux
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/uv-eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/eio/eio.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/ev/ev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/unix/linux.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug := -pthread
|
|
||||||
|
|
||||||
LDFLAGS_Release := -pthread
|
|
||||||
|
|
||||||
LIBS := -lm
|
|
||||||
|
|
||||||
$(obj).target/src/libuv/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(obj).target/src/libuv/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(obj).target/src/libuv/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(obj).target/src/libuv/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(obj).target/src/libuv/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
|
@ -1,354 +0,0 @@
|
||||||
# We borrow heavily from the kernel build setup, though we are simpler since
|
|
||||||
# we don't have Kconfig tweaking settings on us.
|
|
||||||
|
|
||||||
# The implicit make rules have it looking for RCS files, among other things.
|
|
||||||
# We instead explicitly write all the rules we care about.
|
|
||||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
|
||||||
MAKEFLAGS=-r
|
|
||||||
|
|
||||||
# The source directory tree.
|
|
||||||
srcdir := ../../../..
|
|
||||||
abs_srcdir := $(abspath $(srcdir))
|
|
||||||
|
|
||||||
# The name of the builddir.
|
|
||||||
builddir_name ?= out
|
|
||||||
|
|
||||||
# The V=1 flag on command line makes us verbosely print command lines.
|
|
||||||
ifdef V
|
|
||||||
quiet=
|
|
||||||
else
|
|
||||||
quiet=quiet_
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
|
||||||
BUILDTYPE ?= Debug
|
|
||||||
|
|
||||||
# Directory all our build output goes into.
|
|
||||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
|
||||||
# as they reach into the src/ directory for data with relative paths.
|
|
||||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
|
||||||
abs_builddir := $(abspath $(builddir))
|
|
||||||
depsdir := $(builddir)/.deps
|
|
||||||
|
|
||||||
# Object output directory.
|
|
||||||
obj := $(builddir)/obj
|
|
||||||
abs_obj := $(abspath $(obj))
|
|
||||||
|
|
||||||
# We build up a list of every single one of the targets so we can slurp in the
|
|
||||||
# generated dependency rule Makefiles in one pass.
|
|
||||||
all_deps :=
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# C++ apps need to be linked with g++.
|
|
||||||
#
|
|
||||||
# Note: flock is used to seralize linking. Linking is a memory-intensive
|
|
||||||
# process so running parallel links can often lead to thrashing. To disable
|
|
||||||
# the serialization, override LINK via an envrionment variable as follows:
|
|
||||||
#
|
|
||||||
# export LINK=g++
|
|
||||||
#
|
|
||||||
# This will allow make to invoke N linker processes as specified in -jN.
|
|
||||||
LINK ?= flock $(builddir)/linker.lock $(CXX)
|
|
||||||
|
|
||||||
CC.target ?= $(CC)
|
|
||||||
CFLAGS.target ?= $(CFLAGS)
|
|
||||||
CXX.target ?= $(CXX)
|
|
||||||
CXXFLAGS.target ?= $(CXXFLAGS)
|
|
||||||
LINK.target ?= $(LINK)
|
|
||||||
LDFLAGS.target ?= $(LDFLAGS)
|
|
||||||
AR.target ?= $(AR)
|
|
||||||
ARFLAGS.target ?= crsT
|
|
||||||
|
|
||||||
# N.B.: the logic of which commands to run should match the computation done
|
|
||||||
# in gyp's make.py where ARFLAGS.host etc. is computed.
|
|
||||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
|
||||||
# to replicate this environment fallback in make as well.
|
|
||||||
CC.host ?= gcc
|
|
||||||
CFLAGS.host ?=
|
|
||||||
CXX.host ?= g++
|
|
||||||
CXXFLAGS.host ?=
|
|
||||||
LINK.host ?= g++
|
|
||||||
LDFLAGS.host ?=
|
|
||||||
AR.host ?= ar
|
|
||||||
ARFLAGS.host := crsT
|
|
||||||
|
|
||||||
# Define a dir function that can handle spaces.
|
|
||||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
|
||||||
# "leading spaces cannot appear in the text of the first argument as written.
|
|
||||||
# These characters can be put into the argument value by variable substitution."
|
|
||||||
empty :=
|
|
||||||
space := $(empty) $(empty)
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
|
||||||
replace_spaces = $(subst $(space),?,$1)
|
|
||||||
unreplace_spaces = $(subst ?,$(space),$1)
|
|
||||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
|
||||||
|
|
||||||
# Flags to make gcc output dependency info. Note that you need to be
|
|
||||||
# careful here to use the flags that ccache and distcc can understand.
|
|
||||||
# We write to a dep file on the side first and then rename at the end
|
|
||||||
# so we can't end up with a broken dep file.
|
|
||||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
|
||||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
|
||||||
|
|
||||||
# We have to fixup the deps output in a few ways.
|
|
||||||
# (1) the file output should mention the proper .o file.
|
|
||||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
|
||||||
# the form:
|
|
||||||
# foobar.o: DEP1 DEP2
|
|
||||||
# into
|
|
||||||
# path/to/foobar.o: DEP1 DEP2
|
|
||||||
# (2) we want missing files not to cause us to fail to build.
|
|
||||||
# We want to rewrite
|
|
||||||
# foobar.o: DEP1 DEP2 \
|
|
||||||
# DEP3
|
|
||||||
# to
|
|
||||||
# DEP1:
|
|
||||||
# DEP2:
|
|
||||||
# DEP3:
|
|
||||||
# so if the files are missing, they're just considered phony rules.
|
|
||||||
# We have to do some pretty insane escaping to get those backslashes
|
|
||||||
# and dollar signs past make, the shell, and sed at the same time.
|
|
||||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
|
||||||
# their names replaced with other characters.
|
|
||||||
define fixup_dep
|
|
||||||
# The depfile may not exist if the input file didn't have any #includes.
|
|
||||||
touch $(depfile).raw
|
|
||||||
# Fixup path as in (1).
|
|
||||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
|
||||||
# Add extra rules as in (2).
|
|
||||||
# We remove slashes and replace spaces with new lines;
|
|
||||||
# remove blank lines;
|
|
||||||
# delete the first line and append a colon to the remaining lines.
|
|
||||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
|
||||||
grep -v '^$$' |\
|
|
||||||
sed -e 1d -e 's|$$|:|' \
|
|
||||||
>> $(depfile)
|
|
||||||
rm $(depfile).raw
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Command definitions:
|
|
||||||
# - cmd_foo is the actual command to run;
|
|
||||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
|
||||||
|
|
||||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
|
||||||
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
|
||||||
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
|
|
||||||
|
|
||||||
quiet_cmd_touch = TOUCH $@
|
|
||||||
cmd_touch = touch $@
|
|
||||||
|
|
||||||
quiet_cmd_copy = COPY $@
|
|
||||||
# send stderr to /dev/null to ignore messages when linking directories.
|
|
||||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
|
||||||
|
|
||||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
|
||||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
|
|
||||||
|
|
||||||
# Due to circular dependencies between libraries :(, we wrap the
|
|
||||||
# special "figure out circular dependencies" flags around the entire
|
|
||||||
# input list during linking.
|
|
||||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
|
||||||
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
# We support two kinds of shared objects (.so):
|
|
||||||
# 1) shared_library, which is just bundling together many dependent libraries
|
|
||||||
# into a link line.
|
|
||||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
|
||||||
#
|
|
||||||
# They differ only slightly:
|
|
||||||
# In the former case, we want to package all dependent code into the .so.
|
|
||||||
# In the latter case, we want to package just the API exposed by the
|
|
||||||
# outermost module.
|
|
||||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
|
||||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
|
||||||
# normal linking.)
|
|
||||||
|
|
||||||
# Other shared-object link notes:
|
|
||||||
# - Set SONAME to the library filename so our binaries don't reference
|
|
||||||
# the local, absolute paths used on the link command-line.
|
|
||||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
|
||||||
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
|
||||||
|
|
||||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
|
||||||
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
# Define an escape_quotes function to escape single quotes.
|
|
||||||
# This allows us to handle quotes properly as long as we always use
|
|
||||||
# use single quotes and escape_quotes.
|
|
||||||
escape_quotes = $(subst ','\'',$(1))
|
|
||||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
|
||||||
# Define an escape_vars function to escape '$' variable syntax.
|
|
||||||
# This allows us to read/write command lines with shell variables (e.g.
|
|
||||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
|
||||||
escape_vars = $(subst $$,$$$$,$(1))
|
|
||||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
|
||||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
|
||||||
# to escape sequences is more portable than echo's across different shells
|
|
||||||
# (e.g., dash, bash).
|
|
||||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
|
||||||
|
|
||||||
# Helper to compare the command we're about to run against the command
|
|
||||||
# we logged the last time we ran the command. Produces an empty
|
|
||||||
# string (false) when the commands match.
|
|
||||||
# Tricky point: Make has no string-equality test function.
|
|
||||||
# The kernel uses the following, but it seems like it would have false
|
|
||||||
# positives, where one string reordered its arguments.
|
|
||||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
|
||||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
|
||||||
# We instead substitute each for the empty string into the other, and
|
|
||||||
# say they're equal if both substitutions produce the empty string.
|
|
||||||
# .d files contain ? instead of spaces, take that into account.
|
|
||||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
|
||||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
|
||||||
|
|
||||||
# Helper that is non-empty when a prerequisite changes.
|
|
||||||
# Normally make does this implicitly, but we force rules to always run
|
|
||||||
# so we can check their command lines.
|
|
||||||
# $? -- new prerequisites
|
|
||||||
# $| -- order-only dependencies
|
|
||||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
|
||||||
|
|
||||||
# Helper that executes all postbuilds, and deletes the output file when done
|
|
||||||
# if any of the postbuilds failed.
|
|
||||||
define do_postbuilds
|
|
||||||
@E=0;\
|
|
||||||
for p in $(POSTBUILDS); do\
|
|
||||||
eval $$p;\
|
|
||||||
F=$$?;\
|
|
||||||
if [ $$F -ne 0 ]; then\
|
|
||||||
E=$$F;\
|
|
||||||
fi;\
|
|
||||||
done;\
|
|
||||||
if [ $$E -ne 0 ]; then\
|
|
||||||
rm -rf "$@";\
|
|
||||||
exit $$E;\
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
|
|
||||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
|
||||||
# Should always run for a given target to handle command-line changes.
|
|
||||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
|
||||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
|
||||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
|
||||||
# spaces already and dirx strips the ? characters.
|
|
||||||
define do_cmd
|
|
||||||
$(if $(or $(command_changed),$(prereq_changed)),
|
|
||||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
|
||||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
|
||||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
|
||||||
@$(cmd_$(1))
|
|
||||||
@echo " $(quiet_cmd_$(1)): Finished",
|
|
||||||
@$(cmd_$(1))
|
|
||||||
)
|
|
||||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
|
||||||
@$(if $(2),$(fixup_dep))
|
|
||||||
$(if $(and $(3), $(POSTBUILDS)),
|
|
||||||
$(call do_postbuilds)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# Declare the "all" target first so it is the default,
|
|
||||||
# even though we don't have the deps yet.
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
|
||||||
# do_cmd.
|
|
||||||
.PHONY: FORCE_DO_CMD
|
|
||||||
FORCE_DO_CMD:
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cxx,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-benchmarks.target.mk)))),)
|
|
||||||
include src/libuv/run-benchmarks.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/run-tests.target.mk)))),)
|
|
||||||
include src/libuv/run-tests.target.mk
|
|
||||||
endif
|
|
||||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
||||||
$(findstring $(join ^,$(prefix)),\
|
|
||||||
$(join ^,src/libuv/uv.target.mk)))),)
|
|
||||||
include src/libuv/uv.target.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
||||||
#cmd_regen_makefile = ./src/libuv/build/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -Isrc/libuv/common.gypi "--depth=." "--generator-output=mk/libuv/x86_64/win" "-Ddefault_configuration=Default" "-Dcomponent=static_library" "-Dlibrary=static_library" "-Dtarget_arch=x86_64" "-DOS=win" src/libuv/uv.gyp
|
|
||||||
#Makefile: $(srcdir)/src/libuv/uv.gyp $(srcdir)/src/libuv/common.gypi
|
|
||||||
# $(call do_cmd,regen_makefile)
|
|
||||||
|
|
||||||
# "all" is a concatenation of the "all" targets from all the included
|
|
||||||
# sub-makefiles. This is just here to clarify.
|
|
||||||
all:
|
|
||||||
|
|
||||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
|
||||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
|
||||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
|
||||||
ifneq ($(d_files),)
|
|
||||||
# Rather than include each individual .d file, concatenate them into a
|
|
||||||
# single file which make is able to load faster. We split this into
|
|
||||||
# commands that take 1000 files at a time to avoid overflowing the
|
|
||||||
# command line.
|
|
||||||
$(shell cat $(wordlist 1,1000,$(d_files)) > $(depsdir)/all.deps)
|
|
||||||
|
|
||||||
ifneq ($(word 1001,$(d_files)),)
|
|
||||||
$(error Found unprocessed dependency files (gyp didn't generate enough rules!))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
|
||||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
|
||||||
# for them makes it go faster.
|
|
||||||
$(depsdir)/all.deps: ;
|
|
||||||
|
|
||||||
include $(depsdir)/all.deps
|
|
||||||
endif
|
|
|
@ -1,110 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-benchmarks
|
|
||||||
DEFS_Debug := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/benchmark-ares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-ping-pongs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pound.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-pump.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-sizes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-tcp-write-batch.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/benchmark-udp-packet-storm.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/dns-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-benchmarks.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-win.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug :=
|
|
||||||
|
|
||||||
LDFLAGS_Release :=
|
|
||||||
|
|
||||||
LIBS := ws2_32.lib \
|
|
||||||
-lws2_32.lib \
|
|
||||||
-lpsapi.lib \
|
|
||||||
-liphlpapi.lib
|
|
||||||
|
|
||||||
$(builddir)/run-benchmarks: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-benchmarks: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-benchmarks: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-benchmarks: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-benchmarks: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-benchmarks
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-benchmarks
|
|
||||||
run-benchmarks: $(builddir)/run-benchmarks
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-benchmarks
|
|
||||||
|
|
|
@ -1,153 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := run-tests
|
|
||||||
DEFS_Debug := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
DEFS_Release := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/test/blackhole-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/echo-server.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/run-tests.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-loadavg.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-callback-stack.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-connection-fail.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-cwd-and-chdir.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-delayed-accept.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-eio-overflow.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fail-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-currentexe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-get-memory.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-getsockname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-hrtime.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-idle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ipc-threads.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-loop-handles.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-multiple-listen.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pass-always.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ping-pong.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-pipe-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-platform-output.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-process-title.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-ref.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-shutdown-eof.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-spawn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-stdio-over-pipes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-bind6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-close.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-flags.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-connect6-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-write-to-half-open-connection.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tcp-writealot.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-mutexes.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer-again.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-dgram-too-big.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-ipv6.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-send-and-recv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-udp-multicast-join.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/test-counters-init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/test/runner-win.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# Make sure our dependencies are built before any of us.
|
|
||||||
$(OBJS): | $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug :=
|
|
||||||
|
|
||||||
LDFLAGS_Release :=
|
|
||||||
|
|
||||||
LIBS := ws2_32.lib \
|
|
||||||
-lws2_32.lib \
|
|
||||||
-lpsapi.lib \
|
|
||||||
-liphlpapi.lib
|
|
||||||
|
|
||||||
$(builddir)/run-tests: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(builddir)/run-tests: LIBS := $(LIBS)
|
|
||||||
$(builddir)/run-tests: LD_INPUTS := $(OBJS) $(obj).target/src/libuv/libuv.a
|
|
||||||
$(builddir)/run-tests: TOOLSET := $(TOOLSET)
|
|
||||||
$(builddir)/run-tests: $(OBJS) $(obj).target/src/libuv/libuv.a FORCE_DO_CMD
|
|
||||||
$(call do_cmd,link)
|
|
||||||
|
|
||||||
all_deps += $(builddir)/run-tests
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: run-tests
|
|
||||||
run-tests: $(builddir)/run-tests
|
|
||||||
|
|
||||||
# Add executable to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: $(builddir)/run-tests
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
export builddir_name ?= mk/libuv/x86_64/win/./src/libuv/out
|
|
||||||
.PHONY: all
|
|
||||||
all:
|
|
||||||
$(MAKE) -C ../.. uv run-benchmarks run-tests
|
|
|
@ -1,171 +0,0 @@
|
||||||
# This file is generated by gyp; do not edit.
|
|
||||||
|
|
||||||
TOOLSET := target
|
|
||||||
TARGET := uv
|
|
||||||
DEFS_Debug := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-D_WIN32_WINNT=0x0600' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DDEBUG' \
|
|
||||||
'-D_DEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Debug := -g \
|
|
||||||
-O0
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Debug :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Debug :=
|
|
||||||
|
|
||||||
INCS_Debug := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_win32
|
|
||||||
|
|
||||||
DEFS_Release := '-DWIN32' \
|
|
||||||
'-D_CRT_SECURE_NO_DEPRECATE' \
|
|
||||||
'-D_CRT_NONSTDC_NO_DEPRECATE' \
|
|
||||||
'-DHAVE_CONFIG_H' \
|
|
||||||
'-D_WIN32_WINNT=0x0600' \
|
|
||||||
'-DEIO_STACKSIZE=262144' \
|
|
||||||
'-D_GNU_SOURCE' \
|
|
||||||
'-DNDEBUG'
|
|
||||||
|
|
||||||
# Flags passed to all source files.
|
|
||||||
CFLAGS_Release := -O3 \
|
|
||||||
-fomit-frame-pointer \
|
|
||||||
-fdata-sections \
|
|
||||||
-ffunction-sections
|
|
||||||
|
|
||||||
# Flags passed to only C files.
|
|
||||||
CFLAGS_C_Release :=
|
|
||||||
|
|
||||||
# Flags passed to only C++ files.
|
|
||||||
CFLAGS_CC_Release :=
|
|
||||||
|
|
||||||
INCS_Release := -I$(srcdir)/src/libuv/include \
|
|
||||||
-I$(srcdir)/src/libuv/include/uv-private \
|
|
||||||
-I$(srcdir)/src/libuv/src \
|
|
||||||
-I$(srcdir)/src/libuv/src/ares/config_win32
|
|
||||||
|
|
||||||
OBJS := $(obj).target/$(TARGET)/src/libuv/src/uv-common.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_cancel.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__close_sockets.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_data.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_destroy.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_name.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_expand_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_fds.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_free_string.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyaddr.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_gethostbyname.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__get_hostent.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getnameinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getopt.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getsock.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_library_init.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_llist.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_mkquery.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_nowarn.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_options.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_aaaa_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_a_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_mx_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ns_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_ptr_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_srv_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_parse_txt_reply.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_query.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__read_line.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_search.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_send.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strcasecmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strdup.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_strerror.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_timeout.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares__timeval.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_version.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_writev.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/bitncmp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_net_pton.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/inet_ntop.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/windows_port.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_getenv.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/ares/ares_platform.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/async.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/cares.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/core.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/dl.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/error.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/fs.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/fs-event.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/getaddrinfo.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/handle.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/loop-watcher.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/pipe.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/thread.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/process.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/req.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/stream.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/tcp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/tty.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/threadpool.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/timer.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/udp.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/util.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/winapi.o \
|
|
||||||
$(obj).target/$(TARGET)/src/libuv/src/win/winsock.o
|
|
||||||
|
|
||||||
# Add to the list of files we specially track dependencies for.
|
|
||||||
all_deps += $(OBJS)
|
|
||||||
|
|
||||||
# CFLAGS et al overrides must be target-local.
|
|
||||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
|
||||||
$(OBJS): TOOLSET := $(TOOLSET)
|
|
||||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
|
||||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
|
||||||
|
|
||||||
# Suffix rules, putting all outputs into $(obj).
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# Try building from generated source, too.
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
|
||||||
@$(call do_cmd,cc,1)
|
|
||||||
|
|
||||||
# End of this set of suffix rules
|
|
||||||
### Rules for final target.
|
|
||||||
LDFLAGS_Debug :=
|
|
||||||
|
|
||||||
LDFLAGS_Release :=
|
|
||||||
|
|
||||||
LIBS :=
|
|
||||||
|
|
||||||
$(obj).target/src/libuv/libuv.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
|
||||||
$(obj).target/src/libuv/libuv.a: LIBS := $(LIBS)
|
|
||||||
$(obj).target/src/libuv/libuv.a: TOOLSET := $(TOOLSET)
|
|
||||||
$(obj).target/src/libuv/libuv.a: $(OBJS) FORCE_DO_CMD
|
|
||||||
$(call do_cmd,alink)
|
|
||||||
|
|
||||||
all_deps += $(obj).target/src/libuv/libuv.a
|
|
||||||
# Add target alias
|
|
||||||
.PHONY: uv
|
|
||||||
uv: $(obj).target/src/libuv/libuv.a
|
|
||||||
|
|
||||||
# Add target alias to "all" target.
|
|
||||||
.PHONY: all
|
|
||||||
all: uv
|
|
||||||
|
|
12
mk/rt.mk
12
mk/rt.mk
|
@ -88,16 +88,16 @@ endif
|
||||||
|
|
||||||
ifeq ($$(CFG_WINDOWSY), 1)
|
ifeq ($$(CFG_WINDOWSY), 1)
|
||||||
LIBUV_OSTYPE_$(1) := win
|
LIBUV_OSTYPE_$(1) := win
|
||||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/Release/obj.target/src/libuv/libuv.a
|
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||||
else ifeq ($(CFG_OSTYPE), apple-darwin)
|
else ifeq ($(CFG_OSTYPE), apple-darwin)
|
||||||
LIBUV_OSTYPE_$(1) := mac
|
LIBUV_OSTYPE_$(1) := mac
|
||||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/Release/libuv.a
|
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||||
else ifeq ($(CFG_OSTYPE), unknown-freebsd)
|
else ifeq ($(CFG_OSTYPE), unknown-freebsd)
|
||||||
LIBUV_OSTYPE_$(1) := unix/freebsd
|
LIBUV_OSTYPE_$(1) := unix/freebsd
|
||||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/Release/obj.target/src/libuv/libuv.a
|
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||||
else
|
else
|
||||||
LIBUV_OSTYPE_$(1) := unix/linux
|
LIBUV_OSTYPE_$(1) := unix/linux
|
||||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/Release/obj.target/src/libuv/libuv.a
|
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RUNTIME_DEF_$(1) := rt/rustrt$$(CFG_DEF_SUFFIX)
|
RUNTIME_DEF_$(1) := rt/rustrt$$(CFG_DEF_SUFFIX)
|
||||||
|
@ -158,7 +158,7 @@ LIBUV_DEPS := $$(wildcard \
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
||||||
$$(Q)$$(MAKE) -C $$(S)mk/libuv/$$(LIBUV_ARCH_$(1))/$$(LIBUV_OSTYPE_$(1)) \
|
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
|
||||||
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
||||||
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
||||||
CC="$$(CFG_GCCISH_CROSS)$$(CC)" \
|
CC="$$(CFG_GCCISH_CROSS)$$(CC)" \
|
||||||
|
@ -166,7 +166,7 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
||||||
AR="$$(CFG_GCCISH_CROSS)$$(AR)" \
|
AR="$$(CFG_GCCISH_CROSS)$$(AR)" \
|
||||||
BUILDTYPE=Release \
|
BUILDTYPE=Release \
|
||||||
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
|
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
|
||||||
V=$$(VERBOSE) FLOCK= uv
|
V=$$(VERBOSE) FLOCK=
|
||||||
|
|
||||||
# These could go in rt.mk or rustllvm.mk, they're needed for both.
|
# These could go in rt.mk or rustllvm.mk, they're needed for both.
|
||||||
|
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This script generates rust compatible makefiles from libuv. When upgrading
|
|
||||||
# libuv, do:
|
|
||||||
#
|
|
||||||
# cd $RUST_DIR
|
|
||||||
# cd src/libuv
|
|
||||||
# git checkout master
|
|
||||||
# git pull
|
|
||||||
# svn co http://gyp.googlecode.com/svn/trunk build/gyp
|
|
||||||
# cd ../..
|
|
||||||
# rm -r mk/libuv
|
|
||||||
# ./src/etc/gyp-uv
|
|
||||||
#
|
|
||||||
# Note: you must not run gyp on windows. It will get the backslashes
|
|
||||||
# incorrect in its rules, and not work.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd `dirname $0`
|
|
||||||
cd ../..
|
|
||||||
|
|
||||||
GYPFILE=src/libuv/uv.gyp
|
|
||||||
INCLUDES="-I src/libuv/common.gypi"
|
|
||||||
|
|
||||||
for ARCH in ia32 x86_64
|
|
||||||
do
|
|
||||||
ARGS="$GYPFILE \
|
|
||||||
$INCLUDES \
|
|
||||||
--depth . \
|
|
||||||
-Dcomponent=static_library \
|
|
||||||
-Dlibrary=static_library \
|
|
||||||
-Dtarget_arch=$ARCH"
|
|
||||||
|
|
||||||
./src/libuv/build/gyp/gyp $ARGS \
|
|
||||||
-f make-mac \
|
|
||||||
--generator-output mk/libuv/$ARCH/mac \
|
|
||||||
-DOS=mac
|
|
||||||
|
|
||||||
./src/libuv/build/gyp/gyp $ARGS \
|
|
||||||
-f make-linux \
|
|
||||||
--generator-output mk/libuv/$ARCH/unix \
|
|
||||||
-DOS=linux
|
|
||||||
|
|
||||||
./src/libuv/build/gyp/gyp $ARGS \
|
|
||||||
-f make-linux \
|
|
||||||
--generator-output mk/libuv/$ARCH/win \
|
|
||||||
-DOS=win
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
# On Mac, GYP hardcodes a -arch i386 into the output. Fix that.
|
|
||||||
sed -i \
|
|
||||||
-e 's/-arch i386/-arch x86_64/' \
|
|
||||||
mk/libuv/x86_64/mac/src/libuv/*.mk
|
|
||||||
|
|
||||||
MKFILES=$(find mk/libuv -name \*.mk -o -name Makefile)
|
|
||||||
|
|
||||||
# Comment out the gyp auto regeneration
|
|
||||||
perl -i -p -e 's@^(Makefile:.*)@#\1@go' $MKFILES
|
|
||||||
perl -i -p -e 's@^(Makefile:.*)@#\1@go' $MKFILES
|
|
||||||
perl -i -p -e 's@(.*regen_makefile.*)@#\1@go' $MKFILES
|
|
Loading…
Reference in New Issue