PWIZOBJECTS=\
./boost/system/src/error_code.o \
./boost/regex/src/posix_api.o \
./boost/regex/src/fileiter.o \
./boost/regex/src/regex_raw_buffer.o \
./boost/regex/src/cregex.o \
./boost/regex/src/regex_debug.o \
./boost/regex/src/instances.o \
./boost/regex/src/icu.o \
./boost/regex/src/usinstances.o \
./boost/regex/src/regex.o \
./boost/regex/src/wide_posix_api.o \
./boost/regex/src/regex_traits_defaults.o \
./boost/regex/src/winstances.o \
./boost/regex/src/wc_regex_traits.o \
./boost/regex/src/c_regex_traits.o \
./boost/regex/src/cpp_regex_traits.o \
./boost/regex/src/static_mutex.o \
./boost/regex/src/w32_regex_traits.o \
./pwiz/data/msdata/Version.o \
./pwiz/utility/minimxml/XMLWriter.o \
./pwiz/utility/minimxml/SAXParser.o \
./boost/iostreams/src/zlib.o \
./boost/filesystem/src/operations.o \
./pwiz/data/common/MemoryIndex.o \
./pwiz/data/common/CVTranslator.o \
./pwiz/data/common/cv.o \
./pwiz/data/common/ParamTypes.o \
./pwiz/data/common/BinaryIndexStream.o \
./pwiz/data/common/diff_std.o \
./pwiz/data/msdata/SpectrumList_MGF.o \
./pwiz/data/msdata/DefaultReaderList.o \
./pwiz/data/msdata/ChromatogramList_mzML.o \
./pwiz/data/msdata/examples.o \
./pwiz/data/msdata/Serializer_mzML.o \
./pwiz/data/msdata/Serializer_MSn.o \
./pwiz/data/msdata/Reader.o \
./pwiz/data/msdata/Serializer_MGF.o \
./pwiz/data/msdata/Serializer_mzXML.o \
./pwiz/data/msdata/SpectrumList_mzML.o \
./pwiz/data/msdata/SpectrumList_MSn.o \
./pwiz/data/msdata/BinaryDataEncoder.o \
./pwiz/data/msdata/Diff.o \
./pwiz/data/msdata/MSData.o \
./pwiz/data/msdata/References.o \
./pwiz/data/msdata/SpectrumList_mzXML.o \
./pwiz/data/msdata/IO.o \
./pwiz/data/msdata/SpectrumList_BTDX.o \
./pwiz/data/msdata/SpectrumInfo.o \
./pwiz/data/msdata/RAMPAdapter.o \
./pwiz/data/msdata/ramp/wglob.o \
./pwiz/data/msdata/LegacyAdapter.o \
./pwiz/data/msdata/SpectrumIterator.o \
./pwiz/data/msdata/MSDataFile.o \
./pwiz/data/msdata/SpectrumListCache.o \
./pwiz/utility/misc/IntegerSet.o \
./pwiz/utility/misc/Base64.o \
./pwiz/utility/misc/IterationListener.o \
./pwiz/utility/misc/MSIHandler.o \
./pwiz/utility/misc/Filesystem.o \
./pwiz/utility/misc/TabReader.o \
./pwiz/utility/misc/random_access_compressed_ifstream.o \
./pwiz/utility/misc/SHA1.o \
./pwiz/utility/misc/SHA1Calculator.o \
./pwiz/utility/misc/sha1calc.o \
./random_access_gzFile.o


#./boost/thread/src/pthread/once.o \

MZROBJECTS=cramp.o  ramp_base64.o  ramp.o  RcppRamp.o RcppRampModule.o rnetCDF.o

OBJECTS= $(MZROBJECTS) $(PWIZOBJECTS) 

PWIZ_LDFLAGS=
PWIZ_CPPFLAGS=-I./boost_aux/ -I. -I. -DHAVE_PWIZ_MZML_LIB # -DWINDOWS_NATIVE

## Use the R_HOME indirection to support installations of multiple R version
PKG_CPPFLAGS=-D_LARGEFILE_SOURCE $(PWIZ_CPPFLAGS)
PKG_CFLAGS=-D_LARGEFILE_SOURCE -I./win/$(R_ARCH) -D_MSC_VER -DWIN32_LEAN_AND_MEAN -fgnu89-inline

PKG_LIBS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()" ) $(PWIZ_LDFLAGS) -L./win/$(R_ARCH) -lws2_32 -lnetcdf -lz

all: clean $(SHLIB)

clean:
	rm -f $(OBJECTS)

## As an alternative, one can also add this code in a file 'configure'
##
##    PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
## 
##    sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \
##        src/Makevars.in > src/Makevars
## 
## which together with the following file 'src/Makevars.in'
##
##    PKG_LIBS = @PKG_LIBS@
##
## can be used to create src/Makevars dynamically. This scheme is more
## powerful and can be expanded to also check for and link with other
## libraries.  It should be complemented by a file 'cleanup'
##
##    rm src/Makevars
##
## which removes the autogenerated file src/Makevars. 
##
## Of course, autoconf can also be used to write configure files. This is
## done by a number of packages, but recommended only for more advanced users
## comfortable with autoconf and its related tools.