Makefile

ext/ruby_prof/Makefile
Last Update: 2012-03-24 12:28:07 -0600

SHELL = /bin/sh

#### Start of system configuration section. ####

srcdir = . topdir = c:/MinGW/local/ruby/lib/ruby/1.8/i386-mswin32_100 hdrdir = $(topdir) VPATH = $(srcdir);$(topdir);$(hdrdir)

DESTDIR = c: exec_prefix = $(prefix) prefix = $(DESTDIR)/MinGW/local/ruby sharedstatedir = $(DESTDIR)/etc mandir = $(prefix)/man oldincludedir = $(DESTDIR)/usr/include bindir = $(exec_prefix)/bin libexecdir = $(exec_prefix)/libexec sitedir = $(prefix)/lib/ruby/site_ruby vendorarchdir = $(vendorlibdir)/$(sitearch) includedir = $(prefix)/include infodir = $(prefix)/info vendorlibdir = $(vendordir)/$(ruby_version) sysconfdir = $(prefix)/etc libdir = $(exec_prefix)/lib sbindir = $(exec_prefix)/sbin rubylibdir = $(libdir)/ruby/$(ruby_version) vendordir = $(prefix)/lib/ruby/vendor_ruby archdir = $(rubylibdir)/$(arch) sitearchdir = $(sitelibdir)/$(sitearch) datadir = $(prefix)/share localstatedir = $(DESTDIR)/var sitelibdir = $(sitedir)/$(ruby_version)

CC = cl -nologo LIBRUBY = $(RUBY_SO_NAME).lib LIBRUBY_A = $(RUBY_SO_NAME)-static.lib LIBRUBYARG_SHARED = $(LIBRUBY) LIBRUBYARG_STATIC = $(LIBRUBY_A)

RUBY_EXTCONF_H = CFLAGS = -MD -Zi -O2b2xty-

INCFLAGS = -I. -I. -Ic:/MinGW/local/ruby/lib/ruby/1.8/i386-mswin32_100 -I. DEFS = CPPFLAGS = -DRUBY_VERSION=187 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE

CXXFLAGS = $(CFLAGS) ldflags = dldflags = -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) archflag = DLDFLAGS = $(ldflags) $(dldflags) $(archflag) LDSHARED = cl -nologo -LD AR = lib -nologo EXEEXT = .exe

RUBY_INSTALL_NAME = ruby RUBY_SO_NAME = msvcr100-ruby18 arch = i386-mswin32_100 sitearch = i386-msvcr100 ruby_version = 1.8 ruby = c:/MinGW/local/ruby/bin/ruby RUBY = $(ruby:/=) RM = $(RUBY) -run -e rm -- -f MAKEDIRS = @$(RUBY) -run -e mkdir -- -p INSTALL = @$(RUBY) -run -e install -- -vp INSTALL_PROG = $(INSTALL) -m 0755 INSTALL_DATA = $(INSTALL) -m 0644 COPY = copy > nul

#### End of system configuration section. ####

preload =

libpath = . $(libdir) LIBPATH = -libpath:"." -libpath:"$(libdir)" DEFFILE = $(TARGET)-$(arch).def

CLEANFILES = mkmf.log DISTCLEANFILES = vc*.pdb $(DEFFILE)

extout = extout_prefix = target_prefix = LOCAL_LIBS = LIBS = $(LIBRUBYARG_SHARED) oldnames.lib user32.lib advapi32.lib shell32.lib wsock32.lib

SRCS = rp_call_info.c rp_measure.c rp_measure_allocations.c rp_measure_cpu_time.c rp_measure_gc_runs.c rp_measure_gc_time.c rp_measure_memory.c rp_measure_process_time.c rp_measure_wall_time.c rp_method.c rp_stack.c rp_thread.c ruby_prof.c OBJS = rp_call_info.obj rp_measure.obj rp_measure_allocations.obj rp_measure_cpu_time.obj rp_measure_gc_runs.obj rp_measure_gc_time.obj rp_measure_memory.obj rp_measure_process_time.obj rp_measure_wall_time.obj rp_method.obj rp_stack.obj rp_thread.obj ruby_prof.obj TARGET = ruby_prof DLLIB = $(TARGET).so EXTSTATIC = STATIC_LIB =

BINDIR = $(bindir) RUBYCOMMONDIR = $(sitedir)$(target_prefix) RUBYLIBDIR = $(sitelibdir)$(target_prefix) RUBYARCHDIR = $(sitearchdir)$(target_prefix)

TARGET_SO = $(DLLIB) CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map CLEANOBJS = *.obj *.lib *.s *.pdb *.exp *.bak

all: $(DLLIB) static: $(STATIC_LIB)

clean:

@-$(RM) $(CLEANLIBS:/=\) $(CLEANOBJS:/=\) $(CLEANFILES:/=\)

distclean: clean

@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES:/=\)

realclean: distclean install: install-so install-rb

install-so: $(RUBYARCHDIR) install-so: $(RUBYARCHDIR)/$(DLLIB) $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)

$(INSTALL_PROG) $(DLLIB:/=\) $(RUBYARCHDIR:/=\)

install-rb: pre-install-rb install-rb-default install-rb-default: pre-install-rb-default pre-install-rb: Makefile pre-install-rb-default: Makefile $(RUBYARCHDIR):

$(MAKEDIRS) $@

site-install: site-install-so site-install-rb site-install-so: install-so site-install-rb: install-rb

.SUFFIXES: .c .m .cc .cxx .cpp .obj

{$(hdrdir)}.cc{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(topdir)}.cc{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(srcdir)}.cc{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

.cc.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(hdrdir)}.cxx{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(topdir)}.cxx{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(srcdir)}.cxx{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

.cxx.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(hdrdir)}.cpp{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(topdir)}.cpp{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(srcdir)}.cpp{}.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

.cpp.obj:

$(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)

{$(hdrdir)}.c{}.obj:

$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)

{$(topdir)}.c{}.obj:

$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)

{$(srcdir)}.c{}.obj:

$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)

.c.obj:

$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)

$(DLLIB): $(DEFFILE) $(OBJS) Makefile

@-$(RM) $@
$(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) $(DLDFLAGS) -implib:$(*F:.so=)-$(arch).lib -pdb:$(*F:.so=)-$(arch).pdb -def:$(DEFFILE)
@if exist $(@).manifest mt -nologo -manifest $(@).manifest -outputresource:$(@);2
@if exist $(@).manifest $(RM) $(@:/=\).manifest

$(DEFFILE):

$(RUBY) -e "puts 'EXPORTS', 'Init_$(TARGET)'"  > $@

$(OBJS): {.;$(VPATH)}ruby.h {.;$(VPATH)}defines.h