#  GNUMakefile

# Just a snippet to stop executing under other make(1) commands
# that won't understand these lines
ifneq (,)
This makefile requires GNU Make.
endif

bregex_src=${wildcard boost_regex/*.cpp}
bregex_objs=${bregex_src:.cpp=.o}

REGEXLIB = libboost_regex.a
USERDIR = ${R_PACKAGE_DIR}/lib${R_ARCH}
USERLIB = ${USERDIR}/${REGEXLIB}

CXX_STD = CXX11
PKG_LIBS = "${USERLIB}"


.PHONY: all clean 

all: $(SHLIB) 

$(SHLIB): $(USERLIB)

$(USERLIB): ${bregex_objs}
	mkdir -p "${USERDIR}"
	$(AR) rs "${USERLIB}" ${bregex_objs}

clean:
	rm -f $(OBJECTS) $(SHLIB)
