Skip to content

Commit

Permalink
Merge pull request #1 from g-maxime/master
Browse files Browse the repository at this point in the history
Add Linuxbrew support
  • Loading branch information
dericed authored Jul 1, 2020
2 parents 0a25338 + 0e5537e commit 45eb6d7
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
CC = gcc
CFLAGS = -g
LDFLAGS = -lstdc++ -lpthread -ldl -g

BMSDK = /usr/local/include

CC = gcc
CFLAGS = -I$(BMSDK) -g
LDFLAGS = -lstdc++ -lpthread -framework CoreFoundation -g
UNAME_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
ifeq ($(UNAME_S),Linux)
ifneq ("$(wildcard /home/linuxbrew/.linuxbrew/include/DeckLinkAPIDispatch.cpp)","")
BMSDK = /home/linuxbrew/.linuxbrew/include
else
ifneq ("$(wildcard ~/.linuxbrew/include/DeckLinkAPIDispatch.cpp)","")
BMSDK = ~/.linuxbrew/include
endif
endif
endif
ifeq ($(UNAME_S),Darwin)
LDFLAGS += -framework CoreFoundation
endif

CFLAGS += -I${BMSDK}

deckcontrol: deckcontrol.o DeckLinkAPIDispatch.o
$(CC) $(LDFLAGS) -o deckcontrol deckcontrol.o DeckLinkAPIDispatch.o
Expand Down

0 comments on commit 45eb6d7

Please sign in to comment.