Skip to content

Commit 45eb6d7

Browse files
authored
Merge pull request #1 from g-maxime/master
Add Linuxbrew support
2 parents 0a25338 + 0e5537e commit 45eb6d7

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

Makefile

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
CC = gcc
2+
CFLAGS = -g
3+
LDFLAGS = -lstdc++ -lpthread -ldl -g
4+
15
BMSDK = /usr/local/include
26

3-
CC = gcc
4-
CFLAGS = -I$(BMSDK) -g
5-
LDFLAGS = -lstdc++ -lpthread -framework CoreFoundation -g
7+
UNAME_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
8+
ifeq ($(UNAME_S),Linux)
9+
ifneq ("$(wildcard /home/linuxbrew/.linuxbrew/include/DeckLinkAPIDispatch.cpp)","")
10+
BMSDK = /home/linuxbrew/.linuxbrew/include
11+
else
12+
ifneq ("$(wildcard ~/.linuxbrew/include/DeckLinkAPIDispatch.cpp)","")
13+
BMSDK = ~/.linuxbrew/include
14+
endif
15+
endif
16+
endif
17+
ifeq ($(UNAME_S),Darwin)
18+
LDFLAGS += -framework CoreFoundation
19+
endif
20+
21+
CFLAGS += -I${BMSDK}
622

723
deckcontrol: deckcontrol.o DeckLinkAPIDispatch.o
824
$(CC) $(LDFLAGS) -o deckcontrol deckcontrol.o DeckLinkAPIDispatch.o

0 commit comments

Comments
 (0)