-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile.in
701 lines (633 loc) · 25.7 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
A2X = @A2X@
AR = ar
RANLIB = ranlib
BIN_DEPS = @BIN_DEPS@
CP = cp
VERBOSE ?= 0
COND_SILENCE_0 = @
COND_SILENCE_1 =
COND_SILENCE = $(COND_SILENCE_$(VERBOSE))
REAL_CC = @CC@
CC_0 = @echo "Compiling $<..."; $(REAL_CC)
CC_1 = $(REAL_CC)
CC = $(CC_$(VERBOSE))
REAL_CXX = @CXX@
CXX_0 = @echo "Compiling $<..."; $(REAL_CXX)
CXX_1 = $(REAL_CXX)
CXX = $(CXX_$(VERBOSE))
QMAKE = @QMAKE@
QMAKE_FLAGS ?=
REAL_LINKER = @LINKER@
LINKER_0 = @echo "Linking $@..."; $(REAL_LINKER)
LINKER_1 = $(REAL_LINKER)
LINKER = $(LINKER_$(VERBOSE))
COMMON_FLAGS = @COMMON_FLAGS@ -g @DEFS@ -DPATH_PREFIX='"@prefix@"' -DLIB_DIR='"@libdir@"' -Wall -Wextra -Wpointer-arith -DGF_BITS=16
CFLAGS_ORIG := $(CFLAGS)
CFLAGS = @CFLAGS@ $(COMMON_FLAGS) -Werror=implicit-function-declaration -D_GNU_SOURCE
CPPFLAGS = @CPPFLAGS@ -D_GNU_SOURCE
CXXFLAGS_ORIG := $(CXXFLAGS)
CXXFLAGS = @CXXFLAGS@ $(COMMON_FLAGS) -D_GNU_SOURCE
MKDIR_P = $(COND_SILENCE)mkdir -p
CUDA_FLAGS = @CUDA_FLAGS@ @CUDA_COMPUTE_ARGS@ @DEFS@ -g
LDFLAGS = @LDFLAGS@
LIBS += @LIBS@ @CUDA_LIB@ @MATHLIBS@ -lm -pthread
INC = -Isrc -I$(srcdir)/src -I$(srcdir)/test \
@INC@
CUDA_INC = @CUDA_INC@ -Isrc -I$(srcdir)/src
OFAST = @OFAST@
DECKLINK_PATH = @DECKLINK_PATH@
DYLIBBUNDLER = @DYLIBBUNDLER@
DYLIBBUNDLER_FLAGS += @DYLIBBUNDLER_FLAGS@
EXEEXT = @EXEEXT@
TARGET ?= bin/uv$(EXEEXT)
BUNDLE = uv.app
GUI_BUNDLE_DEP = gui/QT/uv-qt.app
GUI_BUNDLE = uv-qt.app
REAL_CUDA_COMPILER = "@CUDA_COMPILER@"
CUDA_COMPILER_0 = @echo "Compiling $<..."; $(REAL_CUDA_COMPILER)
CUDA_COMPILER_1 = $(REAL_CUDA_COMPILER)
CUDA_COMPILER = $(CUDA_COMPILER_$(VERBOSE))
MACOS_LEGACY = @MACOS_LEGACY@
SYSTEM = @system@
GUI_EXE ?= @GUI_EXE@
GUI_TARGET = @GUI_TARGET@
QT_PATH = $(shell [ -n "$(QMAKE)" ] && python3 -c "import os; print(\
os.path.realpath(os.path.dirname(os.path.realpath(\"$$(command -v \
$(QMAKE))\")) + \"/..\"))")# realpath cmd is present in macOS 13
ifeq (@REFLECTOR_REQ@,yes)
REFLECTOR_TARGET ?= bin/hd-rum-transcode$(EXEEXT)
endif
TEST_TARGET = bin/run_tests$(EXEEXT)
PACKAGE_TARNAME ?= @PACKAGE_TARNAME@
PREFIX = @prefix@
prefix = $(PREFIX)
exec_prefix = @exec_prefix@
INSTALL = @INSTALL@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
mandir = @mandir@
man1dir = @mandir@/man1
srcdir = @srcdir@
VPATH = @srcdir@
DOCS = $(srcdir)/CONTRIBUTING.md $(srcdir)/README.md $(wildcard $(srcdir)/doc/*)
# autogenerated headers
GENERATED_HEADERS = @GENERATED_HEADERS@
COMMON_OBJS = \
src/control_socket.o \
src/debug.o \
src/host.o \
src/keyboard_control.o \
src/messaging.o \
src/playback.o \
src/ntp.o \
src/pdb.o \
src/tv.o \
src/transmit.o \
src/tfrc.o \
src/rtp/fec.o \
src/rtp/ldgm.o \
src/rtp/pbuf.o \
src/rtp/audio_decoders.o \
src/rtp/net_udp.o \
src/rtp/rs.o \
src/rtp/rtp.o \
src/rtp/rtpenc_h264.o \
src/rtp/rtp_callback.o \
src/rtp/video_decoders.o \
src/audio/audio.o \
src/audio/audio_capture.o \
src/audio/audio_playback.o \
src/audio/capture/none.o \
src/audio/capture/sdi.o \
src/audio/capture/testcard.o \
src/audio/codec.o \
src/audio/codec/dummy_pcm.o \
src/audio/export.o \
src/audio/playback/dummy.o \
src/audio/playback/none.o \
src/audio/playback/sdi.o \
src/audio/resampler.o \
src/audio/types.o \
src/audio/utils.o \
src/audio/wav_reader.o \
src/audio/wav_writer.o \
src/audio/audio_filter.o \
src/audio/filter_chain.o \
src/capture_filter.o \
src/color.o \
src/compat/alarm.o \
src/compat/dlfunc.o \
src/compat/platform_pipe.o \
src/compat/platform_semaphore.o \
src/compat/usleep.o \
src/crypto/crc_32.o \
src/crypto/crypt_aes.o \
src/crypto/crypt_aes_impl.o \
src/crypto/crypt_des.o \
src/crypto/md5.o \
src/crypto/random.o \
src/export.o \
src/ihdtv/ihdtv.o \
src/lib_common.o \
src/module.o \
src/pixfmt_conv.o \
src/ug_runtime_error.o \
tools/ipc_frame_ug.o \
tools/ipc_frame_unix.o \
tools/ipc_frame.o \
src/utils/audio_buffer.o \
src/utils/color_out.o \
src/utils/config_file.o \
src/utils/fs.o \
src/utils/jpeg_reader.o \
src/utils/list.o \
src/utils/math.o \
src/utils/misc.o \
src/utils/nat.o \
src/utils/net.o \
src/utils/packet_counter.o \
src/utils/pam.o \
src/utils/parallel_conv.o \
src/utils/profile_timer.o \
src/utils/random.o \
src/utils/resource_manager.o \
src/utils/ring_buffer.o \
src/utils/sdp.o \
src/utils/string.o \
src/utils/string_view_utils.o \
src/utils/synchronized_queue.o \
src/utils/text.o \
src/utils/thread.o \
src/utils/time.o \
src/utils/vf_split.o \
src/utils/video_frame_pool.o \
src/utils/video_pattern_generator.o \
src/utils/wait_obj.o \
src/utils/windows.o \
src/utils/worker.o \
src/utils/y4m.o \
src/video.o \
src/video_frame.o \
src/video_codec.o \
src/video_capture.o \
src/video_capture_params.o \
src/video_capture/null.o \
src/video_capture/testcard.o \
src/video_capture/testcard_common.o \
src/video_compress.o \
src/video_compress/none.o \
src/video_decompress.o \
src/video_display.o \
src/video_display/dummy.o \
src/video_display/null.o \
src/video_export.o \
src/video_rxtx.o \
src/video_rxtx/rtp.o \
src/video_rxtx/ultragrid_rtp.o \
src/vo_postprocess.o \
ldgm/src/ldgm-session-cpu.o \
ldgm/src/ldgm-session.o \
ldgm/src/tanner.o \
ldgm/matrix-gen/matrix-generator.o \
ldgm/matrix-gen/ldpc-matrix.o \
ULTRAGRID_LIBS = @ULTRAGRID_LIBS@
ULTRAGRID_OBJS = $(COMMON_OBJS) @ULTRAGRID_OBJS@ src/main.o \
REFLECTOR_OBJS = @REFLECTOR_OBJS@ $(COMMON_OBJS) \
src/hd-rum-translator/hd-rum-decompress.o \
src/hd-rum-translator/hd-rum-recompress.o \
src/hd-rum-translator/hd-rum-translator.o \
TEST_OBJS = $(COMMON_OBJS) \
@TEST_OBJS@ \
test/codec_conversions_test.o \
test/ff_codec_conversions_test.o \
test/get_framerate_test.o \
test/gpujpeg_test.o \
test/libavcodec_test.o \
test/misc_test.o \
test/test_aes.o \
test/test_des.o \
test/test_md5.o \
test/test_random.o \
test/test_video_display.o \
test/test_video_capture.o \
test/test_tv.o \
test/test_net_udp.o \
test/test_rtp.o \
test/run_tests.o
DEP_FILES_1 = $(REFLECTOR_OBJS) $(TEST_OBJS) $(ULTRAGRID_OBJS)
DEP_FILES = $(patsubst %.lib,%.P,$(DEP_FILES_1:.o=.P)) # replace .o and also .lib (Windows) with .P
# -------------------------------------------------------------------------------------------------
.PHONY: doc
all: $(TARGET) $(GUI_TARGET) $(REFLECTOR_TARGET) @MANPAGES@ @MODULES@ configure-messages
src/dir-stamp:
$(MKDIR_P) $(dir $@)
touch $@
$(TARGET): src/dir-stamp $(ULTRAGRID_OBJS) $(GENERATED_HEADERS) $(BIN_DEPS)
$(MKDIR_P) $(dir $@)
$(LINKER) $(LDFLAGS) $(ULTRAGRID_OBJS) $(LIBS) $(ULTRAGRID_LIBS) -o $(TARGET)
ifeq ($(SYSTEM),Windows)
if [ -n '@DLL_LIBS@' ]; then $(INSTALL) -m 644 @DLL_LIBS@ bin; fi
endif
$(REFLECTOR_TARGET): src/dir-stamp $(REFLECTOR_OBJS) $(GENERATED_HEADERS) bin/hd-rum-av
$(MKDIR_P) $(dir $@)
$(LINKER) $(LDFLAGS) $(REFLECTOR_OBJS) $(LIBS) -o $@
bin/hd-rum-av: $(srcdir)/data/template/bin/hd-rum-av
$(MKDIR_P) $(dir $@)
$(CP) $< $@
-include $(DEP_FILES)
POSTPROCESS_DEPS = \
@cp $*.d $*.P; \
sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
%.o : %.c
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
%.o : %.cpp
$(MKDIR_P) $(dir $@)
$(CXX) $(CXXFLAGS) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
%.o: %.m
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
%.o: %.mm
$(MKDIR_P) $(dir $@)
$(CXX) -x objective-c++ -std=c++11 $(CXXFLAGS) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
# Set suffix for CUDA files
.SUFFIXES: .cu
# Pattern rule for compiling CUDA files
%.o: %.cu
$(MKDIR_P) $(dir $@)
$(CUDA_COMPILER) $(CUDA_FLAGS) $(CUDA_INC) -c $< -o $@
@$(REAL_CUDA_COMPILER) $(CUDA_FLAGS) $(CUDA_INC) -M $< > $*.d
$(POSTPROCESS_DEPS)
src/libavcodec/from_lavc_vid_conv.o: src/libavcodec/from_lavc_vid_conv.c
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(OFAST) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
src/libavcodec/to_lavc_vid_conv.o: src/libavcodec/to_lavc_vid_conv.c
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(OFAST) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
src/pixfmt_conv.o: src/pixfmt_conv.c
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(OFAST) $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
# Important for this target is inclusion of cuda_wrapper that has patched cuda_runtime.h header (wrapper)
ldgm/src/ldgm-session-gpu.o: ldgm/src/ldgm-session-gpu.cpp
$(MKDIR_P) $(dir $@)
$(CXX) $(CXXFLAGS) -Isrc/cuda_wrapper -DEXPORT_DLL_SYMBOLS $(INC) -MD -c $< -o $@
$(POSTPROCESS_DEPS)
src/zfec.o: @ZFEC_PREFIX@/fec.c
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) -w $(INC) -c $< -o $@
src/video_capture/DeckLinkAPIDispatch.o: $(DECKLINK_PATH)/DeckLinkAPIDispatch.cpp
$(MKDIR_P) $(dir $@)
$(CXX) $(CXXFLAGS) -c $(INC) -o src/video_capture/DeckLinkAPIDispatch.o $(DECKLINK_PATH)/DeckLinkAPIDispatch.cpp
src/video_capture/DeckLinkAPI_i.o: $(DECKLINK_PATH)/DeckLinkAPI_i.c
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) -c $(INC) -o src/video_capture/DeckLinkAPI_i.o $(DECKLINK_PATH)/DeckLinkAPI_i.c
dxt_compress/dxt_encoder.o: dxt_compress/dxt_encoder.c dxt_compress/dxt_glsl.h
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(INC) $< -c -o $@
dxt_compress/dxt_decoder.o: dxt_compress/dxt_decoder.c dxt_compress/dxt_glsl.h
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(INC) $< -c -o $@
dxt_compress/dxt_glsl.h:dxt_compress/compress_vp.glsl \
dxt_compress/compress_dxt1_fp.glsl dxt_compress/compress_dxt5ycocg_fp.glsl \
dxt_compress/display_fp.glsl dxt_compress/display_dxt5ycocg_fp.glsl \
dxt_compress/yuv422_to_yuv444.glsl dxt_compress/display_dxt1_yuv_fp.glsl \
dxt_compress/rgba_to_yuv422.glsl
@echo "Generating $@..."
$(MKDIR_P) $(dir $@)
@echo "/**" > $@
@echo " * GLSL source codes for DXT compressions" >> $@
@echo " *" >> $@
@echo " * @author Martin Srom" >> $@
@echo " */" >> $@
# Write vp_compress
@echo "static const char vp_compress[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_vp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write vp_compress_legacy
@echo "static const char vp_compress_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_vp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt1
@echo "static const char fp_compress_dxt1[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt1_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt1 yuv
@echo "static const char fp_compress_dxt1_yuv[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt1_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt1_legacy
@echo "static const char fp_compress_dxt1_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt1_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt1_legacy
@echo "static const char fp_compress_dxt1_yuv_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt1_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt5ycocg
@echo "static const char fp_compress_dxt5ycocg[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt5ycocg_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt5ycocg yuv
@echo "static const char fp_compress_dxt5ycocg_yuv[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt5ycocg_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt5ycocg_legacy
@echo "static const char fp_compress_dxt5ycocg_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt5ycocg_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_compress_dxt5ycocg_legacy yuv
@echo "static const char fp_compress_dxt5ycocg_yuv_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@printf "\"#define FORMAT_YUV 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/compress_dxt5ycocg_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_display_dxt1
@echo "static const char fp_display[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/display_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_display_dxt1 legacy
@echo "static const char fp_display_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/display_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_display_dxt5ycocg
@echo "static const char fp_display_dxt5ycocg[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/display_dxt5ycocg_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# Write fp_display_dxt5ycocg (legacy)
@echo "static const char fp_display_dxt5ycocg_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/display_dxt5ycocg_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# yuv 422 to yuv 444 shader
@echo "static const char fp_yuv422_to_yuv_444[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/yuv422_to_yuv444.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# yuv 422 to yuv 444 shader (legacy)
@echo "static const char fp_yuv422_to_yuv_444_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/yuv422_to_yuv444.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# display YUV dxt1
@echo "static const char fp_display_dxt1_yuv[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/display_dxt1_yuv_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# display YUV dxt1 (legacy)
@echo "static const char fp_display_dxt1_yuv_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/display_dxt1_yuv_fp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# rgba to yuv 422 shader
@echo "static const char fp_display_rgba_to_yuv422[] = " >> $@
@printf "\"#version 140\\\n\"\n" >> $@
@printf "\"#define legacy 0\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/rgba_to_yuv422.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
# rgba to yuv 422 shader legacy
@echo "static const char fp_display_rgba_to_yuv422_legacy[] = " >> $@
@printf "\"#define legacy 1\\\n\"\n" >> $@
@cat $(srcdir)/dxt_compress/rgba_to_yuv422.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@echo ";" >> $@
@# rgba to yuv 422 vertex
@#echo "static const char vp_display_rgba_to_yuv422[] = " >> $@
@#cat $(srcdir)/dxt_compress/rgba_to_yuv422_vp.glsl | sed 's/\(.*\)/ \"\1\\n\"/' >> $@
@#echo ";" >> $@
gui/QT/Makefile: gui/QT/uv-qt.pro
@if test -z "$(QMAKE)"; then echo "Reconfigure with '--enable-qt'"; exit 1; fi
CFLAGS="$(CFLAGS_ORIG)" CXXFLAGS="$(CXXFLAGS_ORIG)" $(QMAKE) -makefile $< "DESTDIR+=./" -o $@ $(QMAKE_FLAGS)
.PHONY: $(GUI_TARGET)
$(GUI_TARGET): gui/QT/Makefile
$(COND_SILENCE)cd gui/QT && $(MAKE) --no-print-directory
# -------------------------------------------------------------------------------------------------
$(TEST_TARGET): $(TEST_OBJS) @TEST_OBJS@
$(MKDIR_P) $(dir $@)
$(LINKER) $(LDFLAGS) $(TEST_OBJS) @TEST_LIBS@ -o $@
ifeq ($(SYSTEM),Windows)
if [ -n '@DLL_LIBS@' ]; then $(INSTALL) -m 644 @DLL_LIBS@ bin; fi
endif
suggest-tests:
@echo ""
@echo "*** Now type \"make tests\" to run the test suite"
@echo ""
configure-messages:
@printf "@POST_COMPILE_MSG@"
tests: $(TEST_TARGET)
@export DYLD_LIBRARY_PATH=$(MY_DYLD_LIBRARY_PATH); $(TEST_TARGET)
check: tests
distcheck:
$(TARGET)
$(TARGET) --capabilities
$(TARGET) --list-modules
$(REFLECTOR_TARGET) -h
[ -z "$(GUI_EXE)" ] || $(GUI_EXE) -h
# -------------------------------------------------------------------------------------------------
ag-plugins: data/ag_plugin/uvReceiverService.zip data/ag_plugin/uvSenderService.zip
AG_PLUGIN_TX_SCRIPTS = $(srcdir)/data/ag_plugin/uvSenderService.py \
$(srcdir)/data/ag_plugin/uvSenderService.svc \
$(srcdir)/data/ag_plugin/uvSenderService.manifest
data/ag_plugin/uvSenderService.zip: $(AG_PLUGIN_TX_SCRIPTS) $(TARGET)
@echo "Creating AccessGrid plugin: uvSenderService.zip"
@rm -f data/ag_plugin/uvSenderService.zip
@zip -j data/ag_plugin/uvSenderService.zip $(AG_PLUGIN_TX_SCRIPTS) $(TARGET)
AG_PLUGIN_RX_SCRIPTS = $(srcdir)/data/ag_plugin/uvReceiverService.py \
$(srcdir)/data/ag_plugin/uvReceiverService.svc \
$(srcdir)/data/ag_plugin/uvReceiverService.manifest
data/ag_plugin/uvReceiverService.zip: $(AG_PLUGIN_RX_SCRIPTS) $(TARGET)
$(MKDIR_P) $(dir $@)
@echo "Creating AccessGrid plugin: uvReceiverService.zip"
@rm -f data/ag_plugin/uvReceiverService.zip
@zip -j data/ag_plugin/uvReceiverService.zip $(AG_PLUGIN_RX_SCRIPTS) $(TARGET)
# -------------------------------------------------------------------------------------------------
clean:
@echo "Making clean..."
$(COND_SILENCE)-rm -f $(OBJS) $(GENERATED_HEADERS) $(ULTRAGRID_OBJS) $(TARGET) src/version.h
$(COND_SILENCE)-rm -f $(TEST_OBJS) bin/run_tests
$(COND_SILENCE)-rm -f data/ag_plugin/uvReceiverService.zip data/ag_plugin/uvSenderService.zip
$(COND_SILENCE)-rm -rf $(BUNDLE) $(GUI_BUNDLE) $(GUI_BUNDLE_DEP)
$(COND_SILENCE)-rm -rf $(REFLECTOR_TARGET) bin/hd-rum-av $(REFLECTOR_OBJS)
$(COND_SILENCE)-rm -rf @TOREMOVE@ @MODULES@ @LIB_GENERATED_HEADERS@
$(COND_SILENCE)-rm -rf $(DEP_FILES)
$(COND_SILENCE)-rm -rf bin/shaders
$(COND_SILENCE)if [ -f "gui/QT/Makefile" ]; then make -C gui/QT/ distclean; fi
distclean: clean
-rm -f Makefile config.status config.cache config.log src/config.h cscope.out tags
ctags:
ctags $$(find $(srcdir)/src $(srcdir)/test \( -name '*.c' -o -name '*.cpp' -o -name '*.cu' -o -name '*.h' -o -name '*.hpp' -o -name '*.m' -o -name '*.mm' \))
etags:
etags $$(find $(srcdir)/src $(srcdir)/test \( -name '*.c' -o -name '*.cpp' -o -name '*.cu' -o -name '*.h' -o -name '*.hpp' -o -name '*.m' -o -name '*.mm' \))
universal-ctags:
ctags-universal $$(find $(srcdir)/src $(srcdir)/test \( -name '*.c' -o -name '*.cpp' -o -name '*.cu' -o -name '*.h' -o -name '*.hpp' -o -name '*.m' -o -name '*.mm' \))
cscope:
cscope -bv $$(find $(srcdir)/src $(srcdir)/test \( -name '*.c' -o -name '*.cpp' -o -name '*.cu' -o -name '*.h' -o -name '*.hpp' -o -name '*.m' -o -name '*.mm' \))
doc:
cd $(srcdir) && doxygen Doxyfile
uv.1: $(TARGET)
$(MKDIR_P) $(dir $@)
@A2X=$(A2X) UV_PATH=bin $(srcdir)/data/make_man.sh uv
hd-rum-transcode.1: $(REFLECTOR_TARGET)
$(MKDIR_P) $(dir $@)
@A2X=$(A2X) UV_PATH=bin $(srcdir)/data/make_man.sh hd-rum-transcode
man: uv.1 hd-rum-transcode.1
release:
cvs tag release-`cat VERSION | sed "s/\./-/g"`
hd-rum-multi/hd-rum:
make -C hd-rum-multi
# Makes dummy bundle (almost empty). May not be portable due to missing libs.
$(BUNDLE): $(TARGET) $(REFLECTOR_TARGET) @MANPAGES@ hd-rum-multi/hd-rum
rm -rf $(BUNDLE)
$(MKDIR_P) $(BUNDLE)/Contents/MacOS $(BUNDLE)/Contents/libs
$(CP) $(REFLECTOR_TARGET) $(TARGET) $(BUNDLE)/Contents/MacOS/
$(CP) -r data/template/macOS-bundle/* $(BUNDLE)/
$(CP) hd-rum-multi/hd-rum $(BUNDLE)/Contents/MacOS/
$(CP) $(srcdir)/data/template/bin/* $(BUNDLE)/Contents/MacOS
$(CP) -r $(srcdir)/share/ $(BUNDLE)/Contents/share/
for n in $(BUNDLE)/Contents/MacOS/*; \
do echo quit \
| $(DYLIBBUNDLER) $(DYLIBBUNDLER_FLAGS) -of -cd -b \
-d $(BUNDLE)/Contents/libs/ -p @executable_path/../libs/ -x $$n; \
done
if [ -d Frameworks ]; then $(CP) -R Frameworks $(BUNDLE)/Contents/; fi
if [ -n '@MANPAGES@' ]; then mkdir -p $(BUNDLE)/Contents/man/man1; \
$(CP) @MANPAGES@ $(BUNDLE)/Contents/man/man1/; fi
#echo -n "UltraGrid" > $(BUNDLE)/Contents/PkgInfo
# ships UltraGrid itself to GUI bundle which is copied from
# gui/QT/uv-qt.app to uv-qt.app (referred as $(GUI_BUNDLE))
$(GUI_BUNDLE): $(BUNDLE) $(GUI_BUNDLE_DEP)
rm -rf $(GUI_BUNDLE)
$(MKDIR_P) $(GUI_BUNDLE)/Contents/libs
ln -s libs $(GUI_BUNDLE)/Contents/Frameworks
$(CP) -R $(GUI_BUNDLE_DEP)/* $(GUI_BUNDLE)/
# add Qt frameworks
command -v macdeployqt && macdeployqt $(GUI_BUNDLE) -verbose=2
$(CP) -nR $(BUNDLE)/* $(GUI_BUNDLE)/ || true
if [ $(MACOS_LEGACY) = no ]; then \
for n in $(GUI_BUNDLE)/Contents/MacOS/*; do \
if expr $$n : '.*-real$$' >/dev/null || expr $$n : '.*\.sh$$' >/dev/null; \
then continue; fi; \
mv -f $$n $$n-real; $(CP) -f $(srcdir)/data/scripts/macos-wrapper $$n; \
done; \
fi
# TODO TOREMOVE: currently Qt6 (Homebrew) macdeployqt doesn't deploy QtDbus,
# possibly because @rpath is used in QtDBus ref in QtGui
if [ -d $(QT_PATH)/lib/QtDBus.framework ] && \
[ ! -d $(GUI_BUNDLE)/Contents/Frameworks/QtDBus.framework ] && \
`otool -L $(GUI_BUNDLE)/Contents/Frameworks/QtGui.framework/Versions/A/QtGui \
| grep -q '@rpath/QtDBus'`; \
then \
$(CP) -R $(QT_PATH)/lib/QtDBus.framework $(GUI_BUNDLE)/Contents/Frameworks/; \
chmod -R +w $(GUI_BUNDLE)/Contents/Frameworks/QtDBus.framework; \
install_name_tool -change \
'@loader_path/../../../../../../../opt/dbus/lib/libdbus-1.3.dylib' \
/usr/local/opt/dbus/lib/libdbus-1.3.dylib \
$(GUI_BUNDLE)/Contents/Frameworks/QtDBus.framework/QtDBus; \
while :; do echo quit; done \
| dylibbundler -of -cd -b -d $(GUI_BUNDLE)/Contents/libs \
-x $(GUI_BUNDLE)/Contents/Frameworks/QtDBus.framework/QtDBus;\
fi
defaults write `pwd`/$(GUI_BUNDLE)/Contents/Info.plist NSCameraUsageDescription \
'Allow camera for video capture'
defaults write `pwd`/$(GUI_BUNDLE)/Contents/Info.plist NSMicrophoneUsageDescription \
'Allow microphone for audio capture'
defaults write `pwd`/$(GUI_BUNDLE)/Contents/Info.plist CFBundleIconFile icon.icns
plutil -convert xml1 $(GUI_BUNDLE)/Contents/Info.plist
# aliases
bundle: $(BUNDLE)
gui-bundle: $(GUI_BUNDLE)
## @todo Add correct dependencies (using $(GUI_BUNDLE)/Contents/libs causes
## uv-qt rebuild which breaks fixed links by macdeployqt)
osx-gui-dmg:
[ ! -f UltraGrid.dmg ] || rm UltraGrid.dmg
if [ $(MACOS_LEGACY) = yes ]; then \
LEGACY_README="-srcdir $(srcdir)/data/template/macOS-legacy/README.html"; \
fi; \
hdiutil create -fs HFS+ -volname ULTRAGRID -srcdir $(GUI_BUNDLE) \
$$LEGACY_README -format UDZO -imagekey zlib-level=9 -o UltraGrid.dmg
@TARGETS@
install: all
$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
$(INSTALL) -m 755 bin/uv $(REFLECTOR_TARGET) $(DESTDIR)$(bindir)
$(INSTALL) -m 755 $(srcdir)/data/template/bin/* $(DESTDIR)$(bindir)
if [ -f "$(GUI_TARGET)" ]; then \
$(INSTALL) -m 755 $(GUI_TARGET) $(DESTDIR)$(bindir);\
$(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/applications;\
$(INSTALL) -m 644 $(srcdir)/data/uv-qt.desktop $(DESTDIR)$(datadir)/applications;\
$(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/metainfo;\
$(INSTALL) -m 644 $(srcdir)/data/cz.cesnet.ultragrid.appdata.xml $(DESTDIR)$(datadir)/metainfo;\
$(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/pixmaps;\
$(INSTALL) -m 644 $(srcdir)/data/ultragrid.png $(DESTDIR)$(datadir)/pixmaps;\
fi
if [ -n "@MODULES@" ]; then\
$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)/ultragrid;\
$(INSTALL) -m 755 @MODULES@ $(DESTDIR)$(libdir)/ultragrid;\
fi
$(INSTALL) -d -m 755 $(DESTDIR)$(docdir)
$(CP) $(DOCS) $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/CONTRIBUTING.md $(srcdir)/COPYRIGHT $(srcdir)/INSTALL $(srcdir)/NEWS $(srcdir)/README.md $(DESTDIR)$(docdir)
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
if [ -n '@MANPAGES@' ]; then $(INSTALL) -m 644 @MANPAGES@ $(DESTDIR)$(man1dir); fi
if [ -n '@DLL_LIBS@' ]; then $(INSTALL) -m 644 @DLL_LIBS@ $(DESTDIR)$(bindir); fi
if [ -n "@VULKAN@" ]; then\
$(INSTALL) -D -m 644 "$(srcdir)/share/ultragrid/vulkan_shaders/"* -t "$(DESTDIR)$(datadir)/ultragrid/vulkan_shaders"; \
fi
uninstall:
$(RM) $(DESTDIR)$(bindir)/uv
$(RM) $(DESTDIR)$(bindir)/hd-rum-transcode
for n in $(srcdir)/data/template/bin/*; do $(RM) $(DESTDIR)$(bindir)/`basename $$n`; done;
if [ -n "@MODULES@" ]; then for n in @MODULES@; do $(RM) $(DESTDIR)$(libdir)/ultragrid/`basename $$n`; done; fi
for n in $(DOCS); do $(RM) $(DESTDIR)$(docdir)/`basename $$n`; done;
$(RM) $(DESTDIR)$(docdir)/CONTRIBUTING.md $(DESTDIR)$(docdir)/COPYRIGHT $(DESTDIR)$(docdir)/INSTALL $(DESTDIR)$(docdir)/NEWS $(DESTDIR)$(docdir)/README.md
rmdir $(DESTDIR)$(docdir)
$(RM) $(DESTDIR)$(man1dir)/uv.1 $(DESTDIR)$(man1dir)/hd-rum-transcode.1
if [ -f "$(GUI_TARGET)" ]; then \
$(RM) $(DESTDIR)$(bindir)/`basename $(GUI_TARGET)`;\
$(RM) $(DESTDIR)$(datadir)/applications/uv-qt.desktop;\
$(RM) $(DESTDIR)$(datadir)/metainfo/cz.cesnet.ultragrid.appdata.xml;\
$(RM) $(DESTDIR)$(datadir)/pixmaps/ultragrid.png;\
fi
if [ -n "@VULKAN@" ]; then\
$(RM) "$(DESTDIR)$(datadir)/ultragrid/vulkan_shaders/"*;\
rmdir $(DESTDIR)$(datadir)/ultragrid/vulkan_shaders;\
rmdir $(DESTDIR)$(datadir)/ultragrid;\
fi
# vim: set noexpandtab