From 36ce0662ff01236a00dcd6813d6e93c3dab5746f Mon Sep 17 00:00:00 2001 From: Tobias Leich Date: Thu, 24 Oct 2013 10:59:24 +0200 Subject: [PATCH] added perl6_ops.c and compile it to dll This pulls in nqp::backendconfig to get build flags to build it. --- ConfigureMoar.pl | 3 +++ src/vm/moar/ops/perl6_ops.c | 4 ++++ tools/build/Makefile-Moar.in | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 src/vm/moar/ops/perl6_ops.c diff --git a/ConfigureMoar.pl b/ConfigureMoar.pl index 97156b0cd59..23f6f44d526 100644 --- a/ConfigureMoar.pl +++ b/ConfigureMoar.pl @@ -70,6 +70,9 @@ or push @errors, "Unable to read configuration from $nqp_to_use."; sorry(@errors) if @errors; + + %config = (%nqp_config, %config); + $config{'perl6_ops_dll'} = sprintf($config{'moar::dll'}, 'perl6_ops_moar'); print "Using $nqp_to_use.\n"; diff --git a/src/vm/moar/ops/perl6_ops.c b/src/vm/moar/ops/perl6_ops.c new file mode 100644 index 00000000000..95727afb856 --- /dev/null +++ b/src/vm/moar/ops/perl6_ops.c @@ -0,0 +1,4 @@ +#include "moar.h" + + + diff --git a/tools/build/Makefile-Moar.in b/tools/build/Makefile-Moar.in index 79e3661abf4..adcc3b36425 100644 --- a/tools/build/Makefile-Moar.in +++ b/tools/build/Makefile-Moar.in @@ -1,3 +1,8 @@ +CC = @moar::cc@ +LD = @moar::ld@ +CFLAGS = @moar::cflags@ @moar::ccmiscflags@ @moar::ccoptiflags@ @moar::ccwarnflags@ +LDFLAGS = @moar::ldflags@ @moar::ldmiscflags@ @moar::ldoptiflags@ @moar::ldlibs@ + PERL = perl PROVE = prove GEN_CAT = tools/build/gen-cat.pl moar @@ -15,6 +20,7 @@ RM_F = $(PERL) -MExtUtils::Command -e rm_f RM_RF = $(PERL) -MExtUtils::Command -e rm_rf RUNNER = perl6@runner_suffix@ +PREFIX = @moar::prefix@ # files we create PERL6_MOAR = perl6.moarvm @@ -30,6 +36,18 @@ PERL6_M_MOAR = blib/Perl6/Metamodel.moarvm PERL6_B_MOAR = blib/Perl6/BOOTSTRAP.moarvm SETTING_MOAR = CORE.setting.moarvm +PERL6_OPS_DIR = dynext +PERL6_OPS_DLL = $(PERL6_OPS_DIR)/@perl6_ops_dll@ +PERL6_OPS_OBJ = $(PERL6_OPS_DIR)/perl6_ops@moar::obj@ +PERL6_OPS_SRC = src/vm/moar/ops/perl6_ops.c + +$(PERL6_OPS_DLL): $(PERL6_OPS_SRC) Makefile + $(CC) @moar::ccswitch@ @moar::ccshared@ $(CFLAGS) -I$(PREFIX)/include/libatomic_ops \ + -I$(PREFIX)/include/dyncall -I$(PREFIX)/include/linenoise -I$(PREFIX)/include/moar \ + -I$(PREFIX)/include/sha1 -I$(PREFIX)/include/tinymt -I$(PREFIX)/include/libtommath \ + -I$(PREFIX)/include/libuv @moar::ccout@ $(PERL6_OPS_OBJ) $(PERL6_OPS_SRC) + $(LD) @moar::ldswitch@ @moar::ldshared@ $(LDFLAGS) @moar::ldout@ $(PERL6_OPS_DLL) $(PERL6_OPS_OBJ) + PERL6_LANG_OUTPUT = \ $(PERL6_ML_MOAR) $(PERL6_W_MOAR) $(PERL6_G_MOAR) $(PERL6_OPS_MOAR) \ $(PERL6_A_MOAR) $(PERL6_O_MOAR) $(PERL6_P_MOAR) $(PERL6_C_MOAR) \