Goddess of Justice DB, the database used for storage on IzaroDFS
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

67 linhas
2.1 KiB

há 5 anos
  1. #
  2. # **************************************************************
  3. # * Simple C++ Makefile Template *
  4. # * *
  5. # * Author: Arash Partow (2003) *
  6. # * URL: http://www.partow.net/programming/makefile/index.html *
  7. # * *
  8. # * Copyright notice: *
  9. # * Free use of this C++ Makefile template is permitted under *
  10. # * the guidelines and in accordance with the the MIT License *
  11. # * http://www.opensource.org/licenses/MIT *
  12. # * *
  13. # **************************************************************
  14. #
  15. #
  16. # Modifications of the original file are licenced under MIT Licence
  17. #
  18. #(c) Ludovic 'Archivist' Lagouardette 2018
  19. #
  20. CXX := -c++
  21. CXXFLAGS := -pedantic-errors -Wall -Wextra -Werror -g -std=c++17
  22. LDFLAGS := -L/usr/lib -lstdc++ -lm -lpthread -lGL -lGLEW -lglfw
  23. BUILD := build
  24. OBJ_DIR := $(BUILD)/objects
  25. APP_DIR := $(BUILD)/apps
  26. TARGET := izaro-storage.cpp
  27. INCLUDE := -Iinclude/ -I./CommandEr/src -I./json/single_include
  28. SRC := \
  29. OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.o) ./CommandEr/build/commander.o
  30. TEST_OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.test.o)
  31. TARGETNAME := $(TARGET:%.cpp=%)
  32. all: build $(TARGET)
  33. $(OBJ_DIR)/%.test.o: %.cpp
  34. @mkdir -p $(@D)
  35. $(CXX) $(CXXFLAGS) -fopenmp -DUSE_CATCH $(INCLUDE) -o $@ -c $<
  36. $(OBJ_DIR)/%.o: %.cpp
  37. @mkdir -p $(@D)
  38. $(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
  39. $(TARGET): $(OBJECTS) build
  40. make -C CommandEr
  41. @mkdir -p $(@D)
  42. $(CXX) -fopenmp $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/$(TARGETNAME) src/$(TARGET) $(OBJECTS)
  43. .PHONY: all build clean
  44. ASTYLE_FLAGS= --style=stroustrup --align-reference=type --align-pointer=type --break-blocks \
  45. --indent-namespaces --indent=tab --add-brackets
  46. format:
  47. astyle $(ASTYLE_FLAGS) include/*
  48. astyle $(ASTYLE_FLAGS) src/*
  49. build:
  50. @mkdir -p $(APP_DIR)
  51. @mkdir -p $(OBJ_DIR)
  52. clean:
  53. rm -rf build/*
  54. rm -rf src/*.orig
  55. rm -rf include/*.orig