2011-11-02 00:50:47 +01:00
|
|
|
# This is a procedure to define the targets for building
|
2013-05-04 01:25:04 +02:00
|
|
|
# the runtime.
|
2011-11-02 00:50:47 +01:00
|
|
|
#
|
|
|
|
# Argument 1 is the target triple.
|
|
|
|
#
|
|
|
|
# This is not really the right place to explain this, but
|
|
|
|
# for those of you who are not Makefile gurus, let me briefly
|
2013-05-04 01:25:04 +02:00
|
|
|
# cover the $ expansion system in use here, because it
|
2011-11-02 00:50:47 +01:00
|
|
|
# confused me for a while! The variable DEF_RUNTIME_TARGETS
|
|
|
|
# will be defined once and then expanded with different
|
|
|
|
# values substituted for $(1) each time it is called.
|
2013-05-04 01:25:04 +02:00
|
|
|
# That resulting text is then eval'd.
|
2011-11-02 00:50:47 +01:00
|
|
|
#
|
|
|
|
# For most variables, you could use a single $ sign. The result
|
|
|
|
# is that the substitution would occur when the CALL occurs,
|
|
|
|
# I believe. The problem is that the automatic variables $< and $@
|
|
|
|
# need to be expanded-per-rule. Therefore, for those variables at
|
2013-05-04 01:25:04 +02:00
|
|
|
# least, you need $$< and $$@ in the variable text. This way, after
|
2011-11-02 00:50:47 +01:00
|
|
|
# the CALL substitution occurs, you will have $< and $@. This text
|
|
|
|
# will then be evaluated, and all will work as you like.
|
|
|
|
#
|
|
|
|
# Reader beware, this explanantion could be wrong, but it seems to
|
2013-05-04 01:25:04 +02:00
|
|
|
# fit the experimental data (i.e., I was able to get the system
|
|
|
|
# working under these assumptions).
|
2011-11-02 00:50:47 +01:00
|
|
|
|
2011-11-02 05:05:56 +01:00
|
|
|
# Hack for passing flags into LIBUV, see below.
|
2011-12-01 08:17:42 +01:00
|
|
|
LIBUV_FLAGS_i386 = -m32 -fPIC
|
|
|
|
LIBUV_FLAGS_x86_64 = -m64 -fPIC
|
2013-05-05 16:29:10 +02:00
|
|
|
ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
2013-02-27 06:53:35 +01:00
|
|
|
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
|
2013-05-05 16:29:10 +02:00
|
|
|
else
|
|
|
|
LIBUV_FLAGS_arm = -fPIC -std=gnu99
|
|
|
|
endif
|
2013-03-19 06:32:03 +01:00
|
|
|
LIBUV_FLAGS_mips = -fPIC -mips32r2 -msoft-float -mabi=32
|
2011-11-02 05:05:56 +01:00
|
|
|
|
2012-03-27 00:54:22 +02:00
|
|
|
# when we're doing a snapshot build, we intentionally degrade as many
|
|
|
|
# features in libuv and the runtime as possible, to ease portability.
|
|
|
|
|
|
|
|
SNAP_DEFINES:=
|
|
|
|
ifneq ($(strip $(findstring snap,$(MAKECMDGOALS))),)
|
|
|
|
SNAP_DEFINES=-DRUST_SNAPSHOT
|
|
|
|
endif
|
|
|
|
|
2011-11-02 00:50:47 +01:00
|
|
|
define DEF_RUNTIME_TARGETS
|
|
|
|
|
2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Runtime (C++) library variables
|
|
|
|
######################################################################
|
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
# $(1) is the target triple
|
|
|
|
# $(2) is the stage number
|
|
|
|
|
|
|
|
RUNTIME_CFLAGS_$(1)_$(2) = -D_RUST_STAGE$(2)
|
|
|
|
RUNTIME_CXXFLAGS_$(1)_$(2) = -D_RUST_STAGE$(2)
|
|
|
|
|
2013-06-07 02:27:22 +02:00
|
|
|
# XXX: Like with --cfg stage0, pass the defines for stage1 to the stage0
|
|
|
|
# build of non-build-triple host compilers
|
|
|
|
ifeq ($(2),0)
|
|
|
|
ifneq ($(strip $(CFG_BUILD_TRIPLE)),$(strip $(1)))
|
|
|
|
RUNTIME_CFLAGS_$(1)_$(2) = -D_RUST_STAGE1
|
|
|
|
RUNTIME_CXXFLAGS_$(1)_$(2) = -D_RUST_STAGE1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
RUNTIME_CXXS_$(1)_$(2) := \
|
2011-11-02 00:50:47 +01:00
|
|
|
rt/sync/timer.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/sync/lock_and_signal.cpp \
|
2012-02-09 23:24:19 +01:00
|
|
|
rt/sync/rust_thread.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/rust.cpp \
|
|
|
|
rt/rust_builtin.cpp \
|
|
|
|
rt/rust_run_program.cpp \
|
2011-07-27 23:34:39 +02:00
|
|
|
rt/rust_env.cpp \
|
2013-02-14 09:37:01 +01:00
|
|
|
rt/rust_rng.cpp \
|
2012-03-30 01:31:30 +02:00
|
|
|
rt/rust_sched_loop.cpp \
|
2012-03-30 00:21:32 +02:00
|
|
|
rt/rust_sched_launcher.cpp \
|
2012-03-31 02:10:02 +02:00
|
|
|
rt/rust_sched_driver.cpp \
|
2012-02-04 00:12:18 +01:00
|
|
|
rt/rust_scheduler.cpp \
|
2012-03-30 22:54:37 +02:00
|
|
|
rt/rust_sched_reaper.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/rust_task.cpp \
|
2012-02-09 00:28:25 +01:00
|
|
|
rt/rust_stack.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/rust_upcall.cpp \
|
2011-12-01 08:26:23 +01:00
|
|
|
rt/rust_uv.cpp \
|
2012-07-16 21:28:15 +02:00
|
|
|
rt/rust_crate_map.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/rust_log.cpp \
|
2012-07-16 21:28:15 +02:00
|
|
|
rt/rust_gc_metadata.cpp \
|
2012-06-18 22:16:38 +02:00
|
|
|
rt/rust_util.cpp \
|
2013-01-14 01:53:13 +01:00
|
|
|
rt/rust_exchange_alloc.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/isaac/randport.cpp \
|
2012-08-28 22:59:48 +02:00
|
|
|
rt/miniz.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/rust_kernel.cpp \
|
2011-08-20 23:22:09 +02:00
|
|
|
rt/rust_abi.cpp \
|
2011-09-23 20:42:20 +02:00
|
|
|
rt/rust_debug.cpp \
|
2011-05-01 22:18:52 +02:00
|
|
|
rt/memory_region.cpp \
|
2012-02-02 03:52:08 +01:00
|
|
|
rt/boxed_region.cpp \
|
2012-04-05 05:32:23 +02:00
|
|
|
rt/arch/$$(HOST_$(1))/context.cpp \
|
2013-02-27 06:53:35 +01:00
|
|
|
rt/arch/$$(HOST_$(1))/gpr.cpp \
|
2013-03-27 22:12:40 +01:00
|
|
|
rt/rust_android_dummy.cpp \
|
|
|
|
rt/rust_test_helpers.cpp
|
2011-05-18 21:43:48 +02:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
RUNTIME_CS_$(1)_$(2) := rt/linenoise/linenoise.c rt/linenoise/utf8.c
|
2012-10-30 02:08:36 +01:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
RUNTIME_S_$(1)_$(2) := rt/arch/$$(HOST_$(1))/_context.S \
|
|
|
|
rt/arch/$$(HOST_$(1))/ccall.S \
|
|
|
|
rt/arch/$$(HOST_$(1))/record_sp.S
|
2011-05-24 23:00:45 +02:00
|
|
|
|
2013-03-02 13:25:12 +01:00
|
|
|
ifeq ($$(CFG_WINDOWSY_$(1)), 1)
|
2013-05-24 08:49:20 +02:00
|
|
|
LIBUV_OSTYPE_$(1)_$(2) := win
|
|
|
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
2013-06-01 23:50:26 +02:00
|
|
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/jemalloc.lib
|
2013-03-04 05:49:01 +01:00
|
|
|
else ifeq ($(OSTYPE_$(1)), apple-darwin)
|
2013-05-24 08:49:20 +02:00
|
|
|
LIBUV_OSTYPE_$(1)_$(2) := mac
|
|
|
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
2013-05-20 07:15:50 +02:00
|
|
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
2013-03-04 05:49:01 +01:00
|
|
|
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
|
2013-05-24 08:49:20 +02:00
|
|
|
LIBUV_OSTYPE_$(1)_$(2) := unix/freebsd
|
|
|
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
2013-05-20 07:15:50 +02:00
|
|
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
2013-03-13 01:21:12 +01:00
|
|
|
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
2013-05-24 08:49:20 +02:00
|
|
|
LIBUV_OSTYPE_$(1)_$(2) := unix/android
|
|
|
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
2013-05-20 07:15:50 +02:00
|
|
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
2011-11-02 00:50:47 +01:00
|
|
|
else
|
2013-05-24 08:49:20 +02:00
|
|
|
LIBUV_OSTYPE_$(1)_$(2) := unix/linux
|
|
|
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
2013-05-20 07:15:50 +02:00
|
|
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
2011-11-02 00:50:47 +01:00
|
|
|
endif
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
RUNTIME_DEF_$(1)_$(2) := rt/rustrt$(CFG_DEF_SUFFIX_$(1))
|
|
|
|
RUNTIME_INCS_$(1)_$(2) := -I $$(S)src/rt -I $$(S)src/rt/isaac -I $$(S)src/rt/uthash \
|
2012-10-30 02:08:36 +01:00
|
|
|
-I $$(S)src/rt/arch/$$(HOST_$(1)) \
|
|
|
|
-I $$(S)src/rt/linenoise \
|
|
|
|
-I $$(S)src/libuv/include
|
2013-05-24 08:49:20 +02:00
|
|
|
RUNTIME_OBJS_$(1)_$(2) := $$(RUNTIME_CXXS_$(1)_$(2):rt/%.cpp=rt/$(1)/stage$(2)/%.o) \
|
|
|
|
$$(RUNTIME_CS_$(1)_$(2):rt/%.c=rt/$(1)/stage$(2)/%.o) \
|
|
|
|
$$(RUNTIME_S_$(1)_$(2):rt/%.S=rt/$(1)/stage$(2)/%.o)
|
|
|
|
ALL_OBJ_FILES += $$(RUNTIME_OBJS_$(1)_$(2))
|
2012-06-14 20:07:19 +02:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
MORESTACK_OBJ_$(1)_$(2) := rt/$(1)/stage$(2)/arch/$$(HOST_$(1))/morestack.o
|
|
|
|
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2))
|
2012-06-14 20:07:19 +02:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
rt/$(1)/stage$(2)/%.o: rt/%.cpp $$(MKFILE_DEPS)
|
2011-11-02 00:50:47 +01:00
|
|
|
@$$(call E, compile: $$@)
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \
|
|
|
|
$$(SNAP_DEFINES) $$(RUNTIME_CXXFLAGS_$(1)_$(2))) $$<
|
2011-11-02 00:50:47 +01:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
rt/$(1)/stage$(2)/%.o: rt/%.c $$(MKFILE_DEPS)
|
2011-11-02 00:50:47 +01:00
|
|
|
@$$(call E, compile: $$@)
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \
|
|
|
|
$$(SNAP_DEFINES) $$(RUNTIME_CFLAGS_$(1)_$(2))) $$<
|
2011-11-02 00:50:47 +01:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
rt/$(1)/stage$(2)/%.o: rt/%.S $$(MKFILE_DEPS) \
|
2013-02-22 01:15:01 +01:00
|
|
|
$$(LLVM_CONFIG_$$(CFG_BUILD_TRIPLE))
|
2011-11-02 00:50:47 +01:00
|
|
|
@$$(call E, compile: $$@)
|
2011-12-10 01:02:50 +01:00
|
|
|
$$(Q)$$(call CFG_ASSEMBLE_$(1),$$@,$$<)
|
2011-11-02 00:50:47 +01:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
rt/$(1)/stage$(2)/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJ_$(1)_$(2))
|
2011-11-29 02:23:13 +01:00
|
|
|
@$$(call E, link: $$@)
|
2013-03-13 18:26:09 +01:00
|
|
|
$$(Q)$(AR_$(1)) rcs $$@ $$<
|
2011-11-29 02:23:13 +01:00
|
|
|
|
2013-05-24 08:49:20 +02:00
|
|
|
rt/$(1)/stage$(2)/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS) \
|
2013-06-18 21:03:14 +02:00
|
|
|
$$(RUNTIME_DEF_$(1)_$(2)) $$(LIBUV_LIB_$(1)_$(2))
|
2011-11-02 00:50:47 +01:00
|
|
|
@$$(call E, link: $$@)
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@, $$(RUNTIME_OBJS_$(1)_$(2)) \
|
2013-06-18 21:03:14 +02:00
|
|
|
$$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) $$(LIBUV_LIB_$(1)_$(2)) \
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(CFG_LIBUV_LINK_FLAGS_$(1)),$$(RUNTIME_DEF_$(1)_$(2)),$$(CFG_RUNTIME_$(1)))
|
2011-06-14 17:28:10 +02:00
|
|
|
|
2012-06-14 00:07:19 +02:00
|
|
|
# FIXME: For some reason libuv's makefiles can't figure out the
|
|
|
|
# correct definition of CC on the mingw I'm using, so we are
|
|
|
|
# explicitly using gcc. Also, we have to list environment variables
|
|
|
|
# first on windows... mysterious
|
2012-02-10 21:07:01 +01:00
|
|
|
|
|
|
|
ifdef CFG_ENABLE_FAST_MAKE
|
|
|
|
LIBUV_DEPS := $$(S)/.gitmodules
|
|
|
|
else
|
|
|
|
LIBUV_DEPS := $$(wildcard \
|
|
|
|
$$(S)src/libuv/* \
|
|
|
|
$$(S)src/libuv/*/* \
|
|
|
|
$$(S)src/libuv/*/*/* \
|
|
|
|
$$(S)src/libuv/*/*/*/*)
|
|
|
|
endif
|
|
|
|
|
2013-03-07 07:36:20 +01:00
|
|
|
# XXX: Shouldn't need platform-specific conditions here
|
2013-03-02 13:25:12 +01:00
|
|
|
ifdef CFG_WINDOWSY_$(1)
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
|
2013-02-02 21:14:04 +01:00
|
|
|
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
|
2013-05-24 08:49:20 +02:00
|
|
|
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
|
2013-02-02 21:14:04 +01:00
|
|
|
OS=mingw \
|
|
|
|
V=$$(VERBOSE)
|
2013-03-13 01:21:12 +01:00
|
|
|
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
|
2013-02-27 06:53:35 +01:00
|
|
|
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
|
2013-05-02 03:54:02 +02:00
|
|
|
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
|
|
|
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
2013-03-07 07:36:20 +01:00
|
|
|
CC="$$(CC_$(1))" \
|
|
|
|
CXX="$$(CXX_$(1))" \
|
|
|
|
AR="$$(AR_$(1))" \
|
2013-02-27 06:53:35 +01:00
|
|
|
BUILDTYPE=Release \
|
2013-05-24 08:49:20 +02:00
|
|
|
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
|
2013-02-27 06:53:35 +01:00
|
|
|
host=android OS=linux \
|
2013-03-02 13:25:12 +01:00
|
|
|
V=$$(VERBOSE)
|
2013-02-27 06:53:35 +01:00
|
|
|
else
|
2013-05-24 08:49:20 +02:00
|
|
|
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
|
2013-01-30 18:56:54 +01:00
|
|
|
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
|
2013-05-02 03:54:02 +02:00
|
|
|
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
|
|
|
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
2013-03-19 06:32:03 +01:00
|
|
|
CC="$$(CC_$(1))" \
|
|
|
|
CXX="$$(CXX_$(1))" \
|
|
|
|
AR="$$(AR_$(1))" \
|
2013-05-24 08:49:20 +02:00
|
|
|
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
|
2013-02-02 16:40:40 +01:00
|
|
|
V=$$(VERBOSE)
|
2013-02-02 21:14:04 +01:00
|
|
|
endif
|
|
|
|
|
2013-06-13 04:48:22 +02:00
|
|
|
ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
|
|
|
$$(JEMALLOC_LIB_$(1)_$(2)):
|
|
|
|
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure \
|
|
|
|
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) --disable-tls \
|
|
|
|
EXTRA_CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
|
|
|
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
|
|
|
CC="$$(CC_$(1))" \
|
|
|
|
CXX="$$(CXX_$(1))" \
|
|
|
|
AR="$$(AR_$(1))"
|
|
|
|
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
|
|
|
|
else
|
2013-05-20 07:15:50 +02:00
|
|
|
$$(JEMALLOC_LIB_$(1)_$(2)):
|
2013-06-07 23:24:25 +02:00
|
|
|
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure \
|
2013-06-10 07:21:34 +02:00
|
|
|
--disable-experimental --build=$(CFG_BUILD_TRIPLE) --host=$(1) \
|
|
|
|
EXTRA_CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
|
|
|
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
|
|
|
CC="$$(CC_$(1))" \
|
|
|
|
CXX="$$(CXX_$(1))" \
|
|
|
|
AR="$$(AR_$(1))"
|
2013-05-20 07:15:50 +02:00
|
|
|
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
|
2013-06-13 04:48:22 +02:00
|
|
|
endif
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2013-06-10 07:21:34 +02:00
|
|
|
|
2011-05-01 22:18:52 +02:00
|
|
|
# These could go in rt.mk or rustllvm.mk, they're needed for both.
|
|
|
|
|
2011-11-02 22:22:07 +01:00
|
|
|
# This regexp has a single $, escaped twice
|
2011-12-30 09:18:55 +01:00
|
|
|
%.bsd.def: %.def.in $$(MKFILE_DEPS)
|
|
|
|
@$$(call E, def: $$@)
|
|
|
|
$$(Q)echo "{" > $$@
|
|
|
|
$$(Q)sed 's/.$$$$/&;/' $$< >> $$@
|
|
|
|
$$(Q)echo "};" >> $$@
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
%.linux.def: %.def.in $$(MKFILE_DEPS)
|
2011-11-02 00:50:47 +01:00
|
|
|
@$$(call E, def: $$@)
|
|
|
|
$$(Q)echo "{" > $$@
|
2011-11-02 22:22:07 +01:00
|
|
|
$$(Q)sed 's/.$$$$/&;/' $$< >> $$@
|
2011-11-02 00:50:47 +01:00
|
|
|
$$(Q)echo "};" >> $$@
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2013-03-02 13:25:12 +01:00
|
|
|
%.darwin.def: %.def.in $$(MKFILE_DEPS)
|
|
|
|
@$$(call E, def: $$@)
|
|
|
|
$$(Q)sed 's/^./_&/' $$< > $$@
|
|
|
|
|
2013-02-27 06:53:35 +01:00
|
|
|
%.android.def: %.def.in $$(MKFILE_DEPS)
|
|
|
|
@$$(call E, def: $$@)
|
|
|
|
$$(Q)echo "{" > $$@
|
|
|
|
$$(Q)sed 's/.$$$$/&;/' $$< >> $$@
|
|
|
|
$$(Q)echo "};" >> $$@
|
|
|
|
|
2013-03-02 13:25:12 +01:00
|
|
|
%.mingw32.def: %.def.in $$(MKFILE_DEPS)
|
2011-11-02 00:50:47 +01:00
|
|
|
@$$(call E, def: $$@)
|
|
|
|
$$(Q)echo LIBRARY $$* > $$@
|
|
|
|
$$(Q)echo EXPORTS >> $$@
|
|
|
|
$$(Q)sed 's/^./ &/' $$< >> $$@
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Instantiate template for all stages
|
2013-05-24 08:49:20 +02:00
|
|
|
$(foreach stage,$(STAGES), \
|
|
|
|
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(call DEF_RUNTIME_TARGETS,$(target),$(stage)))))
|