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.

83 lines
3.1 KiB

преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
  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 -I../tiny-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)/test_spam_version src/test_spam_version.cpp
  53. $(CXX) $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/db_stats src/db_stats.cpp
  54. $(CXX) $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/test-time-client tests/time-client.cpp
  55. $(CXX) $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/test-time-server tests/time-server.cpp
  56. .PHONY: all build clean
  57. ASTYLE_FLAGS= --style=stroustrup --align-reference=type --align-pointer=type --break-blocks \
  58. --indent-namespaces --indent=tab --add-brackets
  59. format:
  60. astyle $(ASTYLE_FLAGS) include/*
  61. astyle $(ASTYLE_FLAGS) src/*
  62. build:
  63. @mkdir -p $(APP_DIR)
  64. @mkdir -p $(OBJ_DIR)
  65. clean:
  66. rm -rf build/*
  67. rm -rf src/*.orig
  68. rm -rf include/*.orig