An implementation of Q floating point format over C++
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.

47 lines
1.5 KiB

6 years ago
6 years ago
6 years ago
  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. CXX := -g++-7
  16. CXXFLAGS := -pedantic-errors -Wall -Wextra -Werror -O3 -Wno-unused-parameter -std=c++17
  17. LDFLAGS := -L/usr/lib -lstdc++ -lm -lpthread
  18. BUILD := build
  19. OBJ_DIR := $(BUILD)/objects
  20. APP_DIR := $(BUILD)/apps
  21. TARGET := program
  22. INCLUDE := -Iinclude/
  23. SRC := \
  24. $(wildcard src/TinyJS/*.cpp) \
  25. $(wildcard src/*.cpp) \
  26. OBJECTS := $(SRC:%.cpp=$(OBJ_DIR)/%.o)
  27. all: build $(TARGET)
  28. $(OBJ_DIR)/%.o: %.cpp
  29. @mkdir -p $(@D)
  30. $(CXX) $(CXXFLAGS) $(INCLUDE) -o $@ -c $<
  31. $(TARGET): $(OBJECTS)
  32. @mkdir -p $(@D)
  33. $(CXX) $(CXXFLAGS) $(INCLUDE) $(LDFLAGS) -o $(APP_DIR)/$(TARGET) $(OBJECTS)
  34. .PHONY: all build clean
  35. build:
  36. @mkdir -p $(APP_DIR)
  37. @mkdir -p $(OBJ_DIR)
  38. clean:
  39. rm -rf build/*