commit c8a145bea3b6620ab1bd815566572442e1e6fc30
parent 9f06521679285e6865dc0cdb392318efdb285121
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sun, 14 Feb 2016 21:21:56 -0800
unify the output filenames across platforms
Diffstat:
6 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
@@ -36,8 +36,8 @@ vendor
2. Install [tup](http://gittup.org/tup/) and [boost](http://www.boost.org/):
`brew tap homebrew/fuse && brew install tup boost`
3. Run `rake` from this directory
-4. Copy or link `x64/bin/reaper_reapack_x86_64.dylib` to REAPER's extension
- directory (replace x64 and x86_64 with x86 and i386 for 32-bit)
+4. Copy or link `x64/bin/reaper_reapack64.dylib` or `x64/bin/reaper_reapack32.dylib`
+ to REAPER's extension directory
### Windows
@@ -62,12 +62,12 @@ vendor
nmake /f Makefile.vc mode=static RTLIBCFG=static ENABLE_IDN=no MACHINE=x86
```
5. Copy `<curl directory>\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl`
- to `<reapack directory>\vendor` as `libcurl_x64`
+ to `<reapack directory>\vendor` as `libcurl64`
6. Copy `<curl directory>\builds\libcurl-vc-x86-release-static-ipv6-sspi-winssl`
- to `<reapack directory>\vendor` as `libcurl_x86`
+ to `<reapack directory>\vendor` as `libcurl32`
7. Download the latest stable amalgamation build of [sqlite](https://www.sqlite.org/download.html).
Put `sqlite3.h` and `sqlite3.c` in `<reapack>\vendor`.
8. Run `rake` from this directory using
"Developer Command Prompt for VS2013"
-9. Copy or symlink `x64\bin\reaper_reapack_x64.dll` to your REAPER
- plugin folder (replace x64 with x86 for 32-bit)
+9. Copy or symlink `x64\bin\reaper_reapack64.dll` or `x86\bin\reaper_reapack32.dll`
+ to your REAPER plugin folder
diff --git a/macosx.tup b/macosx.tup
@@ -1,13 +1,15 @@
CXX := c++
+REAPACK_FILE = reaper_reapack@(SUFFIX).dylib
+
CXXFLAGS := -Wall -Wextra -Werror
CXXFLAGS += -Wno-unused-parameter -Wno-missing-field-initializers
CXXFLAGS += -Wno-unused-function
CXXFLAGS += -fdiagnostics-color -fstack-protector-strong -fvisibility=hidden
CXXFLAGS += -pipe -fPIC -O2 -std=c++14
CXXFLAGS += -Ivendor -Ivendor/WDL -Ivendor/WDL/WDL -Ivendor/WDL/WDL/swell
-CXXFLAGS += -DWDL_NO_DEFINE_MINMAX
-CXXFLAGS += -arch @(OSXARCH)
+CXXFLAGS += -DWDL_NO_DEFINE_MINMAX -DREAPACK_FILE=$(REAPACK_FILE)
+CXXFLAGS += -arch @(ARCH)
WDLFLAGS := -std=c++98 -w
@@ -19,7 +21,7 @@ WDLSOURCE += $(SWELL)/swell-misc.mm $(SWELL)/swell-dlg.mm $(SWELL)/swell-wnd.mm
LDFLAGS := -framework Cocoa -framework Carbon -lcurl -lsqlite3
SOFLAGS := -dynamiclib
-SOTARGET := bin/reaper_reapack_@(OSXARCH).dylib
+SOTARGET := bin/$(REAPACK_FILE)
TSTARGET := bin/test
diff --git a/win32.tup b/win32.tup
@@ -1,16 +1,19 @@
# wrapper.bat selects which compiler to execute depending on the architecture
-WRAP := cmd /C wrapper.bat @(WINARCH)
+WRAP := cmd /C wrapper.bat @(ARCH)
CXX := $(WRAP) cl
+REAPACK_FILE := reaper_reapack@(SUFFIX)
+
CXXFLAGS := /nologo /W3 /WX /wd4996 /EHsc /MT
CXXFLAGS += /O2 /Z7 /Zo
CXXFLAGS += /Ivendor /Ivendor/WDL /Ivendor/WDL/WDL
-CXXFLAGS += /Ivendor/libcurl_@(WINARCH)/include
+CXXFLAGS += /Ivendor/libcurl@(SUFFIX)/include
CXXFLAGS += /DWDL_NO_DEFINE_MINMAX
CXXFLAGS += /DCURL_STATICLIB /DUNICODE /DNDEBUG
+CXXFLAGS += /DREAPACK_FILE#\"$(REAPACK_FILE).dll\"
-SQLFLAGS := /Os /wd4101 /DSQLITE_OMIT_FLOATING_POINT
+SQLFLAGS := /Os /wd4101 /DSQLITE_OMIT_FLOATING_POINT
SQLFLAGS += /DSQLITE_OMIT_COMPOUND_SELECT /DSQLITE_OMIT_DATETIME_FUNCS
SQLFLAGS += /DSQLITE_OMIT_INTEGRITY_CHECK /DSQLITE_OMIT_UTF16
SQLFLAGS += /DSQLITE_OMIT_SHARED_CACHE /DSQLITE_OMIT_INCRBLOB
@@ -24,7 +27,7 @@ SQLFLAGS += /DSQLITE_OMIT_DECLTYPE /DSQLITE_OMIT_DEPRECATED
LD := $(WRAP) link
LDFLAGS := /nologo user32.lib shell32.lib
-LDFLAGS += vendor/libcurl_@(WINARCH)/lib/libcurl_a.lib
+LDFLAGS += vendor/libcurl@(SUFFIX)/lib/libcurl_a.lib
LDFLAGS += $(TUP_VARIANTDIR)/src/resource.res
LDFLAGS += $(TUP_VARIANTDIR)/build/vendor/sqlite3.o
LDFLAGS += /DEBUG /OPT:REF /PDBALTPATH:%_PDB%
@@ -34,7 +37,7 @@ LINKDEPS := src/resource.res build/vendor/sqlite3.o
RC := rc
RCFLAGS += /nologo /fo $(TUP_VARIANTDIR)/src/resource.res
-TARGET := bin/reaper_reapack_@(WINARCH)
+TARGET := bin/$(REAPACK_FILE)
SOFLAGS := /DLL /OUT:$(TUP_VARIANTDIR)/$(TARGET).dll
SOTARGET := $(TARGET).dll $(TARGET).lib $(TARGET).exp
diff --git a/wrapper.bat b/wrapper.bat
@@ -11,9 +11,9 @@ shift
goto next_arg
:continue
-if "%arch%"=="x64" (
+if "%arch%"=="x86_64" (
call "%VCINSTALLDIR%\vcvarsall.bat" x86_amd64
-) else ( if "%arch%"=="x86" (
+) else ( if "%arch%"=="i386" (
call "%VCINSTALLDIR%\vcvarsall.bat" x86
) else (
echo Unknown Architecture: %arch%
diff --git a/x64/tup.config b/x64/tup.config
@@ -1,2 +1,2 @@
-CONFIG_OSXARCH=x86_64
-CONFIG_WINARCH=x64
+CONFIG_ARCH=x86_64
+CONFIG_SUFFIX=64
diff --git a/x86/tup.config b/x86/tup.config
@@ -1,2 +1,2 @@
-CONFIG_OSXARCH=i386
-CONFIG_WINARCH=x86
+CONFIG_ARCH=i386
+CONFIG_SUFFIX=32