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.

80 linhas
2.8 KiB

há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
há 5 anos
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 := -clang++
  21. DEBUG := -g -O0 -DUNITTEST
  22. RELEASE := -s -O3 -fno-rtti
  23. CXXFLAGS := $(RELEASE) -Wno-unknown-warning-option -Wno-address-of-packed-member -pedantic-errors -Wall -Wextra -Werror -Wfatal-errors -std=c++17 -m64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
  24. LDFLAGS := -L/usr/lib
  25. BUILD := build
  26. OBJ_DIR := $(BUILD)/objects
  27. APP_DIR := $(BUILD)/apps
  28. TARGET := izaro-storage.cpp
  29. INCLUDE := -Iinclude/ -I./CommandEr/src -I./json/single_include -Itiny-js/
  30. SRC := \
  31. TJS_SRC :=
  32. #pool_allocator.cpp TinyJS.cpp TinyJS_Functions.cpp TinyJS_MathFunctions.cpp TinyJS_StringFunctions.cpp TinyJS_Threading.cpp
  33. TJS_OBJECTS := $(TJS_SRC:%.cpp=$(OBJ_DIR)/%.tjs.o)
  34. OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.o) ./CommandEr/build/commander.o
  35. TEST_OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.test.o)
  36. TARGETNAME := $(TARGET:%.cpp=%)
  37. all: build $(TARGET)
  38. $(OBJ_DIR)/%.tjs.o: tiny-js/%.cpp
  39. @mkdir -p $(@D)
  40. $(CXX) $(CXXFLAGS) -fpermissive -w -Wno-pedantic $(INCLUDE) -o $@ -c $<
  41. $(OBJ_DIR)/%.test.o: %.cpp
  42. @mkdir -p $(@D)
  43. $(CXX) $(CXXFLAGS) -DUSE_CATCH $(INCLUDE) -o $@ -c $<
  44. $(OBJ_DIR)/%.o: %.cpp
  45. @mkdir -p $(@D)
  46. $(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
  47. $(TARGET): $(OBJECTS) $(TJS_OBJECTS) build
  48. make -C CommandEr
  49. @mkdir -p $(@D)
  50. $(CXX) $(CXXFLAGS) -pthread $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/$(TARGETNAME) src/$(TARGET) $(OBJECTS) $(TJS_OBJECTS)
  51. $(CXX) $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/test_client src/test_client.cpp
  52. $(CXX) $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/db_stats src/db_stats.cpp
  53. .PHONY: all build clean
  54. ASTYLE_FLAGS= --style=stroustrup --align-reference=type --align-pointer=type --break-blocks \
  55. --indent-namespaces --indent=tab --add-brackets
  56. format:
  57. astyle $(ASTYLE_FLAGS) include/*
  58. astyle $(ASTYLE_FLAGS) src/*
  59. build:
  60. @mkdir -p $(APP_DIR)
  61. @mkdir -p $(OBJ_DIR)
  62. clean:
  63. rm -rf build/*
  64. rm -rf src/*.orig
  65. rm -rf include/*.orig