
SHELL = /bin/sh

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

srcdir = /Users/yoshiki/Ruby/rb-gsl/ext
topdir = /usr/local/lib/ruby/1.8/powerpc-darwin7.5.0
hdrdir = $(topdir)
VPATH = $(srcdir)
prefix = $(DESTDIR)/usr/local
exec_prefix = $(prefix)
sitedir = $(prefix)/lib/ruby/site_ruby
rubylibdir = $(libdir)/ruby/$(ruby_version)
builddir = $(ac_builddir)
archdir = $(rubylibdir)/$(arch)
sbindir = $(exec_prefix)/sbin
compile_dir = $(DESTDIR)/usr/local/src/Ruby/ruby-1.8.2-preview3
datadir = $(prefix)/share
includedir = $(prefix)/include
infodir = $(prefix)/info
top_builddir = $(ac_top_builddir)
sysconfdir = $(prefix)/etc
mandir = $(prefix)/man
libdir = $(exec_prefix)/lib
sharedstatedir = $(prefix)/com
oldincludedir = $(DESTDIR)/usr/include
sitearchdir = $(sitelibdir)/$(sitearch)
bindir = $(exec_prefix)/bin
localstatedir = $(prefix)/var
sitelibdir = $(sitedir)/$(ruby_version)
libexecdir = $(exec_prefix)/libexec

CC = gcc
LIBRUBY = $(LIBRUBY_SO)
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static

CFLAGS   =  -fno-common -I../include -Wall -I/usr/local/include 
CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -DHAVE_RNGEXTRA_RNGEXTRA_H -DHAVE_GSL_TENSOR_GSL_TENSOR_H -DHAVE_NARRAY_H -I/usr/local/src/Ruby/narray-0.5.7p3 
CXXFLAGS = $(CFLAGS) 
DLDFLAGS =   
LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
AR = ar
EXEEXT = 

RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = $(RUBY_INSTALL_NAME)
arch = powerpc-darwin7.5.0
sitearch = powerpc-darwin7.5.0
ruby_version = 1.8
ruby = /usr/local/bin/ruby
RUBY = $(ruby)
RM = $(RUBY) -run -e rm -- -f
MAKEDIRS = $(RUBY) -run -e mkdir -- -p
INSTALL_PROG = $(RUBY) -run -e install -- -vpm 0755
INSTALL_DATA = $(RUBY) -run -e install -- -vpm 0644

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


LIBPATH =  -L"$(libdir)"
DEFFILE = 

CLEANFILES = 
DISTCLEANFILES = 

target_prefix = 
LOCAL_LIBS =  -L/usr/local/lib -lgsl -lgslcblas -lm
LIBS = $(LIBRUBYARG_SHARED) -lgsltensor -lrngextra  -ldl -lobjc  
OBJS = array.o array_complex.o blas.o blas1.o blas2.o blas3.o block.o cdf.o cheb.o combination.o common.o complex.o const.o const_additional.o deriv.o dirac.o dht.o diff.o eigen.o error.o fcmp.o fft.o fit.o function.o graph.o gsl.o gsl_narray.o histogram.o histogram2d.o histogram_find.o histogram3d_source.o histogram3d.o ieee.o integration.o interp.o linalg.o linalg_complex.o math.o matrix.o matrix_complex.o matrix_double.o matrix_int.o min.o monte.o multifit.o multimin.o multiroots.o ntuple.o odeiv.o oper_complex_source.o permutation.o poly.o poly2.o qrng.o randist.o rational.o rng.o root.o sf.o sf_airy.o sf_bessel.o sf_clausen.o sf_coulomb.o sf_coupling.o sf_dawson.o sf_debye.o sf_dilog.o sf_elementary.o sf_ellint.o sf_elljac.o sf_erfc.o sf_exp.o sf_expint.o sf_fermi_dirac.o sf_gamma.o sf_gegenbauer.o sf_hyperg.o sf_laguerre.o sf_lambert.o sf_legendre.o sf_log.o sf_power.o sf_psi.o sf_synchrotron.o sf_transport.o sf_trigonometric.o sf_zeta.o siman.o sort.o spline.o stats.o sum.o tensor.o vector.o vector_complex.o vector_double.o vector_int.o wavelet.o
TARGET = rb_gsl
DLLIB = $(TARGET).bundle
STATIC_LIB = $(TARGET).a

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

CLEANLIBS     = "$(TARGET).{lib,exp,il?,tds,map}" $(DLLIB)
CLEANOBJS     = "*.{o,a,s[ol],pdb,bak}"

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

clean:
		@$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)

distclean:	clean
		@$(RM) Makefile extconf.h conftest.* mkmf.log
		@$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)

realclean:	distclean
install: $(RUBYARCHDIR)
install: $(RUBYARCHDIR)/$(DLLIB)
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB) $(RUBYARCHDIR)
	@$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
$(RUBYARCHDIR):
	@$(MAKEDIRS) $(RUBYARCHDIR)

site-install: install

.SUFFIXES: .c .cc .m .cxx .cpp .C .o

.cc.o:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<

.cpp.o:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<

.cxx.o:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<

.C.o:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<

$(DLLIB): $(OBJS)
	@-$(RM) $@
	$(LDSHARED) $(DLDFLAGS) $(LIBPATH) -o $(DLLIB) $(OBJS) $(LOCAL_LIBS) $(LIBS)

$(STATIC_LIB): $(OBJS)
	$(AR) cru $@ $(OBJS)
	@-ranlib $(DLLIB) 2> /dev/null || true

