#Makefile for Ether of Creatures C++ application #Created by Louise Stella on 02/06/2017 INC_DIR = include SRC_DIR = src OBJ_DIR = build LIB_DIR = lib CC = g++ CFLAGS = -O0 -g -W -Wall -pedantic -std=c++11 -ansi -I. -I$(INC_DIR) ARCHIVE = ar linux: jokenpo.a jokenpo.so static_jokenpo dynamic_jokenpo jokenpo.a: $(SRC_DIR)/jokenpo.cpp $(INC_DIR)/jokenpo.hpp $(CC) $(CFLAGS) -c $(SRC_DIR)/jokenpo.cpp -o $(OBJ_DIR)/jokenpo.o $(AR) rcs $(LIB_DIR)/$@ $(OBJ_DIR)/jokenpo.o @echo "+++ [Static library created at $(LIB_DIR)/$@] +++" jokenpo.so: $(SRC_DIR)/jokenpo.cpp $(INC_DIR)/jokenpo.hpp $(CC) $(CFLAGS) -fPIC -c $(SRC_DIR)/jokenpo.cpp -o $(OBJ_DIR)/jokenpo.o $(CC) -shared -fPIC -o $(LIB_DIR)/$@ $(OBJ_DIR)/jokenpo.o @echo "+++ [Dynamic library created at $(LIB_DIR)/$@] +++" static_jokenpo: $(CC) $(CFLAGS) $(SRC_DIR)/main.cpp $(LIB_DIR)/jokenpo.a -o $(OBJ_DIR)/$@ dynamic_jokenpo: $(CC) $(CFLAGS) $(SRC_DIR)/main.cpp $(LIB_DIR)/jokenpo.so -o $(OBJ_DIR)/$@ clean: @echo "Removing object files and executable/binaries..." @rm -rf $(OBJ_DIR)