#!/usr/bin/env make

SRC_DIR  := .
OBJ_DIR  := .
CPPFLAGS :=
CXXFLAGS := --std=c++14

CXXFLAGS += -MMD -MP
MODULESC := $(SRC_DIR)/base64.cpp
OBJECTS := $(MODULESC:$(SRC_DIR)/%.cpp=$(OBJ_DIR)/%.o)

libcppb64.a: $(OBJECTS)
	ar rcs $@ $^

$(OBJECTS): $(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
	@mkdir -p $(@D)
	@$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

clean:
	rm obj/*
	rm libcppb64.a

-include $(OBJECTS:.o=.d)
