Skip to content
Browse files

Use provided "CC" variable and only fallback to "gcc" if not found.

  • Loading branch information...
1 parent 9bf8043 commit de40e7b8c7a7b2a6a633626c2b2581cc7c21cdc7 @fancycode fancycode committed
Showing with 8 additions and 4 deletions.
  1. +4 −2 Makefile
  2. +4 −2 examples/Makefile
View
6 Makefile
@@ -20,7 +20,9 @@ MATROSKA_SOURCES:= \
src/matroska/matroska-read-common.c \
src/matroska/lzo.c
-CC:=gcc
+ifeq ($(origin CC), default)
+ CC := gcc
+endif
LDFLAGS_GSTREAMER:=$(shell pkg-config --libs gstreamer-video-$(GSTREAMER_VERSION))
CFLAGS_GSTREAMER:=$(shell pkg-config --cflags gstreamer-video-$(GSTREAMER_VERSION))
@@ -60,7 +62,7 @@ libgstlibde265.so: $(OBJS) $(MATROSKA_OBJS)
$(CC) -shared -o $@ $^ -g $(LDFLAGS)
examples:
- cd examples && make GSTREAMER_VERSION=$(GSTREAMER_VERSION)
+ cd examples && make GSTREAMER_VERSION=$(GSTREAMER_VERSION) CC=$(CC)
clean:
rm -f libgstlibde265.so $(OBJS) $(MATROSKA_OBJS)
View
6 examples/Makefile
@@ -1,6 +1,8 @@
GSTREAMER_VERSION:=0.10
-CC:=gcc
+ifeq ($(origin CC), default)
+ CC := gcc
+endif
CFLAGS_GSTREAMER:=$(shell pkg-config --cflags gstreamer-$(GSTREAMER_VERSION))
LDFLAGS_GSTREAMER:=$(shell pkg-config --libs gstreamer-$(GSTREAMER_VERSION))
@@ -8,7 +10,7 @@ LDFLAGS_GSTREAMER:=$(shell pkg-config --libs gstreamer-$(GSTREAMER_VERSION))
all: playhevc
playhevc: playhevc.c
- gcc -g -o $@ $< $(CFLAGS_GSTREAMER) $(LDFLAGS_GSTREAMER)
+ $(CC) -g -o $@ $< $(CFLAGS_GSTREAMER) $(LDFLAGS_GSTREAMER)
clean:
rm -f playhevc

0 comments on commit de40e7b

Please sign in to comment.
Something went wrong with that request. Please try again.