We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0a25338 + 0e5537e commit 45eb6d7Copy full SHA for 45eb6d7
1 file changed
Makefile
@@ -1,8 +1,24 @@
1
+CC = gcc
2
+CFLAGS = -g
3
+LDFLAGS = -lstdc++ -lpthread -ldl -g
4
+
5
BMSDK = /usr/local/include
6
-CC = gcc
-CFLAGS = -I$(BMSDK) -g
-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
16
+endif
17
+ifeq ($(UNAME_S),Darwin)
18
+ LDFLAGS += -framework CoreFoundation
19
20
21
+CFLAGS += -I${BMSDK}
22
23
deckcontrol: deckcontrol.o DeckLinkAPIDispatch.o
24
$(CC) $(LDFLAGS) -o deckcontrol deckcontrol.o DeckLinkAPIDispatch.o
0 commit comments