From cc074ed1a7275c2c52fd6b48edd7c454ed39cfe3 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 20 Dec 2019 18:03:24 -0500 Subject: [PATCH] Remove NDEBUG. Replace vcv_libsclang_link_line.txt with explicit Makefile commands. Use $(CMAKE) instead of custom `cmake` which is defined in dep.mk because it's designed to work properly on all three platforms. --- Makefile | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fa695fd..e73437b 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ endif ifeq ($(SUPERCOLLIDER), 1) SOURCES += src/SuperColliderEngine.cpp FLAGS += -Idep/supercollider/include -Idep/supercollider/include/common -Idep/supercollider/lang -Idep/supercollider/common -Idep/supercollider/include/plugin_interface -FLAGS += -DNDEBUG # TODO is this OK? +# FLAGS += -DNDEBUG # TODO is this OK? Andrew: No, unless you can tell me a good reason. # FLAGS += -DSC_VCV_ENGINE_TIMING # uncomment to turn on timing printing while running supercollider := dep/supercollider/build/lang/libsclang.a OBJECTS += $(supercollider) @@ -88,16 +88,34 @@ DISTRIBUTABLES += support/supercollider_extensions SUPERCOLLIDER_CMAKE_FLAGS += -DSUPERNOVA=OFF -DSC_EL=OFF -DSC_VIM=OFF -DSC_ED=OFF -DSC_IDE=OFF -DSC_ABLETON_LINK=OFF -DSC_QT=OFF -DCMAKE_BUILD_TYPE=Release -DSCLANG_SERVER=OFF -DBUILD_TESTING=OFF SUPERCOLLIDER_SUBMODULES += external_libraries/hidapi external_libraries/nova-simd external_libraries/nova-tt external_libraries/portaudio_sc_org external_libraries/yaml-cpp SUPERCOLLIDER_BRANCH := topic/vcv-prototype-support + # FIXME should be able to find some better way of getting link library names! -LDFLAGS += $$(cat dep/supercollider/build/lang/vcv_libsclang_link_line.txt) +# Andrew: Just hard-code them as below, perhaps surrounded with `ifdef ARCH_*`. The "cat an external txt file" approach is unusual and not as explicit. +# LDFLAGS += $$(cat dep/supercollider/build/lang/vcv_libsclang_link_line.txt) + +OBJECTS += dep/supercollider/build/external_libraries/libtlsf.a +OBJECTS += dep/supercollider/build/external_libraries/hidapi/linux/libhidapi.a +OBJECTS += dep/supercollider/build/external_libraries/hidapi/hidapi_parser/libhidapi_parser.a +OBJECTS += dep/supercollider/build/external_libraries/libboost_thread_lib.a +OBJECTS += dep/supercollider/build/external_libraries/libboost_system_lib.a +OBJECTS += dep/supercollider/build/external_libraries/libboost_regex_lib.a +OBJECTS += dep/supercollider/build/external_libraries/libboost_filesystem_lib.a +OBJECTS += dep/supercollider/build/external_libraries/libyaml.a +# TODO +# Andrew: We can't assume anything about the users' system, so you're gonna have to either avoid using these libraries or build and statically link them. +LDFLAGS += -lsndfile +# However, these can be assumed because I've never seen a system without them that can run Rack. +LDFLAGS += -lpthread -lasound -ludev + $(supercollider): cd dep && git clone "https://github.com/supercollider/supercollider" --branch $(SUPERCOLLIDER_BRANCH) --depth 5 cd dep/supercollider && git submodule update --init -- $(SUPERCOLLIDER_SUBMODULES) cd dep/supercollider && git apply ../../support/supercollider_get_libsclang_link_line.patch - cd dep/supercollider && mkdir build && cd build - cd dep/supercollider/build && cmake .. -G "Unix Makefiles" $(SUPERCOLLIDER_CMAKE_FLAGS) + cd dep/supercollider && mkdir build + cd dep/supercollider/build && $(CMAKE) .. $(SUPERCOLLIDER_CMAKE_FLAGS) cd dep/supercollider/build && $(MAKE) libsclang cd dep/supercollider/build && $(MAKE) generate_libsclang_link_line + cd dep/supercollider/build && $(MAKE) install endif # Python