mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 21:40:15 +00:00
Build even UG obj files in tools/ subdirectory if make called there
(because color_out.o builds differently for `convert` and `uv` not to be
used interchangeably).
- supported also out-of-tree build when SRCDIR was passed, eg.:
mkdir build && cd build
make -f ../tools/Makefile SRCDIR=.. convert
+ decklink_temperature to gitignore
40 lines
976 B
Makefile
40 lines
976 B
Makefile
FLAGS ?= -O2 -g
|
|
SRCDIR ?= ..
|
|
COMMON_FLAGS = $(FLAGS) -D_GNU_SOURCE -I$(SRCDIR)/src/
|
|
MKDIR_P = mkdir -p
|
|
vpath %.c $(SRCDIR) $(SRCDIR)/tools
|
|
vpath %.cpp $(SRCDIR) $(SRCDIR)/tools
|
|
|
|
%.o : %.c
|
|
$(MKDIR_P) $(dir $@)
|
|
$(CC) $(COMMON_FLAGS) -c $< -o $@
|
|
|
|
%.o : %.cpp
|
|
$(MKDIR_P) $(dir $@)
|
|
$(CXX) -std=c++17 $(COMMON_FLAGS) -c $< -o $@
|
|
|
|
astat_test: astat.cpp src/compat/platform_pipe.o
|
|
c++ -g -DASTAT_DEBUG -DDEFINE_TEST_MAIN $(COMMON_FLAGS) $^ -pthread -o astat_test
|
|
|
|
astat_lib: astat.a
|
|
|
|
astat.a: astat.o src/compat/platform_pipe.o
|
|
ar rcs astat.a $^
|
|
|
|
convert: src/video_codec.o src/compat/platform_time.o convert.o src/debug.o src/utils/color_out.o src/utils/misc.o
|
|
$(CXX) $^ -o convert
|
|
|
|
decklink_temperature: decklink_temperature.cpp ext-deps/DeckLink/Linux/DeckLinkAPIDispatch.o
|
|
$(CXX) $^ -o $@
|
|
|
|
uyvy2yuv422p: uyvy2yuv422p.c
|
|
$(CC) -g -std=c99 -Wall $< -o $@
|
|
|
|
|
|
TARGETS=astat_lib astat_test convert decklink_temperature uyvy2yuv422p
|
|
|
|
all: $(TARGETS)
|
|
|
|
clean:
|
|
$(RM) $(TARGETS) *o
|