-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile.Qt
executable file
·2912 lines (2000 loc) · 136 KB
/
Makefile.Qt
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Users and packagers: Edit build_*.sh instead.
#
RADIUM_VERSION = 7.4.76
SHELL := /usr/bin/env bash
#----------------USER SETTINGS-------------------------------
# 1. Where to install
#
PREFIX ?= /usr/local
bindir ?= $(PREFIX)/bin
libdir ?= $(PREFIX)/lib
# 2. Where moc and uic for QT5 is installed.
#
MOC ?= "`$(shell pwd)/find_moc_and_uic_paths.sh moc`"
UIC ?= "`$(shell pwd)/find_moc_and_uic_paths.sh uic`"
#RCC ?= "`./find_moc_and_uic_paths.sh rcc`"
# 4. Release buid or Debug build
#
BUILDTYPE ?= DEBUG
#BUILDTYPE=RELEASE
IS_LINUX_BINARY ?=
# 5. Full path to a python2 executable. (Think it needs to be at least V2.4)
#
PYTHONEXE ?= `which python2`
#----------------END USER SETTINGS---------------------------
UNAME := $(shell uname)
#----------------DEFININTIONS----------------------
# Packagers: Don't change anything below here unless things don't work.
RADIUM_QT_VERSION=5
GCDIR ?= bin/packages/gc-8.2.4
QHTTPSERVER_PATH ?= $(shell pwd)/bin/packages/qhttpserver-master
LIBGIG_PATH ?= $(shell pwd)/bin/packages/libgig/src
LV2_INCLUDE_PATH ?= $(shell pwd)/pluginhost/JuceLibraryCode/modules/juce_audio_processors/format_types/LV2_SDK/lv2
LILV_INCLUDE_PATH ?= $(shell pwd)/pluginhost/JuceLibraryCode/modules/juce_audio_processors/format_types/LV2_SDK/lilv/
#MIDIINC=-Imidi/rtmidi
#MIDIINC=-Imidi/alsaseq
RADIUM_BIN ?= bin/radium
P=Qt/
API=api/
MAKEFILE=Makefile.Qt
MAX_NUM_UNDOS=800
CD=common/
T ?= /tmp/radium_objects/
STD_C=gnu99
STD_CPP=gnu++20
USE_STD_COUNTING_SEMAPHORE=1 # Probably have to change to 0, if stdc < c++20.
PKG ?= pkg-config
PKGqt ?= $(PKG)
CCC ?= g++
CC ?= gcc
CC_STATIC ?= $(CC)
GCC ?= gcc
CLANG ?= clang
CLANGPLUSPLUS ?= clang++
GPLUSPLUS ?= $(CCC)
LINKER ?= g++
STRIPPER ?= strip
GGDB_OPT ?= -ggdb3
CC2=./compile_to_tmp.sh $(CC)
CCC2=./compile_to_tmp.sh $(CCC)
GCC2=./compile_to_tmp.sh $(GCC)
GPLUSPLUS2=./compile_to_tmp.sh $(GPLUSPLUS)
CLANGPLUSPLUS2=./compile_to_tmp.sh $(CLANGPLUSPLUS)
CC_STATIC2=./compile_to_tmp.sh $(CC_STATIC)
TARGET_OS ?= any
S7OPTS ?=
FAUSTDIR = $(shell pwd)/bin/packages/faust
FAUST_LD_LIB_PATH ?=
WHICHFAUST = $(FAUST_LD_LIB_PATH) $(FAUSTDIR)/build/bin/faust
FAUST = $(WHICHFAUST) -I $(FAUSTDIR)/libraries/old # -I /home/kjetil/faust/architecture
# Get lots of warnings
#ifneq (,$(findstring clang,$(CC)))
# FAUST += -clang
#endif
LLVM_OPTS ?=
PLUGINHOSTSCANNERLIB ?= pluginhost/Builds/Linux/build/libMyPluginHost_for_scanner.a
JACKOPT ?=
LRDFOPT ?= `$(PKG) --cflags lrdf`
SNDFILEOPT ?= `$(PKG) --cflags sndfile`
SAMPLERATEOPT ?= `$(PKG) --cflags samplerate`
LIBLOOPT ?= `$(PKG) --cflags liblo`
# (G_BYTE_ORDER == G_LITTLE_ENDIAN)
PYOPTS ?=
QT_SYSTEM_CFLAGS ?=
QSCINTILLA_PATH ?= $(shell pwd)/bin/packages/QScintilla_src-2.14.0/src
#QScintilla_gpl-2.10.8
ifneq '' '$(findstring clang,$(CC))'
CLANG_VERSION:= $(shell $(CC) --version|grep version |& sed "s/.*version \([0-9]*\.[0-9]*\.[0-9]*\\).*/\1/")
CLANG_MAJOR:=$(shell echo $(CLANG_VERSION) | cut -d'.' -f1)
CLANG_MINOR:=$(shell echo $(CLANG_VERSION) | cut -d'.' -f2)
CLANG_SUB:=$(shell echo $(CLANG_VERSION) | cut -d'.' -f3)
GCC_VERSION:=-1
GCC_MAJOR:=-1
GCC_MINOR:=-1
GCC_SUB:=-1
else
CLANG_VERSION:=-1
CLANG_MAJOR:=-1
CLANG_MINOR:=-1
CLANG_SUB:=-1
GCC_VERSION:=$(shell $(GCC) -dumpversion)
GCC_MAJOR:=$(shell echo $(GCC_VERSION) | cut -d'.' -f1)
GCC_MINOR:=$(shell echo $(GCC_VERSION) | cut -d'.' -f2)
GCC_SUB:=$(shell echo $(GCC_VERSION) | cut -d'.' -f3)
endif
# qt4
ifeq ($(RADIUM_QT_VERSION),4)
QT_GUI_CFLAGS ?=`$(PKGqt) --cflags QtGui`
QT_GUI_LDFLAGS ?= `$(PKGqt) --libs QtGui`
QT_NETWORK_CFLAGS ?=`$(PKGqt) --cflags QtNetwork`
QT_NETWORK_LDFLAGS ?= `$(PKGqt) --libs QtNetwork`
QT_CFLAGS ?= `$(PKGqt) --cflags QtGui --cflags QtNetwork --cflags QtOpenGL --cflags QtWebKit` -I$(QHTTPSERVER_PATH)/src -I$(QSCINTILLA_PATH) -DQHTTPSERVER_EXPORT $(QT_SYSTEM_CFLAGS)
QT_LDFLAGS ?= `$(PKGqt) --libs QtGui --libs QtOpenGL --libs QtNetwork --libs QtWebKit`
endif
# qt5
ifeq ($(RADIUM_QT_VERSION),5)
QT_GUI_CFLAGS ?=`$(PKGqt) --cflags Qt5Gui --cflags Qt5Widgets` $(FPIC)
QT_GUI_LDFLAGS ?= `$(PKGqt) --libs Qt5Gui --libs Qt5Widgets` $(FPIC)
QT_NETWORK_CFLAGS ?=`$(PKGqt) --cflags Qt5Network` $(FPIC)
QT_NETWORK_LDFLAGS ?= `$(PKGqt) --libs Qt5Network` $(FPIC)
QT_UI_CFLAGS ?= `$(PKGqt) --cflags Qt5UiTools` $(FPIC)
QT_UI_LDFLAGS ?= `$(PKGqt) --libs Qt5UiTools` $(FPIC)
QT_SVG_CFLAGS ?= `$(PKGqt) --cflags Qt5Svg` $(FPIC)
QT_SVG_LDFLAGS ?= `$(PKGqt) --libs Qt5Svg` $(FPIC)
# If using QtWebEngine: (Not recommended, dragging doesn't work using it)
# QT_CFLAGS ?= `$(PKGqt) --cflags Qt5Gui --cflags Qt5Network --cflags Qt5OpenGL --cflags Qt5Widgets --cflags Qt5WebEngineWidgets` -Ibin/packages/qhttpserver-master/src -Ibin/packages/QScintilla_gpl-2.10.8 -DQHTTPSERVER_EXPORT $(QT_SYSTEM_CFLAGS) -DUSE_QT5
# QT_LDFLAGS ?= `$(PKGqt) --libs Qt5Gui --libs Qt5OpenGL --libs Qt5Network --libs Qt5Widgets --libs Qt5WebEngineWidgets`
# If using QtWebKit:
QT_CFLAGS ?= `$(PKGqt) --cflags Qt5Gui --cflags Qt5Network --cflags Qt5OpenGL --cflags Qt5Widgets --cflags Qt5Concurrent` -I$(QHTTPSERVER_PATH)/src -I$(QSCINTILLA_PATH) -DQHTTPSERVER_EXPORT $(QT_SYSTEM_CFLAGS) $(FPIC)
QT_LDFLAGS ?= $(QT_UI_LDFLAGS) $(QT_SVG_LDFLAGS) `$(PKGqt) --libs Qt5Gui --libs Qt5OpenGL --libs Qt5Widgets --libs Qt5Network ` $(FPIC)
ifeq ($(USE_QWEBENGINE),1)
USE_QWEBENGINE_CFLAGS = -D USE_QWEBENGINE=1
QT_CFLAGS += `$(PKGqt) --cflags Qt5WebEngine --cflags Qt5WebEngineCore --cflags Qt5WebEngineWidgets`
QT_LDFLAGS += `$(PKGqt) --libs Qt5WebEngine --libs Qt5WebEngineCore --libs Qt5WebEngineWidgets`
else
USE_QWEBENGINE_CFLAGS = -D USE_QWEBENGINE=0
QT_CFLAGS += `$(PKGqt) --cflags Qt5WebKitWidgets --cflags Qt5WebKit`
QT_LDFLAGS += `$(PKGqt) --libs Qt5WebKitWidgets --libs Qt5WebKit`
endif
QT_CFLAGS += $(USE_QWEBENGINE_CFLAGS)
endif
WNO_DEPRECATED_COPY=
ifeq ($(GCC_MAJOR),9)
WNO_DEPRECATED_COPY=-Wno-deprecated-copy
# QT_CFLAGS += $(WNO_DEPRECATED_COPY) # probably only necessary for qt 5.12 or older
endif
ifneq '' '$(findstring clang,$(CC))'
WNO_DEPRECATED_BUILTINS=-Wno-deprecated-builtins
endif
ifeq ($(CLANG_MAJOR),18)
WNO_DEPRECATED_ENUM_ENUM_CONVERSION=-Wno-deprecated-enum-enum-conversion
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
WNO_DEPRECATED_COPY_WITH_USER_PROVIDED_COPY=-Wno-deprecated-copy-with-user-provided-copy
WNO_EXTERN_C_COMPAT=-Wno-extern-c-compat
WNO_VLA_CXX_EXTENSION=-Wno-vla-cxx-extension
WNO_NAN_INFINITY_DISABLED=-Wno-nan-infinity-disabled
else ifeq ($(CLANG_MAJOR),17)
WNO_DEPRECATED_ENUM_ENUM_CONVERSION=-Wno-deprecated-enum-enum-conversion
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
WNO_DEPRECATED_COPY_WITH_USER_PROVIDED_COPY=-Wno-deprecated-copy-with-user-provided-copy
else ifeq ($(CLANG_MAJOR),16)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
WNO_DEPRECATED_COPY_WITH_USER_PROVIDED_COPY=-Wno-deprecated-copy-with-user-provided-copy
else ifeq ($(CLANG_MAJOR),15)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
WNO_DEPRECATED_COPY_WITH_USER_PROVIDED_COPY=-Wno-deprecated-copy-with-user-provided-copy
else ifeq ($(CLANG_MAJOR),14)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
else ifeq ($(CLANG_MAJOR),13)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
else ifeq ($(CLANG_MAJOR),12)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
else ifeq ($(CLANG_MAJOR),11)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
else ifeq ($(CLANG_MAJOR),10)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
else ifeq ($(CLANG_MAJOR),9)
WNO_DEPRECATED_COPY_CLANG=-Wno-deprecated-copy
WNO_MISLEADING_INDENTATION_CLANG=-Wno-misleading-indentation
else
WNO_DEPRECATED_COPY_CLANG=
WNO_MISLEADING_INDENTATION_CLANG=
WNO_DEPRECATED_COPY_WITH_USER_PROVIDED_COPY=
WNO_EXTERN_C_COMPAT=
WNO_VLA_CXX_EXTENSION=
WNO_NAN_INFINITY_DISABLED=
endif
WNO_CLASS_MEMACCESS=
ifeq (,$(findstring clang,$(CC)))
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
endif
GTK_CFLAGS ?= `$(PKG) --cflags gtk+-2.0`
GTK_LDFLAGS ?= `$(PKG) --libs gtk+-2.0`
FREETYPE_CFLAGS ?=
# `$(PKG) --cflags freetype2`
VST_OPTS ?=
BOOST_INCLUDE=-I${HOME}/boost_1_85_0 -I${HOME}/boost_1_83_0 -I${HOME}/boost_1_77_0 -I${HOME}/boost_1_76_0 -I${HOME}/boost_1_75_0 -I${HOME}/boost_1_70_0 -I${HOME}/boost_1_67_0 -I${HOME}/boost_1_63_0 $(WNO_DEPRECATED_BUILTINS)
BOOST_FLAGS=$(WNO_CLASS_MEMACCESS) $(BOOST_INCLUDE)
CRASHREPORTER_OPTS ?=
CRASHREPORTER_POSIX_OPTS ?=
DEFINES=-DNOPAUSEPLAY -DCOMPILING_RADIUM -DUSE_WEAK_JACK
#-DDISABLE_BDWGC <---- It makes a lot of sense to enable this option in DEBUG mode if using -fsanitize=address
#-DMEMORY_DEBUG
# define SYSBASEDEBUG
# define TRACKER_DEBUG
# define MEMORY_DEBUG
# define TRACKER_GB
# If you want QT visual:
VISUAL ?= -DUSE_QT_VISUAL=1 -DUSE_GTK_VISUAL=0
# Or, if you want GTK visual: (Less maintained, and doesn't work very well on OSX. Possibly faster though.)
#VISUAL ?= -DUSE_QT_VISUAL=0 -DUSE_GTK_VISUAL=1
FULL_VERSION ?= 1
#UNDEFINED_SANITIZE_OPTS= -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=bounds -fsanitize=object-size -fsanitize=vptr -fno-sanitize-recover
# -fsanitize=alignment
BUILD_DEBUG=NO
BUILD_OPTIMIZED=YES
OPTIMIZE ?= -O2 -flto
ifeq ($(BUILDTYPE), DEBUG)
BUILD_DEBUG=YES
BUILD_OPTIMIZED=NO
OPTIMIZE=
endif
ifeq ($(BUILDTYPE), DEBUG_FAST)
BUILD_DEBUG=YES
endif
WARNINGS_AS_ERRORS ?= 1
WERROR=""
ifeq ($(WARNINGS_AS_ERRORS), 1)
WERROR = -Werror
endif
WNO_DEPRECATED_DECLARATIONS=
NO_ANALYZER=
NO_ANALYZER_MALLOC_LEAK=
WNO_CLASS_MEMACCESS=
WNO_PARENTHESIS=
WNO_TEMPLATE_ID_CDTOR=
ifeq ($(GCC_MAJOR),14)
WNO_DEPRECATED_ENUM_ENUM_CONVERSION=-Wno-deprecated-enum-enum-conversion
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined # -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
WNO_TEMPLATE_ID_CDTOR=-Wno-template-id-cdtor
QT_CFLAGS += $(WNO_TEMPLATE_ID_CDTOR)
# UNDEFINED_SANITIZE_OPTS=
else ifeq ($(GCC_MAJOR),13)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined # -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
# UNDEFINED_SANITIZE_OPTS=
else ifeq ($(GCC_MAJOR),12)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined # -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
# UNDEFINED_SANITIZE_OPTS=
else ifeq ($(GCC_MAJOR),11)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined # -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
# UNDEFINED_SANITIZE_OPTS=
else ifeq ($(GCC_MAJOR),10)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined # -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
# UNDEFINED_SANITIZE_OPTS=
else ifeq ($(GCC_MAJOR),9)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
# UNDEFINED_SANITIZE_OPTS=
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
else ifeq ($(GCC_MAJOR),8)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
# UNDEFINED_SANITIZE_OPTS=
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
else ifeq ($(GCC_MAJOR),7)
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined -fno-sanitize-recover
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
# UNDEFINED_SANITIZE_OPTS=
WNO_CLASS_MEMACCESS=-Wno-class-memaccess
WNO_PARENTHESIS=-Wno-parentheses
else ifneq (,$(findstring clang,$(CC)))
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=-fno-sanitize=signed-integer-overflow
WNO_DEPRECATED_DECLARATIONS=-Wno-deprecated-declarations
else
UNDEFINED_SANITIZE_OPTS=
NO_SANITIZE_SIGNED_INTEGER_OVERFLOW=
endif
UNDEFINED_SANITIZE_OPTS= -fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize-recover=undefined -DRADIUM_USES_UBSAN # ,integer ,integer
#UNDEFINED_SANITIZE_OPTS=
ifneq (,$(findstring clang,$(CC)))
UNDEFINED_SANITIZE_OPTS += -fno-sanitize=function -fno-sanitize=vptr
endif
# -fsanitize-thread sometimes require: "export __GL_THREADED_OPTIMIZATIONS=0"
# "-Og" very often destroys debugging (although it's not supposed to), but without it things are too slow (well, it's already too slow, but -Og helps a lot).
#THREAD_SANITIZE_OPTS=-Og -fsanitize=thread -DRADIUM_USES_TSAN #-DDISABLE_BDWGC
THREAD_SANITIZE_OPTS=
ADDRESS_SANITIZE_OPTS=-fsanitize=address -fno-common -DRADIUM_USES_ASAN
#-DDISABLE_BDWGC
#ADDRESS_SANITIZE_OPTS=
# msan requires all 3rd party libraries to be compiled with msan.
#MEMORY_SANITIZE_OPTS=-fsanitize=memory -fsanitize-blacklist=SanitizerSupprMem.txt -DRADIUM_USES_MSAN
MEMORY_SANITIZE_OPTS=
# Note that "./build_clean.sh" must be run if changing DEBUG_BUILD_OPTS or changing from RELEASE to DEBUG build.
OS_DEBUG_BUILD_OPTS ?=
#-mbranch-protection=standard -fno-sanitize-trap=all
#-flto -fvisibility=hidden -fsanitize=cfi -fno-sanitize-trap=all # -fanalyzer
DEBUG_BUILD_OPTS = $(WERROR) -Wfloat-equal -Wall $(GGDB_OPT) -fno-optimize-sibling-calls $(UNDEFINED_SANITIZE_OPTS) $(THREAD_SANITIZE_OPTS) $(ADDRESS_SANITIZE_OPTS) $(MEMORY_SANITIZE_OPTS) $(WNO_NAN_INFINITY_DISABLED) $(OS_DEBUG_BUILD_OPTS)
NOSHORTEN64TO32FLAG=
ifneq (,$(findstring clang,$(CC)))
NOSHORTEN64TO32FLAG += -Wno-shorten-64-to-32
endif
DEBUG_BUILD_OPTS += $(NOSHORTEN64TO32FLAG)
S7OPTS += $(NOSHORTEN64TO32FLAG)
ifneq (,$(findstring clang,$(CC)))
else
# ifeq ($(GCC_MAJOR),5)
# DEBUG_BUILD_OPTS += -Wshadow # gcc 4 has too many unnecessary positives
# endif
# ifeq ($(GCC_MAJOR),6)
# DEBUG_BUILD_OPTS += -Wshadow # gcc 4 has too many unnecessary positives
# endif
# CPUOPT += -Og # BEWARE: -Og DOES indeed very much destroy debug capabilites. (<optimized out>)
endif
ifneq (,$(findstring FOR_LINUX,$(OS_OPTS)))
# DEBUG_BUILD_OPTS += -ftree-vrp -Warray-bounds=2
endif
RELEASE_BUILD_OPTS_WITHOUT_NDEBUG = -DRELEASE -Wall -g
RELEASE_BUILD_OPTS = $(RELEASE_BUILD_OPTS_WITHOUT_NDEBUG) -DNDEBUG
OS_OPTS ?=
OS_JUCE_LDFLAGS ?=
OS_LDFLAGS ?=
OS_LDFLAGS2 ?=
OS_DEPS ?=
OS_OBJS ?=
RADIUM_BFD_CFLAGS ?=
RADIUM_BFD_LDFLAGS ?=
RADIUM_THREADED_OPENGL ?= 1
REQTYPE_TYPE = -DUSE_QT_REQTYPE=1 -DUSE_GTK_REQTYPE=0
MENU_TYPE = -DUSE_QT_MENU=1 -DUSE_GTK_MENU=0
FLAGOPTS = $(DEFINES) -DGUIISQT -DFULL_VERSION=$(FULL_VERSION) -DIS_LITTLE_ENDIAN=1 -DUSE_OPENGL=1 $(VISUAL) $(REQTYPE_TYPE) $(MENU_TYPE)
RADIUM_VST2SDK_PATH ?= ${HOME}/SDKs/vstsdk2.4
COMMONOPT = -D__STDC_FORMAT_MACROS=1 -c `cat buildtype.opt` -I$(GCDIR)/include -I$(P) $(PYOPTS) `cat flagopts.opt` $(MIDIINC) $(OS_OPTS) $(VST_OPTS) -I ~/SDKs/VST_SDK/VST2_SDK/ -I ${RADIUM_VST2SDK_PATH} -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -fno-strict-aliasing -Wmissing-field-initializers -Wnull-dereference -Wwrite-strings $(WNO_VLA_CXX_EXTENSION) -DTHREADED_OPENGL=$(RADIUM_THREADED_OPENGL) $(IS_LINUX_BINARY) $(IS_MACOS_BINARY)
#-fdelete-null-pointer-checks
# $(WERROR)
#-Wstrict-overflow=4 -Wsuggest-attribute=format -Wstringop-overflow=4
#-Wsuggest-final-types -Wsuggest-final-methods
ifneq '' '$(findstring clang,$(CC))'
COMMONOPT += -Wno-deprecated-register -Wlogical-op-parentheses # -Wunused-member-function (isn't there a warning to warn about unused variables only, not methods?)
else
COMMONOPT += -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -fmax-errors=5
endif
#ifeq ($(GCC_MAJOR),7)
# COMMONOPT += -fstrong-eval-order # Remove this one until all recent compilers support -fstrong-eval-order
#endif
ifeq ($(RADIUM_QT_VERSION),5)
COMMONOPT += -DUSE_QT5
endif
#$(CFLAGS)
# -Wunused-parameter
# OPT is C flags
OPT=$(COMMONOPT) -Wstrict-prototypes -Wmissing-prototypes -std=$(STD_C) # Note: "-Wmissing-prototypes" is only valid for C files. The equivilant C++ option is "-Wmissing-declarations". However, "-Wmissing-declarations" doesn't always seem to work, don't know why.
OBJC_OPT=$(COMMONOPT) # -nostdinc++
# -D_FORTIFY_SOURCE=2 -O2
ifneq '' '$(findstring clang,$(CC))'
OPT += -Wno-missing-field-initializers # TODO: Check if there's a better way ("{0}" again).
endif
CPUOPT ?=
ifeq ($(BUILD_OPTIMIZED), YES)
CPUOPT += -O3
endif
ifeq ($(BUILD_OPTIMIZED), RELEASE)
OPTIMIZE_O3=-O3 # SmoothDelay.hpp / Fade.hpp / Granulator.hpp runs faster with -O3.
else
OPTIMIZE_O3=
endif
# -pg
# CPPOPT is CPP flags
CPPOPT = $(COMMONOPT) -Wmissing-declarations -DNDEBUG # NDEBUG must be defined to avoid runtime checks in Visualization Library. assert() is not used in radium, so it shouldnt be a problem.
# -Wno-class-memaccess added because of Qt.
# -Wno-parentheses added because of boost.
# -Wno-deprecated-declarations added because of Qt
# -Wno-deprecated-copy added because of Qt
QT_VERSION:=$(shell $(MOC) --version)
QT_MAJOR:=$(shell echo $(QT_VERSION) | cut -d'.' -f1)
QT_MINOR:=$(shell echo $(QT_VERSION) | cut -d'.' -f2)
QT_SUB:=$(shell echo $(QT_VERSION) | cut -d'.' -f3)
WNO_SUGGEST_OVERRIDE=
CPPOPT += -std=$(STD_CPP) -DUSE_STD_COUNTING_SEMAPHORE=$(USE_STD_COUNTING_SEMAPHORE)
ifeq ($(BUILDTYPE), DEBUG)
CPPOPT += -Woverloaded-virtual
endif
CPPOPT += -Wno-register
OBJCPP_OPT=$(CPPOPT) # -nostdinc++
WNO_DUPLICATED_BRANCHES=
ifeq (,$(findstring clang,$(CC)))
#gcc
WNO_DUPLICATED_BRANCHES=-Wno-duplicated-branches
endif
WNO_NULL_POINTER_ARITHMETIC=
ifneq (,$(findstring clang,$(CC)))
#clang
ifeq ($(shell test $(CLANG_MAJOR) -gt 5; echo $$?),0)
WNO_NULL_POINTER_ARITHMETIC += -Wno-null-pointer-arithmetic
endif
endif
# Can't be enabled because of 3rd party header files:
#-Wsuggest-override
# Common QT opts (both 3 and 4)
COMMON_QTOPTS =
# QT4 opts
QTOPT = $(CPPOPT) -DUSE_QT4 -DUSE_QIMAGE_BUFFER=1 $(QT_CFLAGS) $(COMMON_QTOPTS) # -DQT_NO_OPENGL
QTLINKFLAGS = $(QT_LDFLAGS)
#$(GTK_LDFLAGS)
#QTOPT = $(CPPOPT) -DUSE_QT4 -DQT_SHARED -DQT3_SUPPORT -I/home/kjetil/site/include/Qt3Support -I/home/kjetil/site/include/QtCore -I/home/kjetil/site/include/QtGui -I/home/kjetil/site/QtNetwork -I/home/kjetil/site/QtSql $(COMMON_QTOPTS)
#
# or:
#
# QT3 opts
#
#QTOPT = $(CPPOPT) -DUSE_QT3 `pkg-config --cflags qt-mt` $(COMMON_QTOPTS)
#QTLINKFLAGS = `pkg-config --libs qt-mt` `pkg-config --libs gtk+-2.0`
#QTLINKFLAGS = $(QT_LDFLAGS) -static `pkg-config --static --libs gtk+-2.0`
#QTLINKFLAGS = $(QT_LDFLAGS) /tmp/radium/lib/libgtk-x11-2.0.a /tmp/radium/lib/libgdk-x11-2.0.a -L/tmp/radium/lib -latk-1.0 -lpangocairo-1.0 -lXext -lXrender -lXinerama -lXrandr -lXcursor -lXcomposite -lXdamage -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lgio-2.0 -lXfixes -lcairo -lX11 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
#/home/kjetil/site/src/qt-x11-free-3.3.8b/lib/libqt.a
#`pkg-config --libs gtk+-2.0`
#/tmp/radium/lib/ -static -lX11 -lXext -lXft -lXcursor -lXinerama -lXrandr -lSM
# vl flags
VL_CFLAGS ?=
VL_LIBS ?=
VL_LDFLAGS=$(VL_LIBS)
ifeq ($(GCC_MAJOR),9)
VL_CFLAGS += -Wno-class-memaccess -Wno-deprecated-copy
endif
ifeq ($(GCC_MAJOR),10)
VL_CFLAGS += -Wno-class-memaccess -Wno-deprecated-copy
endif
ifeq ($(GCC_MAJOR),11)
VL_CFLAGS += -Wno-class-memaccess -Wno-deprecated-copy
endif
ifneq (,$(findstring clang,$(CC)))
ifeq ($(shell test $(CLANG_MAJOR) -gt 12; echo $$?),0)
VL_CFLAGS+=-Wno-null-pointer-subtraction
endif
endif
#ifeq ($(BUILD_DEBUG), YES)
# VL_CFLAGS+=-U _GLIBCXX_SANITIZE_VECTOR -U _GLIBCXX_DEBUG
#endif
#-------------------OBJECT DEFINITIONS-------------------------------
OBJ1= $(T)windows.o $(T)window_config.o $(T)list.o $(T)vector.o $(T)hashmap.o $(T)Dynvec.o $(T)TimeData.o $(T)song.o $(T)blocks.o $(T)block_insert.o $(T)block_split.o $(T)block_delete.o $(T)block_properties.o $(T)tracks.o $(T)localzooms.o $(T)control.o $(T)lines.o $(T)font.o $(T)track_insert.o $(T)track_onoff.o $(T)settings.o $(T)mmd2load.o $(T)RT_memory_allocator.o
OBJ2= $(T)notes.o $(T)notes_legalize.o $(T)pitches.o $(T)wblocks.o $(T)wtracks.o $(T)sliders.o $(T)common.o
OBJ3= $(T)eventreciever.o $(T)scancodes.o $(T)reallines.o $(T)notestext.o $(T)trackreallines2.o $(T)signaturetext.o $(T)lpbtext.o $(T)bpmtext.o $(T)swingtext.o $(T)centtext.o $(T)chancetext.o $(T)veltext.o $(T)fxtext.o $(T)data_as_text.o $(T)clipboard_range.o $(T)clipboard_range_calc.o $(T)clipboard_range_copy.o $(T)clipboard_range_paste.o $(T)clipboard_range_cut.o $(T)transpose.o $(T)invert.o $(T)glissando.o $(T)pitchexpand.o $(T)expand.o $(T)clipboard_track_copy.o $(T)clipboard_track_paste.o $(T)clipboard_track_cut.o $(T)clipboard_tempos_copy.o $(T)clipboard_localzooms.o $(T)clipboard_block_copy.o $(T)clipboard_block_paste.o $(T)quantitize.o
OBJ4 = $(T)tbox.o $(T)area.o $(T)range.o $(T)nodelines.o
OBJ5= $(T)debug.o $(T)memory.o $(T)validatemem.o $(T)placement.o $(T)t_gc.o $(T)cursor.o $(T)cursor_updown.o $(T)velocities.o $(T)pixmap.o $(T)scroll.o
OBJ6= $(T)realline_calc.o $(T)gfx_subtrack.o $(T)LPB.o $(T)Signature.o $(T)Beats.o $(T)reallines_insert.o $(T)gfx_request.o
OBJ7= $(T)instruments.o $(T)patch.o $(T)undo_audio_patch_addremove.o $(T)fxlines.o $(T)fxlines_legalize.o $(T)sequencer.o $(T)seqtrack_automation.o $(T)song_tempo_automation.o $(T)sequencer_timing.o $(T)seqblock_automation.o $(T)seqblock_stretchspeed.o $(T)scroll_play.o $(T)crashreporter.o $(T)crashreporter_posix.o $(T)crashreporter_windows.o $(T)error.o $(T)threading.o $(T)Semaphores.o $(T)stacktoucher.o
#Tempos and time
OBJ8= $(T)reltempo.o $(T)temponodes.o $(T)tempos.o $(T)time.o $(T)temponodes_legalize.o $(T)swing.o
#Playing
OBJ9= $(T)Ptask2Mtask.o $(T)player.o $(T)scheduler.o $(T)scheduler_seqtracks.o $(T)scheduler_notes.o $(T)scheduler_reallines.o $(T)scheduler_LPB.o $(T)scheduler_Beats.o $(T)scheduler_Signature.o $(T)playerclass.o $(T)player_startstop.o $(T)player_pause.o
# $(T)scheduler_fxs.o $(T)scheduler_velocities.o $(T)scheduler_pitches.o
#Disk
OBJ10= $(T)disk.o $(T)disk_fxs.o $(T)disk_wblock.o $(T)disk_localzooms.o $(T)disk_track.o $(T)disk_fx.o $(T)disk_fxnodelines.o $(T)disk_wtrack.o $(T)disk_temponodes.o $(T)disk_tempos.o $(T)disk_song.o $(T)disk_velocities.o $(T)disk_block.o $(T)disk_placement.o $(T)disk_stops.o $(T)disk_playlist.o $(T)disk_root.o $(T)disk_notes.o $(T)disk_lpbs.o $(T)disk_signatures.o $(T)disk_swing.o $(T)disk_windows.o $(T)disk_warea.o $(T)disk_save.o $(T)disk_load.o $(T)disk_saveload_blocktrack.o $(T)disk_instrument.o $(T)disk_patches.o $(T)disk_slider.o
#Undo
OBJ11= $(T)undo.o $(T)undo_notes.o $(T)undo_fxs.o $(T)undo_temponodes.o $(T)undo_tempos.o $(T)undo_swings.o $(T)undo_lpbs.o $(T)undo_signatures.o $(T)undo_notesandfxs.o $(T)undo_reallines.o $(T)undo_tracks.o $(T)undo_range.o $(T)undo_blocks.o $(T)undo_trackheader.o $(T)undo_reltempomax.o $(T)undo_maintempos.o $(T)undo_block_insertdelete.o $(T)undo_block_mergesplit.o $(T)undo_reltemposlider.o $(T)undo_sequencer.o $(T)undo_song_tempo_automation.o $(T)undo_patchvoice.o $(T)undo_patchname.o $(T)undo_instrument_color.o $(T)undo_chip_position.o
#X11 Spesific
#OBJ12= $(T)X11_visual.o $(T)X11_error.o $(T)X11_Ptask2Mtask.o $(T)X11_Bs_edit.o $(T)X11_Main.o $(T)X11_endprogram.o $(T)X11_disk.o $(T)X11_Player.o $(T)X11_memory.o $(T)X11_ReqType.o $(T)X11_keyboard.o $(T)X11_MidiProperties.o
#Qt Spesific
OBJ12= $(T)Qt_instruments.o $(T)Qt_visual.o $(T)GTK_visual.o $(T)Qt_Main.o $(T)KeyboardFocus.o $(T)Qt_endprogram.o $(T)Qt_EventReceiver.o $(T)Qt_colors.o $(T)Qt_Menues.o $(T)Qt_Fonts.o $(T)Qt_ReqType.o $(T)Qt_PopupMenu.o $(T)Qt_Bs_edit.o $(T)Qt_PluginWidget.o $(T)Qt_SliderPainter.o $(T)Qt_memory.o $(T)Qt_path_resolver.o $(T)Qt_settings.o $(T)Qt_disk.o $(T)Qt_MainWindow.o $(T)Qt_Time.o $(T)Qt_sequencer.o $(T)GTK_ReqType.o $(T)GTK_PopupMenu.o $(T)Qt_soundfilesaver_widget_callbacks.o $(T)Qt_comment_dialog.o $(T)Qt_song_properties.o $(T)Qt_preferences_callbacks.o $(T)Qt_tools_callbacks.o $(T)Qt_Error.o $(T)Qt_progresswindow.o $(T)Qt_check_for_updates.o $(T)Rational.o $(T)Qt_AutoBackups.o $(T)flowlayout.o $(T)Qt_PresetBrowser.o $(T)Qt_SaveRestoreWindows.o
#X11_MidiProperties.o $(T)X11_ClientMessages.o $(T)
#Qt_Bs_edit.o $(T)
#Posix (used by linux/win/mac)
OBJ_POSIX=$(T)posix_settings.o $(T)posix_Player.o
# Two of the following three must be set empty by the build script.
OBJ_X11 ?= $(T)X11_keyboard.o $(T)X11_disk.o
OBJ_WIN ?= $(T)X11_disk.o $(T)W_Keyboard.o
OBJ_MACOSX ?= $(T)X11_disk.o $(T)cocoa_Keyboard.o do.o $(T)machthreads.o
#Python
OBJ13=$(T)radium_wrap.o $(T)api_common.o $(T)api_keyplay.o $(T)api_keyplayedit.o $(T)api_navigate.o $(T)api_disk.o $(T)api_noteedit.o $(T)api_velocities.o $(T)api_pitches.o $(T)api_timing.o $(T)api_support.o $(T)wrapfunclist.o $(T)api_trackonoff.o $(T)api_zoom.o $(T)api_notemanipulate.o $(T)api_play.o $(T)api_clipboard.o $(T)api_undo.o $(T)api_various.o $(T)api_instruments.o $(T)api_soundpluginregistry.o $(T)api_requesters.o $(T)api_mouse.o $(T)api_sequencer.o $(T)api_gui.o $(T)api_osc.o $(T)api_midi.o
#Midi
OBJ14=$(T)disk_midi_fx.o $(T)disk_midi_instrument.o $(T)midi_fx.o $(T)midi_instrument.o $(T)midi_playfromstart.o $(T)midi_i_input.o $(T)midi_ports.o
#$(T)midi_menues.o
# alsaseq_midi.o
#Faust plugins
OBJ_FAUST=$(T)zita_rev.o $(T)stk_flute.o $(T)stk_bowed.o $(T)stk_blow_bottle.o $(T)stk_bass.o $(T)stk_blow_hole.o $(T)stk_brass.o $(T)stk_clarinet.o $(T)stk_flute_stk.o $(T)stk_glass_harmonica.o $(T)stk_harpsi.o $(T)stk_modal_bar.o $(T)stk_NLF_eks.o $(T)stk_NLF_fm.o $(T)stk_piano.o $(T)stk_saxophony.o $(T)stk_sitar.o $(T)stk_tibetan_bowl.o $(T)stk_tuned_bar.o $(T)stk_uni_bar.o $(T)stk_voice_form.o $(T)faust_tapiir.o $(T)faust_system_eq.o $(T)faust_system_tremolo.o $(T)faust_system_lowpass.o $(T)faust_system_highpass.o $(T)faust_system_lowshelf.o $(T)faust_system_highshelf.o $(T)faust_multibandcomp.o
#AUDIO
OBJ_AUDIO=$(T)audio_instrument.o $(T)SoundProducer.o $(T)AudioBuffer.o $(T)Jack_plugin.o $(T)find_jack_library.o $(T)Faust_plugins.o $(T)Bus_plugins.o $(T)Timeskew_plugin.o $(T)Patchbay_plugin.o $(T)MidiMessages_plugin.o $(T)VST_plugins.o $(T)Ladspa_plugins.o $(T)Sampler_plugin.o $(T)SampleRecorder.o $(T)SampleReader.o $(T)Seqtrack_plugin.o $(T)FluidSynth_plugin.o $(T)Pd_plugin.o $(T)Modulator_plugin.o $(T)SendReceive_plugins.o $(T)SoundPluginRegistry.o $(T)SoundPlugin.o $(T)AudioMeterPeaks.o $(T)Peaks.o $(T)Fade.o $(T)Mixer.o $(T)get_windows_commandlines.o $(T)Envelope.o $(T)Resampler.o $(T)SoundFonts.o $(T)Presets.o $(T)undo_audio_effect.o $(T)undo_connection_enabled.o $(T)undo_audio_connection_gain.o $(T)undo_pd_controllers.o $(T)undo_plugin_state.o $(T)SoundfileSaver.o $(T)system_compressor_wrapper.o $(T)KillJackd.o $(T)SF.o $(T)RIFF.o
#MultiCore.o $(T)Smooth.o
#Mixer
QM=mixergui/
OBJ_MIXER=$(T)QM_view.o $(T)QM_chip.o $(T)QM_MixerWidget.o $(T)undo_mixer.o $(T)undo_mixer_connections.o
#undo_chip_addremove.o
#OpenGL
OBJ_VL=$(T)GfxElements.o $(T)T2.o $(T)Render.o $(T)Widget.o $(T)CheckOpenGL.o
# Qt${RADIUM_QT_VERSION}Widget.o $(T)moc_Qt${RADIUM_QT_VERSION}Widget.o
# Not using sndlib anymore, but will perhaps in the future.
#
#SNDLIBFILES=sndlib_objectfiles/headers.o $(T)sndlib_objectfiles/audio.o $(T)sndlib_objectfiles/io.o $(T)sndlib_objectfiles/sound.o $(T)sndlib_objectfiles/xen.o $(T)sndlib_objectfiles/vct.o $(T)sndlib_objectfiles/clm.o $(T)sndlib_objectfiles/sndlib2xen.o $(T)sndlib_objectfiles/clm2xen.o
#
SNDLIBFILES=
#Embedded scheme
OBJ_ES=$(T)scheme.o bin/packages/s7/s7_$(TARGET_OS)_$(BUILDTYPE).o $(SNDLIBFILES) $(T)s7webserver.o $(T)radium_s7_wrap.o $(T)qhttpconnection.o $(T)moc_qhttpconnection.o $(T)qhttprequest.o $(T)moc_qhttprequest.o $(T)qhttpresponse.o $(T)moc_qhttpresponse.o $(T)qhttpserver.o $(T)moc_qhttpserver.o $(T)http_parser.o
OBJ = $(OBJ12) $(OBJ_ES) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJ10) $(OBJ11) $(OBJ13) $(OBJ_POSIX) $(OBJ_X11) $(OBJ_WIN) $(OBJ_MACOSX) $(OBJ14) $(OBJ_FAUST) $(OBJ_AUDIO) $(OBJ_MIXER) $(OBJ_VL)
#-------------------KARSJK-------------------------------
BUILD_DEPENDENCIES = flagopts.opt $(CD)keyboard_sub_ids.h dependencies_ok
#buildtype.opt
PROGRAM_MODULES = $(RADIUM_BIN) bin/radium_crashreporter bin/protoconfparser.py bin/protos.conf bin/radium_error_message bin/radium_progress_window bin/radium_check_jack_status bin/radium_check_opengl bin/radium_plugin_scanner bin/scheme/api_protos.scm
OBJECT_DEPENDENCIES = $(BUILD_DEPENDENCIES)
#bin/styles/libqcleanlooksstyle.so bin/styles/libqplastiquestyle.so
all:
@echo
@echo "Use one of the ./build_* scripts to build Radium."
@echo
radium: CCC_OK.touch $(BUILD_DEPENDENCIES) $(PROGRAM_MODULES) Makefile.Qt
@echo
@echo "Compilation OK."
@echo
@echo "Run 'bin/radium' to start radium"
very_clean: clean
rm -f bin/packages/s7/*.o
cd pluginhost/Builds/Linux && $(MAKE) clean && cd ../../../
cd bin/packages && ./buildclean.sh
clean:
@echo -e "\033[0;31mRun ./build_clean.sh instead\033[0m"
@false
clean_pluginhost:
echo "Cleaning pluginhost..."
cd pluginhost/Builds/Linux && $(MAKE) clean && rm -fr build
echo "Cleaning pluginhost finished..."
CCC_OK.touch: $(ALL_SHELL_SCRIPTS) Makefile.Qt
bash check_CCC_OK.sh
dependencies_ok: check_dependencies.sh #Makefile
bash check_dependencies.sh `./find_python_path.sh` $(MOC) $(UIC) test_build
# sh check_dependencies.sh $(PYTHONEXE) $(MOC) $(UIC)
touch dependencies_ok
install:
@echo
@echo "make install is not supported anymore. Use install.sh instead. See bin/packages/README"
@echo
exit -1
bash check_install_dependencies.sh
install -d $(DESTDIR)$(bindir)
install -d $(DESTDIR)$(libdir)/radium
cp -a bin/* $(DESTDIR)$(libdir)/radium/
rm -fr $(DESTDIR)$(libdir)/radium/packages/*
mkdir $(DESTDIR)$(libdir)/radium/packages/xmessage-1.0.3/
cp bin/packages/xmessage-1.0.3/xmessage $(DESTDIR)$(libdir)/radium/packages/xmessage-1.0.3/
rm -fr $(DESTDIR)$(libdir)/radium/python2.7
chmod -R a+rx $(DESTDIR)$(libdir)/radium/*
echo "#!/bin/sh" >$(DESTDIR)$(bindir)/radium
echo "cd " $(libdir)/radium >>$(DESTDIR)$(bindir)/radium
echo "./radium" >>$(DESTDIR)$(bindir)/radium
chmod a+rx $(DESTDIR)$(bindir)/radium
uninstall:
rm -fr $(DESTDIR)$(libdir)/radium
rm -f $(DESTDIR)$(bindir)/radium
run-gdb:
# ./build_linux.sh -j7 && cd bin && G_DEBUG=fatal-criticals QT_FATAL_WARNINGS=1 gdb ./radium
./build_linux.sh -j7 && cd bin && gdb ./radium # [1]
# ./build_linux.sh -j7 && cd bin && G_DEBUG=fatal-criticals gdb QT_DEBUG_PLUGINS=1 QT_FATAL_WARNINGS=1 ./radium
# [1]
# G_DEBUG=fatal-criticals
# QT_FATAL_WARNINGS=1 doesn't work so well with qt5/linux right now. Getting
# "QXcbConnection: XCB error: 3 (BadWindow), sequence: 14219, resource id: 8795562, major code: 40 (TranslateCoords), minor code: 0"
# when closing dialogs. (In qt4 it can crash when we open dialogs, now it's when closing dialogs. However, in qt4 it was known why this happened (opengl race condition in qt).)
#./build_linux.sh -j7 && cd bin && G_DEBUG=fatal-criticals QT_FATAL_WARNINGS=1 gdb -e ./radium -x ../gakk
# make -j3 && cd bin && G_DEBUG=fatal-criticals QT_FATAL_WARNINGS=1 gdb --args $(PYTHONEXE) start.py keybindings.conf && cd ..
run-valgrind:
echo "Execute first: jackd -s -r -ddummy -r 11000 -p 2048 -w 5000000"
$(CC) -DMEMORY_DEBUG $(CD)memory.c $(OPT)
rm -f Mixer.o SoundProducer.o linux_objs/Mixer.o linux_objs/SoundProducer.o
# make -j3 && cd bin && valgrind --tool=helgrind $(PYTHONEXE) start.py keybindings.conf
BUILDTYPE=DEBUG CFLAGS="-DMEMORY_DEBUG" ./build_linux.sh -j7 && rm -f memory.o Mixer.o SoundProducer.o && cd bin && valgrind --suppressions=../valgrind-python.supp --suppressions=../Qt47supp.txt --suppressions=../libgc.supp --tool=memcheck --leak-check=no --read-var-info=yes --track-origins=yes --fair-sched=yes ./radium
# --dont-load-new-song
# make -j3 && cd bin && valgrind gdb --args $(PYTHONEXE) start.py keybindings.conf
rm -f Mixer.o SoundProducer.o memory.o
# --tool=memcheck --read-var-info=yes --track-origins=yes
profile:
@echo
@echo
@echo "=== NOTE: If 'make profile' fails, two radium instances might be running. ==="
@echo
perf top --sort comm,dso -p `pidof radium_linux.bin` -K
#--sort comm,dso
# operf $(RADIUM_BIN) && opreport -ca |more
check: test
test: test_vector test_placement test_notes test_path_resolver test_seqautomation test_audiobuffer test_smoothdelay test_threading test_samplereader test_ratio test_refcounttimedata test_rt_memory_allocator test_radium_vector test_timedata
@echo
@echo " == All tests succeeded, apparently =="
TEST_ARCH=-DFOR_LINUX
ifeq ($(UNAME), Darwin)
TEST_ARCH_DEF=-DFOR_MACOSX
endif
TEST_TIMEDATA_OPTS=-DTEST_TIMEDATA_MAIN -Wall $(WERROR) -g -lpthread $(filter-out -c, $(CPPOPT)) $(TEST_ARCH_DEF) -I. -I../Qt -Wno-error=parentheses
#TEST_TIMEDATA_RUNNER=gdb -ex "set print thread-events off" -ex run -ex=quit ./a.out
TEST_TIMEDATA_RUNNER=lldb -o run -f ./a.out
test_refcounttimedata:
$(CCC) common/TimeData.cpp $(TEST_TIMEDATA_OPTS) `$(PKGqt) --cflags Qt5Core --libs Qt5Core` -fPIC -O3 -DTEST_SHARED_PTR -DTEST_REFCOUNTTIMEDATA -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
# --rtlib=compiler-rt
test_timedata:
$(CCC) common/TimeData.cpp $(TEST_TIMEDATA_OPTS) -o a.out && $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -DTEST_SHARED_PTR=1 -Ofast -o a.out && $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -Os -o a.out && $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -DTEST_SHARED_PTR=1 -O3 -o a.out && $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp -DRELEASE $(TEST_TIMEDATA_OPTS) -O2 -o a.out && $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -DTEST_SHARED_PTR=1 -O3 -fsanitize=thread -o a.out && TSAN_OPTIONS="history_size=7,second_deadlock_stack=1,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -O2 -fsanitize=undefined -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -DTEST_SHARED_PTR=1 -O3 $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp $(TEST_TIMEDATA_OPTS) -O2 $(UNDEFINED_SANITIZE_OPTS) $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp -DRELEASE $(TEST_TIMEDATA_OPTS) -DTEST_SHARED_PTR=1 -O2 -fsanitize=thread -o a.out && TSAN_OPTIONS="history_size=7,second_deadlock_stack=1,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp -DRELEASE $(TEST_TIMEDATA_OPTS) -O3 -fsanitize=undefined -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp -DRELEASE $(TEST_TIMEDATA_OPTS) -DTEST_SHARED_PTR=1 -O2 $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) TimeData.cpp -DRELEASE $(TEST_TIMEDATA_OPTS) -O3 -fsanitize=undefined $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
test_timedata_gdb:
# cd common && g++ TimeData.cpp $(TEST_TIMEDATA_OPTS) -o a.out && gdb -ex "set print thread-events off" $(TEST_TIMEDATA_RUNNER)
# cd common && g++ TimeData.cpp $(TEST_TIMEDATA_OPTS) -O3 -o a.out && gdb -ex "set print thread-events off" $(TEST_TIMEDATA_RUNNER)
# cd common && g++ TimeData.cpp $(TEST_TIMEDATA_OPTS) -O3 -fsanitize=thread -o a.out && gdb -ex "set print thread-events off" TSAN_OPTIONS="history_size=7,second_deadlock_stack=1,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && g++ TimeData.cpp $(TEST_TIMEDATA_OPTS) -O3 -fsanitize=undefined $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" gdb -ex "set print thread-events off" ./a.out
cd common && g++ TimeData.cpp $(TEST_TIMEDATA_OPTS) -O3 -fsanitize=undefined $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" ./a.out
TEST_RT_MEMORY_ALLOCATOR_OPTS=$(BOOST_FLAGS) $(TEST_TIMEDATA_OPTS)
test_rt_memory_allocator:
echo
printf "\033[0;36mTo use clang: CC=clang CCC=clang++ make test_rt_memory_allocator\033[0m\n"
echo
cd common && touch buildtype.opt flagopts.opt
cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -DRADIUM_USES_UBSAN -O3 -fsanitize=undefined $(ADDRESS_SANITIZE_OPTS) -O0 -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -DRADIUM_USES_UBSAN -O3 -fsanitize=undefined $(ADDRESS_SANITIZE_OPTS) -o a.out && UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -DRADIUM_USES_TSAN -O0 -fsanitize=thread -o a.out && TSAN_OPTIONS="history_size=7,second_deadlock_stack=1,abort_on_error=1,suppressions=../SanitizerSuppr.txt" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -DRADIUM_USES_TSAN -O1 -fsanitize=thread -o a.out && TSAN_OPTIONS="history_size=7,second_deadlock_stack=1,abort_on_error=1,suppressions=../SanitizerSuppr.txt" $(TEST_TIMEDATA_RUNNER)
#FIX! it fails!
#cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -DRADIUM_USES_TSAN -O3 -fsanitize=thread -o a.out && TSAN_OPTIONS="history_size=7,second_deadlock_stack=1,abort_on_error=1,suppressions=../SanitizerSuppr.txt" $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -O0 -o a.out && $(TEST_TIMEDATA_RUNNER)
cd common && $(CCC) RT_memory_allocator.cpp $(TEST_RT_MEMORY_ALLOCATOR_OPTS) -DTEST_MAIN -O3 -o a.out && $(TEST_TIMEDATA_RUNNER)
#mingw32:
#i686-w64-mingw32.static-g++ -Wall -Wno-parentheses RT_memory_allocator.cpp -I/home/kjetil/boost_1_63_0 -DTEST_MAIN -DFOR_WINDOWS -D__STDC_FORMAT_MACROS=1 -O3 -msse2 -mfpmath=sse -I../Qt -std=$(STD_CPP) -o a.out
test_ratio:
cd common && ln -sf ratio_funcs.h test_ratio.cpp && g++ test_ratio.cpp -D__STDC_FORMAT_MACROS=1 -DTEST_MAIN -Wall $(WERROR) -Wno-unused-function -g -o a.out && ./a.out
# cd common && ln -sf ratio_funcs.h test_ratio.cpp && g++ test_ratio.cpp -D__STDC_FORMAT_MACROS=1 -DTEST_MAIN -Wall $(WERROR) -g -o a.out && gdb ./a.out
test_radium_vector:
cd test && $(CCC) -Wall $(WERROR) test_radium_vector.cpp -DTEST_RADIUM_VECTOR_MAIN -Wall -std=$(STD_CPP) -g -D__STDC_FORMAT_MACROS=1 $(ADDRESS_SANITIZE_OPTS) $(UNDEFINED_SANITIZE_OPTS) $(TEST_ARCH_DEF) -I../Qt -Wno-unused-function -O3 -o test_radium_vector
ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" gdb -ex='set confirm on' -ex=run -ex=quit test/test_radium_vector
ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" UBSAN_OPTIONS="print_stacktrace=1:abort_on_error=1" test/test_radium_vector
test_samplereader:
cd audio && $(CCC) SampleReader.cpp -DTEST_MAIN -Wall -std=$(STD_CPP) -g && ./a.out
test_threading:
$(CCC) common/threading.cpp -DTEST_THREADING -Wall $(QTOPT) $(BOOST_FLAGS) -fPIC $(TEST_ARCH_DEF) $(JACKOPT) -Wno-deprecated-declarations
mv threading.o test_threading.o
$(CCC) test_threading.o $(QT_LDFLAGS) $(BOOST_FLAGS) -lpthread $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -std=$(STD_CPP)
./a.out
# rm -f test_threading.o
# echo "GGGGGGGGGGG"
# clang++ common/threading.cpp -DTEST_THREADING -Wall $(QTOPT) -fPIC $(TEST_ARCH_DEF)
# mv threading.o test_threading.o
# echo "HHHHHHHHH"
# clang++ threading.o $(QT_LDFLAGS) -lpthread $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -std=$(STD_CPP)
# ./a.out
test_vector:
$(CC) -g -Wall $(WERROR) -D__STDC_FORMAT_MACROS=1 -DTEST_VECTOR -DUSE_QT_REQTYPE=1 common/vector.c common/memory.c -IQt -I$(GCDIR)/include $(GCDIR)/.libs/libgc.a -lpthread $(ADDRESS_SANITIZE_OPTS) -fPIC $(TEST_ARCH_DEF) -std=$(STD_C)
# valgrind --suppressions=valgrind-python.supp --suppressions=Qt47supp.txt --suppressions=libgc.supp --tool=memcheck --leak-check=no --read-var-info=yes --track-origins=yes --fair-sched=yes ./a.out
# ASAN_OPTIONS="detect_leaks=0,allocator_may_return_null=1,suppressions=SanitizerSuppr.txt,abort_on_error=1,new_delete_type_mismatch=0"
ASAN_OPTIONS="detect_leaks=0,abort_on_error=1" ./a.out
test_placement:
$(CC) -g -Wall $(WERROR) -DTEST_PLACEMENT -D__STDC_FORMAT_MACROS=1 -DUSE_QT_REQTYPE=1 common/placement.c common/memory.c -IQt -I$(GCDIR)/include $(GCDIR)/.libs/libgc.a -lpthread -fPIC $(TEST_ARCH_DEF) -std=$(STD_C)
# gdb ./a.out
valgrind --suppressions=valgrind-python.supp --suppressions=Qt47supp.txt --suppressions=libgc.supp --tool=memcheck --leak-check=no --read-var-info=yes --track-origins=yes --fair-sched=yes ./a.out
test_notes:
$(CCC) -g -Wall $(WERROR) -DTEST_NOTES -D__STDC_FORMAT_MACROS=1 -DUSE_OPENGL -DUSE_QT_REQTYPE=1 common/notes.cpp common/memory.c -IQt -I$(GCDIR)/include $(GCDIR)/.libs/libgc.a -lpthread -fPIC $(TEST_ARCH_DEF) -std=$(STD_CPP) -Wno-deprecated
# gdb ./a.out
valgrind --suppressions=valgrind-python.supp --suppressions=Qt47supp.txt --suppressions=libgc.supp --tool=memcheck --leak-check=no --read-var-info=yes --track-origins=yes --fair-sched=yes ./a.out
# Commented out. Too many link errors.
test_path_resolver:
# $(CCC) -g -Wall $(WERROR) -DTEST_PATH_RESOLVER -DUSE_OPENGL -DUSE_QT_REQTYPE=1 -DUSE_QT4 Qt/Qt_path_resolver.cpp -IQt $(QT_CFLAGS) $(QT_LDFLAGS) $(GCDIR)/.libs/libgc.a -lpthread -fPIC $(TEST_ARCH_DEF) -std=$(STD_CPP) -Wno-error=unknown-pragmas -DUSE_QT5 $(SNDFILEOPT) -DRADIUM_VERSION=\"$(RADIUM_VERSION)\" -lsndfile
# ./a.out
# valgrind --suppressions=valgrind-python.supp --suppressions=Qt47supp.txt --suppressions=libgc.supp --tool=memcheck --leak-check=no --read-var-info=yes --track-origins=yes --fair-sched=yes ./a.out
test_seqautomation:
$(CCC) -g -Wall -Wextra $(WERROR) test/test_seqautomation.cpp $(QTOPT) -UNDEBUG $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -DUSE_QT4 -DUSE_QT5 -fPIC $(TEST_ARCH_DEF) -DTEST_SEQAUTOMATION_MAIN
$(CCC) test_seqautomation.o $(QT_LDFLAGS) $(QTLINKFLAGS) $(OS_LDFLAGS2) $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -o test_seqautomation.bin
./test_seqautomation.bin
@echo "=== success: test_seqautomation ==="
@rm test_seqautomation.bin
test_audiobuffer:
$(CCC) -g -Wall $(WERROR) test/test_audiobuffer.cpp $(QTOPT) -UNDEBUG $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -fPIC $(TEST_ARCH_DEF) -DUSE_QT4 -DUSE_QT5
$(CCC) test_audiobuffer.o $(QT_LDFLAGS) $(QTLINKFLAGS) $(OS_LDFLAGS2) $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -o test_audiobuffer.bin
LSAN_OPTIONS=detect_leaks=0 gdb -ex='set confirm on' -ex=run -ex=quit ./test_audiobuffer.bin
LSAN_OPTIONS=detect_leaks=0 ./test_audiobuffer.bin
@echo "=== success: test_audiobuffer ==="
@rm test_audiobuffer.bin
test_smoothdelay:
$(CCC) -g -Wall $(WERROR) test/test_smoothdelay.cpp $(CPPOPT) -UNDEBUG $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -fPIC $(TEST_ARCH_DEF)
$(CCC) -g -Wall $(WERROR) audio/Fade.cpp $(CPPOPT) -UNDEBUG -fPIC $(TEST_ARCH_DEF) -DTEST_SMOOTHDELAY -O3 -ffast-math -DMARCH_NATIVE_ALLOWED=1 # -march=native # -ffast-math -fopt-info-vec-optimized -fopt-info-vec-all (maybe use QTOPT instead of CPPOPT...)
$(CCC) test_smoothdelay.o Fade.o $(OS_LDFLAGS2) $(ADDRESS_SANITIZE_OPTS) -fsanitize=undefined -o test_smoothdelay
LSAN_OPTIONS=detect_leaks=0 gdb -ex='set confirm on' -ex=run -ex=quit ./test_smoothdelay
LSAN_OPTIONS=detect_leaks=0 ./test_smoothdelay
@echo "=== success: test_smoothdelay ==="
@rm test_smoothdelay
#SMOOTHDELAY_OPTS=-Rpass-analysis=loop-vectorize -Rpass=loop-vectorize -Rpass-missed=loop-vectorize
benchmark_smoothdelay:
@echo
@printf "\033[0;36m!!!! First: ./build_clean.sh && BUILDTYPE=RELEASE ./build_linux.sh + ctrl-c.\n"
@printf "!!!! To benchmark using clang: CC=clang CCC=clang++ make benchmark_smoothdelay.\033[0m\n"
@echo
$(CCC) -g -Wall $(WERROR) test/test_smoothdelay.cpp $(CPPOPT) -UNDEBUG -fPIC $(TEST_ARCH_DEF) -DBENCHMARK_SMOOTHDELAY -O3 $(SMOOTHDELAY_OPTS) -ffast-math -ffast-math #-fopt-info-vec-optimized -fopt-info-vec-all
$(CCC) -g -Wall $(WERROR) audio/Fade.cpp $(CPPOPT) -UNDEBUG -fPIC $(TEST_ARCH_DEF) -DBENCHMARK_SMOOTHDELAY -O3 $(SMOOTHDELAY_OPTS) -DMARCH_NATIVE_ALLOWED=1 -march=native -ffast-math #-fopt-info-vec-optimized -fopt-info-vec-all
#-march=native
#-fno-signed-zeros
$(CCC) test_smoothdelay.o Fade.o $(OS_LDFLAGS2) -o test_smoothdelay
./test_smoothdelay
@rm test_smoothdelay
packages: bin/packages/deletemetorebuild
bin/packages/deletemetorebuild: bin/packages/build.sh
bash check_dependencies.sh `./find_python_path.sh` $(MOC) $(UIC) test_packages
echo "\
cd bin/packages;\
./build.sh this_argument_is_not_used no \
" >makescript.sh
bash makescript.sh
@echo
@echo "packages successfully built. Now run ./build_linux.sh -j7"
#bin/styles/libqcleanlooksstyle.so: bin/packages/qtstyleplugins-src-5.0.0/plugins/styles/libqcleanlooksstyle.so bin/styles
# cp bin/packages/qtstyleplugins-src-5.0.0/plugins/styles/libqcleanlooksstyle.so bin/styles/