Skip to content

Commit

Permalink
Fix compilation on Fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Aug 12, 2024
1 parent f7b9402 commit 4d38b45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ CFLAGS = $(XAV_DEBUG_LOGS) -fPIC -shared
IFLAGS = -I$(ERTS_INCLUDE_DIR) -I$(XAV_DIR)
LDFLAGS = -lavcodec -lswscale -lavutil -lavformat -lavdevice -lswresample

# Falgs for MacOS
ifeq ($(shell uname -s),Darwin)
ifeq ($(shell uname -m),arm64)
IFLAGS += $$(pkg-config --cflags-only-I libavcodec libswscale libavutil libavformat libavdevice libswresample)
Expand All @@ -31,6 +32,12 @@ ifeq ($(shell uname -s),Darwin)
endif
endif

# Flags for Fedora
ifneq (,$(wildcard /etc/fedora-release))
IFLAGS += $$(pkg-config --cflags-only-I libavcodec libswscale libavutil libavformat libavdevice libswresample)
LFLAGS += $$(pkg-config --libs-only-L libavcodec libswscale libavutil libavformat libavdevice libswresample)
endif

all: $(XAV_DECODER_SO) $(XAV_READER_SO)

$(XAV_DECODER_SO): Makefile $(DECODER_SOURCES) $(DECODER_HEADERS)
Expand Down

0 comments on commit 4d38b45

Please sign in to comment.