Skip to content

Commit

Permalink
added perl6_ops.c and compile it to dll
Browse files Browse the repository at this point in the history
This pulls in nqp::backendconfig to get build flags to build it.
  • Loading branch information
FROGGS committed Oct 24, 2013
1 parent c3ba078 commit 36ce066
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ConfigureMoar.pl
Expand Up @@ -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";

Expand Down
4 changes: 4 additions & 0 deletions src/vm/moar/ops/perl6_ops.c
@@ -0,0 +1,4 @@
#include "moar.h"



18 changes: 18 additions & 0 deletions 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
Expand All @@ -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
Expand All @@ -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) \
Expand Down

0 comments on commit 36ce066

Please sign in to comment.