@@ -512,3 +512,28 @@ EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN | |||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE | ||||
SOFTWARE. | SOFTWARE. | ||||
# glibc_version_header | |||||
MIT License | |||||
Copyright (c) 2018 Tom Mason | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||||
of this software and associated documentation files (the "Software"), to deal | |||||
in the Software without restriction, including without limitation the rights | |||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||||
copies of the Software, and to permit persons to whom the Software is | |||||
furnished to do so, subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all | |||||
copies or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||||
SOFTWARE. |
@@ -1,9 +1,8 @@ | |||||
RACK_DIR ?= . | RACK_DIR ?= . | ||||
VERSION = 1.dev.$(shell git rev-parse --short HEAD) | |||||
VERSION := 1.dev.$(shell git rev-parse --short HEAD) | |||||
FLAGS += -DVERSION=$(VERSION) | FLAGS += -DVERSION=$(VERSION) | ||||
FLAGS += -Iinclude | |||||
FLAGS += -Idep/include -Idep/lib/libzip/include | |||||
FLAGS += -Iinclude -Idep/include | |||||
include arch.mk | include arch.mk | ||||
@@ -15,15 +15,13 @@ FLAGS += -g | |||||
FLAGS += -O3 -march=nocona -funsafe-math-optimizations | FLAGS += -O3 -march=nocona -funsafe-math-optimizations | ||||
# Warnings | # Warnings | ||||
FLAGS += -Wall -Wextra -Wno-unused-parameter | FLAGS += -Wall -Wextra -Wno-unused-parameter | ||||
ifneq ($(ARCH), mac) | |||||
CXXFLAGS += -Wsuggest-override | |||||
endif | |||||
# C++ standard | |||||
CXXFLAGS += -std=c++11 | CXXFLAGS += -std=c++11 | ||||
# Architecture-independent flags | |||||
ifdef ARCH_LIN | ifdef ARCH_LIN | ||||
FLAGS += -DARCH_LIN | FLAGS += -DARCH_LIN | ||||
CXXFLAGS += -Wsuggest-override | |||||
endif | endif | ||||
ifdef ARCH_MAC | ifdef ARCH_MAC | ||||
FLAGS += -DARCH_MAC | FLAGS += -DARCH_MAC | ||||
@@ -36,6 +34,7 @@ endif | |||||
ifdef ARCH_WIN | ifdef ARCH_WIN | ||||
FLAGS += -DARCH_WIN | FLAGS += -DARCH_WIN | ||||
FLAGS += -D_USE_MATH_DEFINES | FLAGS += -D_USE_MATH_DEFINES | ||||
CXXFLAGS += -Wsuggest-override | |||||
endif | endif | ||||
CFLAGS += $(FLAGS) | CFLAGS += $(FLAGS) | ||||
@@ -23,6 +23,8 @@ ifdef ARCH_LIN | |||||
LDFLAGS += -shared | LDFLAGS += -shared | ||||
TARGET := plugin.so | TARGET := plugin.so | ||||
RACK_USER_DIR ?= $(HOME)/.Rack | RACK_USER_DIR ?= $(HOME)/.Rack | ||||
# Link to glibc 2.23 | |||||
FLAGS += -include $(RACK_DIR)/include/force_link_glibc_2.23.h | |||||
endif | endif | ||||
ifdef ARCH_MAC | ifdef ARCH_MAC | ||||