1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/nacl/GNUmakefile.in
yugui 76bc2d1ed7 Imports Ruby's port to NativeClient (a.k.a NaCl).
Patch by Google Inc. [ruby-core:45073].

* configure.in (RUBY_NACL): New M4 func to configure variables for
  NaCl.
  (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
  of Pepper interface types.
  (BTESTRUBY): New variable to specify which ruby should be run on
  "make btest". NaCl can run the built binary by sel_ldr, but it need
  rbconfig.rb. So this variable is distinguished from $MINIRUBY.
  
* thread_pthread.c: Disabled some features on NaCl.

* io.c: ditto.

* process.c: ditto.

* signal.c: ditto.

* file.c: ditto.

* missing/flock.c: ditto.

* nacl/pepper_main.c: An example implementation of Pepper application
  that embeds Ruby.

* nacl/example.html: An example of web page that uses the Pepper
  application.

* nacl/nacl-config.rb: Detects variants of NaCl SDK.

* nacl/GNUmakefile.in: Makefile template for NaCl specific build
  process.

* nacl/package.rb: script for packaging a NaCl-Ruby embedding
  application. 

* nacl/reate_nmf.rb: Wrapper script of create_nmf.py

* dln.c (dln_load): Added a hack to call on NaCl.

* util.c (ruby_getcwd): Path to the current directort is not available
  on NaCl.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 02:48:59 +00:00

60 lines
1.9 KiB
Text

# Copyright 2012 Google Inc. All Rights Reserved.
# Author: yugui@google.com (Yugui Sonoda)
include Makefile
-include uncommon.mk
NACL_SDK_ROOT=@NACL_SDK_ROOT@
NACL_TOOLCHAIN=@NACL_TOOLCHAIN@
NACL_TOOLCHAIN_DIR=$(NACL_SDK_ROOT)/toolchain/$(NACL_TOOLCHAIN)
PATH+=:$(NACL_TOOLCHAIN_DIR)/bin
PYTHON=@PYTHON@
PPROGRAM=pepper-$(PROGRAM)
PEPPER_LIBS=-lppapi
PROGRAM_NMF=$(PROGRAM:.nexe=.nmf)
PPROGRAM_NMF=$(PPROGRAM:.nexe=.nmf)
GNUmakefile: $(srcdir)/nacl/GNUmakefile.in
$(PPROGRAM): $(PROGRAM) pepper_main.$(OBJEXT)
$(Q)$(MAKE) $(MFLAGS) PROGRAM=$(PPROGRAM) MAINOBJ="pepper_main.$(OBJEXT)" LIBS="$(LIBS) $(PEPPER_LIBS)" program
$(PROGRAM_NMF) $(PPROGRAM_NMF): $(@:.nmf=.nexe) nacl/create_nmf.rb
.PHONY: pprogram package show_naclflags
.SUFFIXES: .nexe .nmf
.nexe.nmf:
$(ECHO) generating manifest $@
$(Q)$(MINIRUBY) $(srcdir)/nacl/create_nmf.rb --verbose=$(V) $(@:.nmf=.nexe) $@
pepper_main.$(OBJEXT): $(srcdir)/nacl/pepper_main.c
@$(ECHO) compiling nacl/pepper_main.c
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(srcdir)/nacl/pepper_main.c
ruby.$(OBJEXT):
@$(ECHO) compiling $<
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@.tmp -c $<
$(Q) $(OBJCOPY) --weaken-symbol=rb_load_file $@.tmp $@
@-$(RM) $@.tmp
file.$(OBJEXT):
@$(ECHO) compiling $<
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@.tmp -c $<
$(Q) $(OBJCOPY) --weaken-symbol=rb_file_load_ok $@.tmp $@
@-$(RM) $@.tmp
all: pprogram
main: $(PROGRAM_NMF)
pprogram: showflags $(PPROGRAM) $(PPROGRAM_NMF)
program: $(PROGRAM_NMF)
prog: pprogram
package: pprogram install-lib install-ext-comm install-ext-arch
$(ECHO) generating manifest $@
$(Q)$(MINIRUBY) $(srcdir)/nacl/package.rb $(prefix)
showflags: show_naclflags
show_naclflags:
@echo " PATH = $(PATH)"
@echo " NACL_SDK_ROOT = $(NACL_SDK_ROOT)"
clean-local::
-$(RM) $(PPROGRAM) pepper_main.$(OBJEXT) $(PROGRAM_NMF) $(PPRGORAM_NMF)