This repository has been archived by the owner on May 7, 2024. It is now read-only.
forked from GloriousEggroll/proton-ge-custom
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
1497 lines (1195 loc) · 46.2 KB
/
Makefile.in
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
# Enable secondary expansions, needed for font compilation rules
.SECONDEXPANSION:
SRC := $(abspath $(SRCDIR))
OBJ := $(abspath $(CURDIR))
ifeq ($(filter s,$(MAKEFLAGS)),s)
MAKEFLAGS += --quiet --no-print-directory
--quiet? := --quiet
CARGO_BUILD_ARGS := --quiet
else
MFLAGS += V=1 VERBOSE=1
-v? := -v
--verbose? := --verbose
endif
SHELL := /bin/bash
##
## General/global config
##
# We expect the configure script to conditionally set the following:
# SRCDIR - Path to source
# BUILD_NAME - Name of the build for manifests etc.
# STEAMRT_IMAGE - Name of the docker image to use for building
STEAMRT_IMAGE ?= registry.gitlab.steamos.cloud/proton/sniper/sdk:0.20230905.59202-0
ifeq ($(SRCDIR),)
foo := $(error SRCDIR not set, do not include Makefile.in directly, run ./configure.sh to generate Makefile)
endif
DST_BASE := $(OBJ)/dist
DST_DIR := $(DST_BASE)/files
DST_LIBDIR32 := $(DST_DIR)/lib
DST_LIBDIR64 := $(DST_DIR)/lib64
DIST_PREFIX := $(DST_DIR)/share/default_pfx/
DIST_VERSION := $(DST_BASE)/version
DEPLOY_DIR := ./deploy
REDIST_DIR := ./redist
ifneq ($(UNSTRIPPED_BUILD),)
STRIP :=
INSTALL_PROGRAM_FLAGS :=
MESON_STRIP_ARG :=
else
STRIP := strip
INSTALL_PROGRAM_FLAGS := -s
MESON_STRIP_ARG := --strip
endif
CROSSLDFLAGS += -Wl,--file-alignment,4096
OPTIMIZE_FLAGS := -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse
SANITY_FLAGS := -fwrapv -fno-strict-aliasing
DEBUG_FLAGS := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer
COMMON_FLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS) $(SANITY_FLAGS) -ffile-prefix-map=$(CCACHE_BASEDIR)=.
COMMON_FLAGS32 := -mstackrealign
COMMON_FLAGS64 := -mcmodel=small
CARGO_BUILD_ARGS += --release
ifneq ($(SUPPRESS_WARNINGS),)
COMMON_FLAGS += -w
endif
ifeq ($(ENABLE_BEAR),1)
BEAR := bear --append --
else
BEAR :=
endif
$(DST_DIR):
mkdir -p $@
ifeq ($(CONTAINER),1) # inside the container
# all, all-dist and dist are basically synonyms
.PHONY: all all-dist dist
all: all-dist | $(DST_DIR)
all-dist: | $(DST_DIR)
dist: all
J = $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
include $(SRC)/make/utility.mk
include $(SRC)/make/rules-source.mk
include $(SRC)/make/rules-common.mk
include $(SRC)/make/rules-makedep.mk
include $(SRC)/make/rules-meson.mk
include $(SRC)/make/rules-cmake.mk
include $(SRC)/make/rules-autoconf.mk
include $(SRC)/make/rules-configure.mk
include $(SRC)/make/rules-winemaker.mk
include $(SRC)/make/rules-cargo.mk
##
## dav1d
##
DAV1D_MESON_ARGS = \
-Denable_tools=false \
-Denable_tests=false
$(eval $(call rules-source,dav1d,$(SRCDIR)/dav1d))
$(eval $(call rules-meson,dav1d,32))
$(eval $(call rules-meson,dav1d,64))
##
## gst-orc
##
GST_ORC_MESON_ARGS := \
-Dexamples=disabled \
-Dtests=disabled \
-Dbenchmarks=disabled \
-Dorc-test=disabled
$(eval $(call rules-source,gst_orc,$(SRCDIR)/gst-orc))
$(eval $(call rules-meson,gst_orc,32))
$(eval $(call rules-meson,gst_orc,64))
##
## gstreamer
##
GSTREAMER_MESON_ARGS := \
-Dgst_parse=false \
-Dintrospection=disabled \
-Dgobject-cast-checks=disabled \
-Dglib-asserts=disabled \
-Dglib-checks=disabled \
-Dnls=disabled \
-Dexamples=disabled \
-Dtests=disabled \
-Ddoc=disabled \
-Dbenchmarks=disabled \
-Dtools=disabled \
-Dbash-completion=disabled
GSTREAMER_DEPENDS = gst_orc
$(eval $(call rules-source,gstreamer,$(SRCDIR)/gstreamer/subprojects/gstreamer))
$(eval $(call rules-meson,gstreamer,32))
$(eval $(call rules-meson,gstreamer,64))
##
## graphene
##
$(eval $(call rules-source,graphene,$(SRCDIR)/graphene))
$(eval $(call rules-meson,graphene,32))
$(eval $(call rules-meson,graphene,64))
##
## gst-plugins-base
##
GST_BASE_MESON_ARGS := \
-Dauto_features=disabled \
-Dintrospection=disabled \
-Dgobject-cast-checks=disabled \
-Dglib-asserts=disabled \
-Dglib-checks=disabled \
-Dnls=disabled \
-Dexamples=disabled \
-Dtests=disabled \
-Ddoc=disabled \
-Dadder=enabled \
-Dapp=enabled \
-Daudioconvert=enabled \
-Daudioresample=enabled \
-Dogg=enabled \
-Dopus=enabled \
-Dpbtypes=enabled \
-Dplayback=enabled \
-Dtheora=enabled \
-Dtypefind=enabled \
-Dvideoconvertscale=enabled \
-Dvorbis=enabled \
-Drawparse=enabled \
-Dorc=enabled \
-Dx11=enabled \
-Dgl=enabled \
-Dgl-graphene=enabled \
-Dgl_winsys=surfaceless,x11,wayland,egl \
-Dgl_platform=glx,egl \
--wrap-mode nodownload \
GST_BASE_DEPENDS = gst_orc graphene gstreamer
$(eval $(call rules-source,gst_base,$(SRCDIR)/gstreamer/subprojects/gst-plugins-base))
$(eval $(call rules-meson,gst_base,32))
$(eval $(call rules-meson,gst_base,64))
##
## gst-plugins-good
##
GST_GOOD_MESON_ARGS := \
-Dauto_features=disabled \
-Dgobject-cast-checks=disabled \
-Dglib-asserts=disabled \
-Dglib-checks=disabled \
-Dnls=disabled \
-Dexamples=disabled \
-Dtests=disabled \
-Ddoc=disabled \
-Daudioparsers=enabled \
-Dautodetect=enabled \
-Davi=enabled \
-Ddebugutils=enabled \
-Ddeinterlace=enabled \
-Disomp4=enabled \
-Dmatroska=enabled \
-Dmpg123=enabled \
-Dvideobox=enabled \
-Dvideofilter=enabled \
-Dvpx=enabled \
-Dwavparse=enabled \
-Did3demux=enabled \
-Dmpg123=enabled \
-Dsoup=enabled \
-Ddirectsound=enabled \
-Dflv=enabled \
-Dflx=enabled \
-Dxingmux=enabled \
-Dy4m=enabled \
-Dadaptivedemux2=enabled \
-Dflac=enabled \
-Djpeg=enabled \
-Dspeex=enabled \
-Dorc=enabled
GST_GOOD_DEPENDS = gst_orc gstreamer gst_base
$(eval $(call rules-source,gst_good,$(SRCDIR)/gstreamer/subprojects/gst-plugins-good/))
$(eval $(call rules-meson,gst_good,32))
$(eval $(call rules-meson,gst_good,64))
##
## FFmpeg
##
FFMPEG_CONFIGURE_ARGS := \
--enable-shared \
--disable-static \
--disable-everything \
--disable-programs \
--disable-doc \
--enable-decoder=indeo5 \
--enable-decoder=adpcm_ms \
--enable-decoder=mpegvideo \
--enable-decoder=mpeg1video \
--enable-decoder=mp2 \
--enable-decoder=mpeg4 \
--enable-decoder=msmpeg4v1 \
--enable-decoder=msmpeg4v2 \
--enable-decoder=msmpeg4v3 \
--enable-decoder=vc1 \
--enable-decoder=vc1image \
--enable-decoder=wmav1 \
--enable-decoder=wmav2 \
--enable-decoder=wmapro \
--enable-decoder=wmalossless \
--enable-decoder=xma1 \
--enable-decoder=xma2 \
--enable-decoder=wmv3image \
--enable-decoder=wmv3 \
--enable-decoder=wmv2 \
--enable-decoder=wmv1 \
--enable-decoder=h264 \
--enable-decoder=aac \
--enable-demuxer=xwma
$(eval $(call rules-source,ffmpeg,$(SRCDIR)/ffmpeg))
$(eval $(call rules-configure,ffmpeg,32))
$(eval $(call rules-configure,ffmpeg,64))
##
## gst-libav
##
GST_LIBAV_DEPENDS = gst_orc gstreamer gst_base ffmpeg
$(eval $(call rules-source,gst_libav,$(SRCDIR)/gstreamer/subprojects/gst-libav))
$(eval $(call rules-meson,gst_libav,32))
$(eval $(call rules-meson,gst_libav,64))
##
## gst-plugins-rs
##
GST_PLUGINS_RS_CARGO_ARGS = \
-p gst-plugin-dav1d
GST_PLUGINS_RS_DEPENDS = gst_orc gstreamer gst_base dav1d
$(eval $(call rules-source,gst_plugins_rs,$(SRCDIR)/gst-plugins-rs))
$(eval $(call rules-cargo,gst_plugins_rs,32))
$(eval $(call rules-cargo,gst_plugins_rs,64))
$(OBJ)/.gst_plugins_rs-post-build64:
mkdir -p $(GST_PLUGINS_RS_DST64)/lib64/gstreamer-1.0/
cp -a $(GST_PLUGINS_RS_OBJ64)/x86_64-unknown-linux-gnu/release/libgstdav1d.so $(GST_PLUGINS_RS_DST64)/lib64/gstreamer-1.0/
touch $@
$(OBJ)/.gst_plugins_rs-post-build32:
mkdir -p $(GST_PLUGINS_RS_DST32)/lib/gstreamer-1.0/
cp -a $(GST_PLUGINS_RS_OBJ32)/i686-unknown-linux-gnu/release/libgstdav1d.so $(GST_PLUGINS_RS_DST32)/lib/gstreamer-1.0/
touch $@
##
## gst-plugins-bad
##
GST_BAD_MESON_ARGS := \
-Dauto_features=disabled \
-Dintrospection=disabled \
-Dgobject-cast-checks=disabled \
-Dglib-asserts=disabled \
-Dglib-checks=disabled \
-Dnls=disabled \
-Dexamples=disabled \
-Dtests=disabled \
-Ddoc=disabled \
-Daccurip=enabled \
-Dadpcmdec=enabled \
-Dadpcmenc=enabled \
-Daiff=enabled \
-Dasfmux=enabled \
-Daudiobuffersplit=enabled \
-Daudiofxbad=enabled \
-Daudiomixmatrix=enabled \
-Daudiolatency=enabled \
-Daudiovisualizers=enabled \
-Dautoconvert=enabled \
-Dbayer=enabled \
-Dcamerabin2=enabled \
-Dcodecalpha=enabled \
-Dcodectimestamper=enabled \
-Dcoloreffects=enabled \
-Ddebugutils=enabled \
-Ddvbsubenc=enabled \
-Ddvbsuboverlay=enabled \
-Ddvdspu=enabled \
-Dfaceoverlay=enabled \
-Dfestival=enabled \
-Dfieldanalysis=enabled \
-Dfreeverb=enabled \
-Dfrei0r=enabled \
-Dgaudieffects=enabled \
-Dgdp=enabled \
-Dgeometrictransform=enabled \
-Did3tag=enabled \
-Dinter=enabled \
-Dinterlace=enabled \
-Divfparse=enabled \
-Divtc=enabled \
-Djp2kdecimator=enabled \
-Djpegformat=enabled \
-Dlibrfb=enabled \
-Dmidi=enabled \
-Dmpegdemux=enabled \
-Dmpegpsmux=enabled \
-Dmpegtsdemux=enabled \
-Dmpegtsmux=enabled \
-Dmxf=enabled \
-Dnetsim=enabled \
-Donvif=enabled \
-Dpcapparse=enabled \
-Dpnm=enabled \
-Dproxy=enabled \
-Drawparse=enabled \
-Dremovesilence=enabled \
-Drist=enabled \
-Drtmp2=enabled \
-Drtp=enabled \
-Dsdp=enabled \
-Dsegmentclip=enabled \
-Dsiren=enabled \
-Dsmooth=enabled \
-Dspeed=enabled \
-Dsubenc=enabled \
-Dswitchbin=enabled \
-Dtimecode=enabled \
-Dtranscode=enabled \
-Dvideofilters=enabled \
-Dvideoframe_audiolevel=enabled \
-Dvideoparsers=enabled \
-Dvideosignal=enabled \
-Dvmnc=enabled \
-Dy4m=enabled \
-Ddvb=enabled \
-Dgtk3=enabled \
-Dipcpipeline=enabled \
-Dkms=enabled \
-Dshm=enabled \
-Duvch264=enabled \
-Dv4l2codecs=enabled \
-Daes=enabled \
-Dbz2=enabled \
-Dclosedcaption=enabled \
-Dcolormanagement=enabled \
-Ddash=enabled \
-Ddtls=enabled \
-Dhls=enabled \
-Dopenal=enabled \
-Dopus=enabled \
-Dsctp=enabled \
-Dsmoothstreaming=enabled \
-Dsndfile=enabled \
-Dttml=enabled \
-Dwayland=enabled \
-Dx11=enabled \
-Dwebp=enabled \
-Dorc=enabled
GST_BAD_DEPENDS = gst_orc gstreamer gst_base
$(eval $(call rules-source,gst_bad,$(SRCDIR)/gstreamer/subprojects/gst-plugins-bad))
$(eval $(call rules-meson,gst_bad,32))
$(eval $(call rules-meson,gst_bad,64))
##
## gst-plugins-ugly
##
GST_UGLY_MESON_ARGS := \
-Dauto_features=disabled \
-Dgobject-cast-checks=disabled \
-Dglib-asserts=disabled \
-Dglib-checks=disabled \
-Dnls=disabled \
-Dtests=disabled \
-Ddoc=disabled \
-Dasfdemux=enabled \
-Ddvdlpcmdec=enabled \
-Ddvdsub=enabled \
-Drealmedia=enabled \
-Dorc=enabled
GST_UGLY_DEPENDS = gst_orc gstreamer gst_base
$(eval $(call rules-source,gst_ugly,$(SRCDIR)/gstreamer/subprojects/gst-plugins-ugly))
$(eval $(call rules-meson,gst_ugly,32))
$(eval $(call rules-meson,gst_ugly,64))
##
## Vulkan-Headers
##
$(eval $(call rules-source,vulkan-headers,$(SRCDIR)/Vulkan-Headers))
$(eval $(call rules-cmake,vulkan-headers,32,CROSS))
$(eval $(call rules-cmake,vulkan-headers,64,CROSS))
##
## SPIRV-Headers
##
$(eval $(call rules-source,spirv-headers,$(SRCDIR)/SPIRV-Headers))
$(eval $(call rules-cmake,spirv-headers,32,CROSS))
$(eval $(call rules-cmake,spirv-headers,64,CROSS))
##
## Vulkan-Loader
##
VULKAN_LOADER_CMAKE_ARGS = -DUSE_MASM=OFF
VULKAN_LOADER_CMAKE_ARGS64 = -DVULKAN_HEADERS_INSTALL_DIR=$(VULKAN_HEADERS_DST64)
VULKAN_LOADER_CMAKE_ARGS32 = -DVULKAN_HEADERS_INSTALL_DIR=$(VULKAN_HEADERS_DST32)
VULKAN_LOADER_CFLAGS = -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 # 0x0A00 is _WIN32_WINNT_WIN10
VULKAN_LOADER_DEPENDS = vulkan-headers spirv-headers
$(eval $(call rules-source,vulkan-loader,$(SRCDIR)/Vulkan-Loader))
$(eval $(call rules-cmake,vulkan-loader,32,CROSS))
$(eval $(call rules-cmake,vulkan-loader,64,CROSS))
##
## glslang
##
$(eval $(call rules-source,glslang,$(SRCDIR)/glslang))
$(eval $(call rules-cmake,glslang,32))
$(eval $(call rules-cmake,glslang,64))
##
## lsteamclient
##
LSTEAMCLIENT_DEPENDS = wine
$(eval $(call rules-source,lsteamclient,$(SRCDIR)/lsteamclient))
$(eval $(call rules-makedep,lsteamclient,32))
$(eval $(call rules-makedep,lsteamclient,64))
##
## openxr
## Note 32-bit is not supported by SteamVR, so we don't build it.
##
OPENXR_CMAKE_ARGS = -DHAVE_FILESYSTEM_WITHOUT_LIB=0
$(eval $(call rules-source,openxr,$(SRCDIR)/OpenXR-SDK))
# $(eval $(call rules-cmake,openxr,32))
$(eval $(call rules-cmake,openxr,64))
##
## wineopenxr
## Note 32-bit is not supported by SteamVR, so we don't build it.
##
WINEOPENXR_LDFLAGS = -lopenxr_loader
WINEOPENXR_DEPENDS = wine openxr
$(eval $(call rules-source,wineopenxr,$(SRCDIR)/wineopenxr))
$(eval $(call rules-makedep,wineopenxr,64))
DIST_WINEOPENXR_JSON64 := $(DIST_PREFIX)/drive_c/openxr/wineopenxr64.json
$(WINEOPENXR_SRC)/wineopenxr64.json: wineopenxr
$(DIST_WINEOPENXR_JSON64): $(WINEOPENXR_SRC)/wineopenxr64.json default_pfx
mkdir -p $(dir $@)
cp -a $< $@
all-dist: $(DIST_WINEOPENXR_JSON64)
##
## steam.exe
##
STEAMEXE_CPPFLAGS = \
-I$(SRC)/lsteamclient/steamworks_sdk_142/ \
-I$(SRC)/openvr/headers/ \
STEAMEXE_LDFLAGS = \
-L$(SRC)/steam_helper/32/ \
-L$(SRC)/steam_helper/64/ \
-lsteam_api
STEAMEXE_DEPENDS = wine
$(eval $(call rules-source,steamexe,$(SRCDIR)/steam_helper))
$(eval $(call rules-makedep,steamexe,64))
$(eval $(call rules-makedep,steamexe,32))
$(OBJ)/.steamexe-post-build32:
cp $(SRC)/steam_helper/32/libsteam_api.so $(DST_LIBDIR32)/
touch $@
$(OBJ)/.steamexe-post-build64:
cp $(SRC)/steam_helper/64/libsteam_api.so $(DST_LIBDIR64)/
touch $@
##
## openfst
##
OPENFST_SOURCE_ARGS = \
--include src/include/fst/config.h.in \
--exclude aclocal.m4 \
--exclude ar-lib \
--exclude autom4te.cache \
--exclude compile \
--exclude config.guess \
--exclude config.h.in \
--exclude config.sub \
--exclude configure \
--exclude depcomp \
--exclude install-sh \
--exclude ltmain.sh \
--exclude m4/libtool.m4 \
--exclude m4/ltoptions.m4 \
--exclude m4/ltsugar.m4 \
--exclude m4/ltversion.m4 \
--exclude m4/lt~obsolete.m4 \
--exclude Makefile.in \
--exclude missing \
--exclude test-driver \
OPENFST_CONFIGURE_ARGS = \
--enable-silent-rules \
--enable-static \
--disable-shared \
--enable-far \
--enable-ngram-fsts \
--enable-lookahead-fsts \
--with-pic \
--disable-bin \
$(eval $(call rules-source,openfst,$(SRCDIR)/openfst))
$(eval $(call rules-autoconf,openfst,32))
$(eval $(call rules-autoconf,openfst,64))
##
## kaldi
##
KALDI_SOURCE_ARGS = \
--exclude src/**/CMakeLists.txt \
KALDI_CMAKE_ARGS = \
-DKALDI_VERSION=5.5-proton \
-DBLAS_LIBRARIES=-lblas \
-DLAPACK_LIBRARIES=-llapack \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DKALDI_BUILD_TEST=OFF \
-DKALDI_BUILD_EXE=OFF \
KALDI_DEPENDS = openfst
$(eval $(call rules-source,kaldi,$(SRCDIR)/kaldi))
$(eval $(call rules-cmake,kaldi,32))
$(eval $(call rules-cmake,kaldi,64))
##
## vosk
##
VOSK_CMAKE_ARGS = \
-DBUILD_SHARED_LIBS=ON \
VOSK_DEPENDS = openfst kaldi
$(eval $(call rules-source,vosk,$(SRCDIR)/vosk-api))
$(eval $(call rules-cmake,vosk,32))
$(eval $(call rules-cmake,vosk,64))
##
## wine
##
WINE_SOURCE_ARGS = \
--exclude configure \
--exclude autom4te.cache \
--exclude include/config.h.in \
--exclude include/config.h.ink \
--exclude include/wine/vulkan.h \
--exclude include/wine/vulkan_driver.h \
--exclude dlls/vulkan-1/vulkan-1.spec \
--exclude dlls/winevulkan/loader_thunks.c \
--exclude dlls/winevulkan/loader_thunks.h \
--exclude dlls/winevulkan/vulkan_thunks.c \
--exclude dlls/winevulkan/vulkan_thunks.h \
--exclude dlls/winevulkan/winevulkan.json \
--exclude dlls/winevulkan/winevulkan.spec
WINE_CONFIGURE_ARGS = \
--with-mingw \
--disable-tests
WINE_CONFIGURE_ARGS32 = \
VKD3D_PE_CFLAGS="-I$(VULKAN_HEADERS_DST32)/include -I$(VKD3D_DST32)/include/vkd3d" \
VKD3D_PE_LIBS="-L$(VKD3D_DST32)/bin -l:libvkd3d-1.dll -l:libvkd3d-shader-1.dll"
WINE_CONFIGURE_ARGS64 = --enable-win64 \
VKD3D_PE_CFLAGS="-I$(VULKAN_HEADERS_DST64)/include -I$(VKD3D_DST64)/include/vkd3d" \
VKD3D_PE_LIBS="-L$(VKD3D_DST64)/bin -l:libvkd3d-1.dll -l:libvkd3d-shader-1.dll"
WINE_DEPENDS = gst_orc gstreamer gst_base vkd3d openfst kaldi vosk
$(eval $(call rules-source,wine,$(SRCDIR)/wine))
$(eval $(call rules-autoconf,wine,32))
$(eval $(call rules-autoconf,wine,64))
$(OBJ)/.wine-post-source:
cd $(WINE_SRC) && tools/make_requests
cd $(WINE_SRC) && dlls/winevulkan/make_vulkan -x vk.xml
touch $@
$(OBJ)/.wine-post-build64:
mkdir -p $(DST_DIR)/{bin,share}
$(call install-strip,$(WINE_DST64)/bin/wine64,$(DST_DIR)/bin)
$(call install-strip,$(WINE_DST64)/bin/wine64-preloader,$(DST_DIR)/bin)
$(call install-strip,$(WINE_DST64)/bin/wineserver,$(DST_DIR)/bin)
cp -a $(WINE_DST64)/share/wine $(DST_DIR)/share
cp -a $(WINE_DST64)/bin/msidb $(DST_DIR)/bin
touch $@
$(OBJ)/.wine-post-build32:
mkdir -p $(DST_DIR)/bin
$(call install-strip,$(WINE_DST32)/bin/wine,$(DST_DIR)/bin)
$(call install-strip,$(WINE_DST32)/bin/wine-preloader,$(DST_DIR)/bin)
touch $@
##
## vrclient
##
VRCLIENT_DEPENDS = wine
$(eval $(call rules-source,vrclient,$(SRCDIR)/vrclient_x64))
$(eval $(call rules-makedep,vrclient,32))
$(eval $(call rules-makedep,vrclient,64))
##
## dxvk
##
DXVK_MESON_ARGS32 = --bindir=$(DXVK_DST32)/lib/wine/dxvk
DXVK_MESON_ARGS64 = --bindir=$(DXVK_DST64)/lib64/wine/dxvk
DXVK_DEPENDS = glslang
$(eval $(call rules-source,dxvk,$(SRCDIR)/dxvk))
$(eval $(call rules-meson,dxvk,32,CROSS))
$(eval $(call rules-meson,dxvk,64,CROSS))
$(OBJ)/.dxvk-post-source:
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/dxvk describe --always --abbrev=15 --dirty=0)#' \
$(SRCDIR)/dxvk/version.h.in > $(DXVK_SRC)/version.h.in
touch $@
$(OBJ)/.dxvk-post-build64:
mkdir -p "$(DST_DIR)"/lib64/wine/dxvk
rm -f "$(DST_DIR)"/lib64/wine/dxvk/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib64/wine/dxvk/version; fi
touch $@
$(OBJ)/.dxvk-post-build32:
mkdir -p "$(DST_DIR)"/lib/wine/dxvk
rm -f "$(DST_DIR)"/lib/wine/dxvk/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk ) > "$(DST_DIR)"/lib/wine/dxvk/version; fi
touch $@
##
## dxvk-nvapi
##
DXVK_NVAPI_MESON_ARGS32 = --bindir=$(DXVK_NVAPI_DST32)/lib/wine/nvapi
DXVK_NVAPI_MESON_ARGS64 = --bindir=$(DXVK_NVAPI_DST64)/lib64/wine/nvapi
$(eval $(call rules-source,dxvk-nvapi,$(SRCDIR)/dxvk-nvapi))
$(eval $(call rules-meson,dxvk-nvapi,32,CROSS))
$(eval $(call rules-meson,dxvk-nvapi,64,CROSS))
$(OBJ)/.dxvk-nvapi-post-build64:
mkdir -p "$(DST_DIR)"/lib64/wine/nvapi
rm -f "$(DST_DIR)"/lib64/wine/nvapi/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk-nvapi ) > "$(DST_DIR)"/lib64/wine/nvapi/version; fi
touch $@
$(OBJ)/.dxvk-nvapi-post-build32:
mkdir -p "$(DST_DIR)"/lib/wine/nvapi
rm -f "$(DST_DIR)"/lib/wine/nvapi/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- dxvk-nvapi ) > "$(DST_DIR)"/lib/wine/nvapi/version; fi
touch $@
##
## d8vk
##
D8VK_MESON_ARGS = \
-Denable_dxgi=false \
-Denable_d3d10=false \
-Denable_d3d11=false
D8VK_MESON_ARGS32 = --bindir=$(D8VK_DST32)/lib/wine/d8vk
D8VK_MESON_ARGS64 = --bindir=$(D8VK_DST64)/lib64/wine/d8vk
D8VK_DEPENDS = glslang
$(eval $(call rules-source,d8vk,$(SRCDIR)/d8vk))
$(eval $(call rules-meson,d8vk,32,CROSS))
$(eval $(call rules-meson,d8vk,64,CROSS))
$(OBJ)/.d8vk-post-source:
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/d8vk describe --always --abbrev=15 --dirty=0)#' \
$(SRCDIR)/d8vk/version.h.in > $(D8VK_SRC)/version.h.in
touch $@
$(OBJ)/.d8vk-post-build64:
mkdir -p "$(DST_DIR)"/lib64/wine/d8vk
rm -f "$(DST_DIR)"/lib64/wine/d8vk/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- d8vk ) > "$(DST_DIR)"/lib64/wine/d8vk/version; fi
touch $@
$(OBJ)/.d8vk-post-build32:
mkdir -p "$(DST_DIR)"/lib/wine/d8vk
rm -f "$(DST_DIR)"/lib/wine/d8vk/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- d8vk ) > "$(DST_DIR)"/lib/wine/d8vk/version; fi
touch $@
##
## vkd3d
##
VKD3D_SOURCE_ARGS = \
--exclude aclocal.m4 \
--exclude autom4te.cache \
--exclude bin/ \
--exclude configure \
--exclude include/config.h.in \
--exclude Makefile.in \
--exclude m4/libtool.m4 \
--exclude m4/ltoptions.m4 \
--exclude m4/ltsugar.m4 \
--exclude m4/ltversion.m4 \
--exclude m4/lt~obsolete.m4 \
VKD3D_CONFIGURE_ARGS = \
--enable-silent-rules \
--disable-doxygen-doc \
--disable-tests \
--disable-demos \
--without-ncurses \
VKD3D_LDFLAGS = -static-libgcc $(CROSSLDFLAGS)
VKD3D_DEPENDS = vulkan-loader vulkan-headers spirv-headers
$(eval $(call rules-source,vkd3d,$(SRCDIR)/vkd3d))
$(eval $(call rules-autoconf,vkd3d,32,CROSS))
$(eval $(call rules-autoconf,vkd3d,64,CROSS))
$(OBJ)/.vkd3d-post-build64:
mkdir -p $(DST_DIR)/lib64/vkd3d/
$(call install-strip,$(VKD3D_DST64)/bin/libvkd3d-1.dll,$(DST_LIBDIR64)/vkd3d)
$(call install-strip,$(VKD3D_DST64)/bin/libvkd3d-shader-1.dll,$(DST_LIBDIR64)/vkd3d)
touch $@
$(OBJ)/.vkd3d-post-build32:
mkdir -p $(DST_DIR)/lib/vkd3d/
$(call install-strip,$(VKD3D_DST32)/bin/libvkd3d-1.dll,$(DST_LIBDIR32)/vkd3d)
$(call install-strip,$(VKD3D_DST32)/bin/libvkd3d-shader-1.dll,$(DST_LIBDIR32)/vkd3d)
touch $@
##
## vkd3d-proton
##
VKD3D_PROTON_SOURCE_ARGS = \
--exclude vkd3d_build.h.in \
--exclude vkd3d_version.h.in \
VKD3D_PROTON_MESON_ARGS32 = --bindir=$(VKD3D_PROTON_DST32)/lib/wine/vkd3d-proton
VKD3D_PROTON_MESON_ARGS64 = --bindir=$(VKD3D_PROTON_DST64)/lib64/wine/vkd3d-proton
VKD3D_PROTON_DEPENDS = glslang
ifneq ($(UNSTRIPPED_BUILD),)
VKD3D_PROTON_MESON_ARGS = -Denable_trace=true
endif
$(eval $(call rules-source,vkd3d-proton,$(SRCDIR)/vkd3d-proton))
$(eval $(call rules-meson,vkd3d-proton,32,CROSS))
$(eval $(call rules-meson,vkd3d-proton,64,CROSS))
$(OBJ)/.vkd3d-proton-post-source:
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/vkd3d-proton describe --always --exclude=* --abbrev=15 --dirty=0)#' \
$(SRCDIR)/vkd3d-proton/vkd3d_build.h.in > $(VKD3D_PROTON_SRC)/vkd3d_build.h.in
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/vkd3d-proton describe --always --tags --dirty=+)#' \
$(SRCDIR)/vkd3d-proton/vkd3d_version.h.in > $(VKD3D_PROTON_SRC)/vkd3d_version.h.in
touch $@
$(OBJ)/.vkd3d-proton-post-build32:
mkdir -p "$(DST_DIR)"/lib/wine/vkd3d-proton
rm -f "$(DST_DIR)"/lib/wine/vkd3d-proton/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- vkd3d-proton ) > "$(DST_DIR)"/lib/wine/vkd3d-proton/version; fi
touch $@
$(OBJ)/.vkd3d-proton-post-build64:
mkdir -p "$(DST_DIR)"/lib64/wine/vkd3d-proton
rm -f "$(DST_DIR)"/lib64/wine/vkd3d-proton/version && if test -e $(SRCDIR)/.git; then ( cd $(SRCDIR) && git submodule status -- vkd3d-proton ) > "$(DST_DIR)"/lib64/wine/vkd3d-proton/version; fi
touch $@
##
## mediaconv
##
MEDIACONV_DEPENDS = gst_orc gstreamer gst_base
$(eval $(call rules-source,mediaconv,$(SRCDIR)/media-converter))
$(eval $(call rules-cargo,mediaconv,32))
$(eval $(call rules-cargo,mediaconv,64))
$(OBJ)/.mediaconv-post-build64:
mkdir -p $(MEDIACONV_DST64)/lib64/gstreamer-1.0/
cp -a $(MEDIACONV_OBJ64)/x86_64-unknown-linux-gnu/release/libprotonmediaconverter.so $(MEDIACONV_DST64)/lib64/gstreamer-1.0/
touch $@
$(OBJ)/.mediaconv-post-build32:
mkdir -p $(MEDIACONV_DST32)/lib/gstreamer-1.0/
cp -a $(MEDIACONV_OBJ32)/i686-unknown-linux-gnu/release/libprotonmediaconverter.so $(MEDIACONV_DST32)/lib/gstreamer-1.0/
touch $@
##
## BattlEye Bridge
##
ifneq ($(wildcard $(SRCDIR)/battleye-bridge/.*),)
BATTLEYE_LDFLAGS = -static-libgcc -static-libstdc++ -ldl
BATTLEYE_DEPENDS = wine
$(eval $(call rules-source,battleye,$(SRCDIR)/battleye-bridge))
$(eval $(call rules-winemaker,battleye,32,beclient.dll))
$(eval $(call rules-winemaker,battleye,64,beclient_x64.dll))
$(OBJ)/.battleye-post-source:
mkdir -p $(BATTLEYE_OBJ32) && cp -a $(BATTLEYE_SRC)/beclient.spec $(BATTLEYE_OBJ32)/beclient.spec
mkdir -p $(BATTLEYE_OBJ64) && cp -a $(BATTLEYE_SRC)/beclient.spec $(BATTLEYE_OBJ64)/beclient_x64.spec
touch $@
$(OBJ)/.battleye-post-build64:
mkdir -p $(OBJ)/dist-battleye/v1
cp -r $(BATTLEYE_DST64)/* $(OBJ)/dist-battleye/v1/
rm -rf $(BATTLEYE_DST64)/*
touch $@
$(OBJ)/.battleye-post-build32:
mkdir -p $(OBJ)/dist-battleye/v1
cp -r $(BATTLEYE_DST32)/* $(OBJ)/dist-battleye/v1/
rm -rf $(BATTLEYE_DST32)/*
touch $@
endif
##
## EasyAntiCheat Bridge
##
ifneq ($(wildcard $(SRCDIR)/eac-bridge/.*),)
EAC_DEPENDS = wine
$(eval $(call rules-source,eac,$(SRCDIR)/eac-bridge))
$(eval $(call create-rules-common,eac,EAC,64))
$(eval $(call create-rules-common,eac,EAC,32))
$(OBJ)/.eac-build64:
@echo ":: building 64bit eac..." >&2
rsync -arx "$(EAC_SRC)/" "$(EAC_OBJ64)/"
env $(EAC_ENV64) \
$(MAKE) -C "$(EAC_OBJ64)" WINE_OBJ="$(WINE_OBJ64)" HOST="x86_64-w64-mingw32" CROSSCXX="x86_64-w64-mingw32-g++" BIT="64"
mkdir -p $(OBJ)/dist-eac/v2/lib64
$(call install-strip,$(EAC_OBJ64)/easyanticheat.so,$(OBJ)/dist-eac/v2/lib64)
$(call install-strip,$(EAC_OBJ64)/easyanticheat.dll,$(OBJ)/dist-eac/v2/lib64)
cp $(OBJ)/dist-eac/v2/lib64/easyanticheat.so $(OBJ)/dist-eac/v2/lib64/easyanticheat_x64.so
cp $(OBJ)/dist-eac/v2/lib64/easyanticheat.dll $(OBJ)/dist-eac/v2/lib64/easyanticheat_x64.dll
touch $@
$(OBJ)/.eac-build32:
@echo ":: building 32bit eac..." >&2
rsync -arx "$(EAC_SRC)/" "$(EAC_OBJ32)/"
env $(EAC_ENV32) \
$(MAKE) -C "$(EAC_OBJ32)" WINE_OBJ="$(WINE_OBJ32)" HOST="i686-w64-mingw32" CROSSCXX="i686-w64-mingw32-g++" BIT="32"
mkdir -p $(OBJ)/dist-eac/v2/lib32
$(call install-strip,$(EAC_OBJ32)/easyanticheat.so,$(OBJ)/dist-eac/v2/lib32)
$(call install-strip,$(EAC_OBJ32)/easyanticheat.dll,$(OBJ)/dist-eac/v2/lib32)
mv $(OBJ)/dist-eac/v2/lib32/easyanticheat.so $(OBJ)/dist-eac/v2/lib32/easyanticheat_x86.so
mv $(OBJ)/dist-eac/v2/lib32/easyanticheat.dll $(OBJ)/dist-eac/v2/lib32/easyanticheat_x86.dll
touch $@
endif
# HACK: we need to order those builds so that timestamps are different between
# 32 and 64 bit versions of the dlls. Otherwise there's a significant chance for
# conflict when creating symbol storage. We also have to make sure that projects
# which build alternative versions of the DLLs do not share the same timestamps.
#
# This is a temporary solution that only lowers the chance of conflicts.
# Binutils 2.42 (not released yet at the time of writing this) will introduce
# support for SOURCE_DATE_EPOCH which we should use instead.
$(OBJ)/.wine-build64: $(OBJ)/.wine-build32
$(OBJ)/.vkd3d-proton-build32: $(OBJ)/.wine-build64
$(OBJ)/.vkd3d-proton-build64: $(OBJ)/.vkd3d-proton-build32
$(OBJ)/.dxvk-build32: $(OBJ)/.wine-build64
$(OBJ)/.dxvk-build64: $(OBJ)/.dxvk-build32
$(OBJ)/.dxvk-lsteamclient64: $(OBJ)/.dxvk-lsteamclient32
$(OBJ)/.vkd3d-build64: $(OBJ)/.vkd3d-build32
# nvapi and vrclient dlls have distinct names for 64 bit versions
##
## Windows Symbol Store creation
##
SYMSTORE_DEPENDS = wine
$(eval $(call rules-source,symstore,$(SRCDIR)/symstore))
$(eval $(call create-rules-common,symstore,SYMSTORE,64))
$(OBJ)/.symstore-build64:
@echo ":: building symstore helper..." >&2
rsync -arx "$(SYMSTORE_SRC)/" "$(SYMSTORE_OBJ64)/"
$(MAKE) -C "$(SYMSTORE_OBJ64)" SYMSTORE_CFLAGS="-I$(WINE_SRC)/include -I$(WINE_OBJ64)/include"