NO_COLOR = \x1b[0m COMPILE_COLOR = \x1b[32;01m LINK_COLOR = \x1b[31;01m ifdef DEBUG COMPILER_CFLAGS=-fPIC -I ../include -g else COMPILER_CFLAGS=-fPIC -march=native -mtune=native -O2 -I ../include endif SOURCES=utils.cpp system.cpp network.cpp filesystem.cpp OBJECTS=$(patsubst %.cpp,%.o,$(SOURCES)) LIB_NAME=liblsf-1.0.so all: $(LIB_NAME) $(LIB_NAME): $(OBJECTS) @echo -e '$(LINK_COLOR)* Building [$@]$(NO_COLOR)' g++ -shared -o $(LIB_NAME) $(OBJECTS) %.o: %.cpp @echo -e '$(COMPILE_COLOR)* Compiling [$<]$(NO_COLOR)' g++ $(COMPILER_CFLAGS) -c $< clean: @echo -e '$(LINK_COLOR)* Cleaning$(NO_COLOR)' rm -rf $(OBJECTS) rm -rf $(LIB_NAME)