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.

79 rivejä
2.6 KiB

5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
5 vuotta sitten
  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 -O2 -DUNITTEST
  22. RELEASE := -s -O3 -fno-rtti
  23. CXXFLAGS := $(DEBUG) -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)
  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) $(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. .PHONY: all build clean
  53. ASTYLE_FLAGS= --style=stroustrup --align-reference=type --align-pointer=type --break-blocks \
  54. --indent-namespaces --indent=tab --add-brackets
  55. format:
  56. astyle $(ASTYLE_FLAGS) include/*
  57. astyle $(ASTYLE_FLAGS) src/*
  58. build:
  59. @mkdir -p $(APP_DIR)
  60. @mkdir -p $(OBJ_DIR)
  61. clean:
  62. rm -rf build/*
  63. rm -rf src/*.orig
  64. rm -rf include/*.orig