# Program name and version
NAME = Myriads
VER = 1.4
TARGET = $(NAME)$(VER)

# Compiler
CXX = g++

# Preprocessor flags
CPPFLAGS = -I.

# Compiler flags
CXXFLAGS = -O3 -std=c++11

# Libraries
LDLIBS = -lm

# Objects and dependency files
OBJ = Myriads.o
DEP = $(OBJ:.o=.d)


.PHONY: all clean

all: $(TARGET)


$(TARGET): $(OBJ)
	$(CXX) -o $@ $^ $(LDLIBS)


Myriads.o: Myriads.cpp
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MP -c $< -o $@


-include $(DEP)


clean:
	rm -f $(OBJ) $(DEP) core*
