From f4834d816389e0fbb8c238c69add3afa383b962a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 26 Dec 2017 10:48:45 -0500 Subject: [PATCH] Build system fixes --- compile.mk | 15 +++++++++------ dep/Makefile | 16 +++++++++++----- include/plugin.hpp | 3 ++- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/compile.mk b/compile.mk index 0ebc1501..307c6fe7 100644 --- a/compile.mk +++ b/compile.mk @@ -1,5 +1,5 @@ ifdef VERSION -FLAGS += -DVERSION=$(VERSION) + FLAGS += -DVERSION=$(VERSION) endif # Generate dependency files alongside the object files @@ -9,7 +9,7 @@ FLAGS += -g FLAGS += -O3 -march=nocona -ffast-math -fno-finite-math-only FLAGS += -Wall -Wextra -Wno-unused-parameter ifneq ($(ARCH), mac) -CXXFLAGS += -Wsuggest-override + CXXFLAGS += -Wsuggest-override endif CXXFLAGS += -std=c++11 @@ -32,6 +32,9 @@ ifeq ($(ARCH), win) FLAGS += -D_USE_MATH_DEFINES endif +CFLAGS += $(FLAGS) +CXXFLAGS += $(FLAGS) + OBJECTS += $(patsubst %, build/%.o, $(SOURCES)) DEPS = $(patsubst %, build/%.d, $(SOURCES)) @@ -47,16 +50,16 @@ $(TARGET): $(OBJECTS) build/%.c.o: %.c @mkdir -p $(@D) - $(CC) $(FLAGS) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< build/%.cpp.o: %.cpp @mkdir -p $(@D) - $(CXX) $(FLAGS) $(CXXFLAGS) -c -o $@ $< + $(CXX) $(CXXFLAGS) -c -o $@ $< build/%.cc.o: %.cc @mkdir -p $(@D) - $(CXX) $(FLAGS) $(CXXFLAGS) -c -o $@ $< + $(CXX) $(CXXFLAGS) -c -o $@ $< build/%.m.o: %.m @mkdir -p $(@D) - $(CC) $(FLAGS) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< diff --git a/dep/Makefile b/dep/Makefile index 6aaa162a..0d79b552 100755 --- a/dep/Makefile +++ b/dep/Makefile @@ -3,14 +3,20 @@ LOCAL = $(shell pwd) # Arch-specifics include ../arch.mk +FLAGS += -g -O3 -march=nocona + ifeq ($(ARCH),mac) - MACOS_FLAGS = -mmacosx-version-min=10.7 -stdlib=libc++ - export CFLAGS = $(MACOS_FLAGS) - export CXXFLAGS = $(MACOS_FLAGS) - export CPPFLAGS = $(MACOS_FLAGS) - export LDFLAGS = $(MACOS_FLAGS) + FLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ + LDFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ endif +CFLAGS += $(FLAGS) +CXXFLAGS += $(FLAGS) +export CFLAGS +export CXXFLAGS +export LDFLAGS + + # Commands WGET = wget -nc UNTAR = tar xf diff --git a/include/plugin.hpp b/include/plugin.hpp index 9f258352..85bb2561 100644 --- a/include/plugin.hpp +++ b/include/plugin.hpp @@ -24,11 +24,12 @@ struct Plugin { */ std::string slug; - /** The version of your plugin (optional) + /** The version of your plugin Plugins should follow the versioning scheme described at https://github.com/VCVRack/Rack/issues/266 Do not include the "v" in "v1.0" for example. */ std::string version; + /** URL for plugin homepage (optional) */ std::string website; /** URL for plugin manual (optional) */