mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
61 lines
1.9 KiB
Text
61 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)
|