Browse Source

Build system fixes

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
f4834d8163
3 changed files with 22 additions and 12 deletions
  1. +9
    -6
      compile.mk
  2. +11
    -5
      dep/Makefile
  3. +2
    -1
      include/plugin.hpp

+ 9
- 6
compile.mk View File

@@ -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 $@ $<

+ 11
- 5
dep/Makefile View File

@@ -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


+ 2
- 1
include/plugin.hpp View File

@@ -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) */


Loading…
Cancel
Save