Goddess of Justice DB, the database used for storage on IzaroDFS
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

76 строки
2.7 KiB

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++2a -m64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fmodules-ts
  24. LDFLAGS := -L/usr/lib
  25. BUILD := build
  26. OBJ_DIR := $(BUILD)/objects
  27. MOD_DIR := $(BUILD)/modules
  28. APP_DIR := $(BUILD)/apps
  29. TARGET := izaro-storage.cpp
  30. INCLUDE := -Iinclude/ -I../CommandEr/src -I../json/single_include -I../tiny-js/
  31. SRC := \
  32. MODULES := $(wildcard modules/*.cpp)
  33. CMODULES := $(MODULES:%.cpp=$(MOD_DIR)/%.pcm)
  34. OMODULES := $(MODULES:%.cpp=$(MOD_DIR)/%.o)
  35. TJS_SRC :=
  36. #pool_allocator.cpp TinyJS.cpp TinyJS_Functions.cpp TinyJS_MathFunctions.cpp TinyJS_StringFunctions.cpp TinyJS_Threading.cpp
  37. TJS_OBJECTS := $(TJS_SRC:%.cpp=$(OBJ_DIR)/%.tjs.o)
  38. OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.o) ../CommandEr/build/commander.o
  39. TEST_OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.test.o)
  40. TARGETNAME := $(TARGET:%.cpp=%)
  41. all: build $(TARGET)
  42. $(MOD_DIR)/%.o: %.cpp
  43. @mkdir -p $(@D)
  44. $(CXX) $(CXXFLAGS) -fmodules-ts --precompile $< -o $(OMODULES:$(MOD_DIR)/%.o=$(MOD_DIR)/%.pcm)
  45. $(CXX) $(CXXFLAGS) -fmodules-ts -c $(OMODULES:$(MOD_DIR)/%.o=$(MOD_DIR)/%.pcm) -o $@
  46. $(TARGET): $(OBJECTS) build
  47. make -C ../CommandEr
  48. @mkdir -p $(@D)
  49. $(CXX) $(CXXFLAGS) -pthread $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/$(TARGETNAME) src/$(TARGET) $(OBJECTS) $(TJS_OBJECTS)
  50. .PHONY: all build clean
  51. ASTYLE_FLAGS= --style=stroustrup --align-reference=type --align-pointer=type --break-blocks \
  52. --indent-namespaces --indent=tab --add-brackets
  53. format:
  54. astyle $(ASTYLE_FLAGS) include/*
  55. astyle $(ASTYLE_FLAGS) src/*
  56. build:
  57. @mkdir -p $(APP_DIR)
  58. @mkdir -p $(OBJ_DIR)
  59. clean:
  60. rm -rf build/*
  61. rm -rf src/*.orig
  62. rm -rf include/*.orig