Goddess of Justice DB, the database used for storage on IzaroDFS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

67 lines
2.1 KiB

#
# **************************************************************
# * Simple C++ Makefile Template *
# * *
# * Author: Arash Partow (2003) *
# * URL: http://www.partow.net/programming/makefile/index.html *
# * *
# * Copyright notice: *
# * Free use of this C++ Makefile template is permitted under *
# * the guidelines and in accordance with the the MIT License *
# * http://www.opensource.org/licenses/MIT *
# * *
# **************************************************************
#
#
# Modifications of the original file are licenced under MIT Licence
#
#(c) Ludovic 'Archivist' Lagouardette 2018
#
CXX := -c++
CXXFLAGS := -pedantic-errors -Wall -Wextra -Werror -g -std=c++17
LDFLAGS := -L/usr/lib -lstdc++ -lm -lpthread -lGL -lGLEW -lglfw
BUILD := build
OBJ_DIR := $(BUILD)/objects
APP_DIR := $(BUILD)/apps
TARGET := izaro-storage.cpp
INCLUDE := -Iinclude/ -I./CommandEr/src -I./json/single_include
SRC := \
OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.o) ./CommandEr/build/commander.o
TEST_OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.test.o)
TARGETNAME := $(TARGET:%.cpp=%)
all: build $(TARGET)
$(OBJ_DIR)/%.test.o: %.cpp
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) -fopenmp -DUSE_CATCH $(INCLUDE) -o $@ -c $<
$(OBJ_DIR)/%.o: %.cpp
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
$(TARGET): $(OBJECTS) build
make -C CommandEr
@mkdir -p $(@D)
$(CXX) -fopenmp $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/$(TARGETNAME) src/$(TARGET) $(OBJECTS)
.PHONY: all build clean
ASTYLE_FLAGS= --style=stroustrup --align-reference=type --align-pointer=type --break-blocks \
--indent-namespaces --indent=tab --add-brackets
format:
astyle $(ASTYLE_FLAGS) include/*
astyle $(ASTYLE_FLAGS) src/*
build:
@mkdir -p $(APP_DIR)
@mkdir -p $(OBJ_DIR)
clean:
rm -rf build/*
rm -rf src/*.orig
rm -rf include/*.orig