-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mak
79 lines (72 loc) · 2.05 KB
/
config.mak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Note: Don't use -march=native for code intended for distribution. -msse2 is probably good.
CXXFLAGS := -fPIC -std=gnu++17 -Wno-multichar -I../src -I../libclef/src -msse2 -I. -Isrc/ $(PLUGIN_CXXFLAGS)
QMAKE = qmake
DLL := so
EXE :=
BUILDPATH := build
EXPECT_XSPEC :=
CLAP_LDFLAGS :=
ifeq ($(CROSS),msvc)
DLL := dll
EXE := .exe
ifneq ($(OS),Windows_NT)
WINE = wine
endif
EXPECT_XSPEC := win32-msvc
plugins: winamp foobar
else ifeq ($(CROSS),mingw-posix)
CC := i686-w64-mingw32-gcc-posix
CXX := i686-w64-mingw32-g++-posix
OS := Windows_NT
EXPECT_XSPEC := win32-g++
else ifeq ($(CROSS),mingw64-posix)
CC := x86_64-w64-mingw32-gcc-posix
CXX := x86_64-w64-mingw32-g++-posix
OS := Windows_NT
EXPECT_XSPEC := win32-g++
else ifeq ($(CROSS),mingw)
CC := i686-w64-mingw32-gcc
CXX := i686-w64-mingw32-g++
OS := Windows_NT
EXPECT_XSPEC := win32-g++
else ifeq ($(CROSS),mingw64)
CC := x86_64-w64-mingw32-gcc
CXX := x86_64-w64-mingw32-g++
OS := Windows_NT
EXPECT_XSPEC := win32-g++
endif
ifeq ($(OS),Windows_NT)
DLL := dll
EXE := .exe
CXXFLAGS := $(CXXFLAGS) -static-libgcc -static-libstdc++
LDFLAGS := $(LDFLAGS) -static-libgcc -static-libstdc++ -static -lpthread
BUILDPATH := build_win
CLAP_LDFLAGS := -luuid
ifneq ($(CROSS),msvc)
EXPECT_XSPEC := win32-g++
plugins: winamp
else
EXPECT_XSPEC := win32-msvc
endif
else ifneq ($(CROSS),)
$(error Invalid CROSS. Supported values: mingw mingw64 mingw-posix mingw64-posix msvc)
endif
CXXFLAGS_R := $(CXXFLAGS) -O3 -ffast-math
ifeq ($(OS),Windows_NT)
CXXFLAGS_D := $(CXXFLAGS) -Og -ffast-math -gstabs
else
CXXFLAGS_D := $(CXXFLAGS) -Og -ffast-math -ggdb3
endif
LDFLAGS := $(LDFLAGS) -L../libclef/$(BUILDPATH) -L../$(BUILDPATH) $(PLUGIN_LDFLAGS)
LDFLAGS_R := $(LDFLAGS) -lclef
LDFLAGS_D := $(LDFLAGS) -lclef_d
validate: FORCE
ifeq ($(PLUGIN_NAME),sample)
@echo Please update PLUGIN_NAME in config.mak.
@exit 1
endif
libclef/$(BUILDPATH)/libclef.a libclef/$(BUILDPATH)/libclef_d.a: validate
validategui: FORCE
@QMAKE=$(QMAKE) MAKE=$(MAKE) sh libclef/validate-qmake.sh $(EXPECT_XSPEC)
gui/Makefile gui/Makefile.debug: validategui
FORCE: