|
@@ -1,5 +1,5 @@ |
|
|
ifdef VERSION |
|
|
ifdef VERSION |
|
|
FLAGS += -DVERSION=$(VERSION) |
|
|
|
|
|
|
|
|
FLAGS += -DVERSION=$(VERSION) |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
# Generate dependency files alongside the object files |
|
|
# Generate dependency files alongside the object files |
|
@@ -9,7 +9,7 @@ FLAGS += -g |
|
|
FLAGS += -O3 -march=nocona -ffast-math -fno-finite-math-only |
|
|
FLAGS += -O3 -march=nocona -ffast-math -fno-finite-math-only |
|
|
FLAGS += -Wall -Wextra -Wno-unused-parameter |
|
|
FLAGS += -Wall -Wextra -Wno-unused-parameter |
|
|
ifneq ($(ARCH), mac) |
|
|
ifneq ($(ARCH), mac) |
|
|
CXXFLAGS += -Wsuggest-override |
|
|
|
|
|
|
|
|
CXXFLAGS += -Wsuggest-override |
|
|
endif |
|
|
endif |
|
|
CXXFLAGS += -std=c++11 |
|
|
CXXFLAGS += -std=c++11 |
|
|
|
|
|
|
|
@@ -32,6 +32,9 @@ ifeq ($(ARCH), win) |
|
|
FLAGS += -D_USE_MATH_DEFINES |
|
|
FLAGS += -D_USE_MATH_DEFINES |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
CFLAGS += $(FLAGS) |
|
|
|
|
|
CXXFLAGS += $(FLAGS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OBJECTS += $(patsubst %, build/%.o, $(SOURCES)) |
|
|
OBJECTS += $(patsubst %, build/%.o, $(SOURCES)) |
|
|
DEPS = $(patsubst %, build/%.d, $(SOURCES)) |
|
|
DEPS = $(patsubst %, build/%.d, $(SOURCES)) |
|
@@ -47,16 +50,16 @@ $(TARGET): $(OBJECTS) |
|
|
|
|
|
|
|
|
build/%.c.o: %.c |
|
|
build/%.c.o: %.c |
|
|
@mkdir -p $(@D) |
|
|
@mkdir -p $(@D) |
|
|
$(CC) $(FLAGS) $(CFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
build/%.cpp.o: %.cpp |
|
|
build/%.cpp.o: %.cpp |
|
|
@mkdir -p $(@D) |
|
|
@mkdir -p $(@D) |
|
|
$(CXX) $(FLAGS) $(CXXFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
build/%.cc.o: %.cc |
|
|
build/%.cc.o: %.cc |
|
|
@mkdir -p $(@D) |
|
|
@mkdir -p $(@D) |
|
|
$(CXX) $(FLAGS) $(CXXFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
build/%.m.o: %.m |
|
|
build/%.m.o: %.m |
|
|
@mkdir -p $(@D) |
|
|
@mkdir -p $(@D) |
|
|
$(CC) $(FLAGS) $(CFLAGS) -c -o $@ $< |
|
|
|
|
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $< |