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

+ 11
- 5
dep/Makefile View File

@@ -3,14 +3,20 @@ LOCAL = $(shell pwd)
# Arch-specifics # Arch-specifics
include ../arch.mk include ../arch.mk


FLAGS += -g -O3 -march=nocona

ifeq ($(ARCH),mac) 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 endif


CFLAGS += $(FLAGS)
CXXFLAGS += $(FLAGS)
export CFLAGS
export CXXFLAGS
export LDFLAGS


# Commands # Commands
WGET = wget -nc WGET = wget -nc
UNTAR = tar xf UNTAR = tar xf


+ 2
- 1
include/plugin.hpp View File

@@ -24,11 +24,12 @@ struct Plugin {
*/ */
std::string slug; 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 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. Do not include the "v" in "v1.0" for example.
*/ */
std::string version; std::string version;

/** URL for plugin homepage (optional) */ /** URL for plugin homepage (optional) */
std::string website; std::string website;
/** URL for plugin manual (optional) */ /** URL for plugin manual (optional) */


Loading…
Cancel
Save