fixed build

This commit is contained in:
Devaev Maxim
2018-09-25 00:06:21 +03:00
parent 0717d2ee6a
commit 8152d35bb3
2 changed files with 13 additions and 18 deletions

View File

@@ -10,16 +10,16 @@ OBJECTS = $(SOURCES:.c=.o)
PROG = ustreamer
ifeq ($(shell ls -d /opt/vc/include 2>/dev/null), /opt/vc/include)
SOURCES += $(shell ls src/omx/*.c)
LIBS += -lbcm_host -lvcos -lopenmaxil -L/opt/vc/lib
CFLAGS += -DOMX_ENCODER -DOMX_SKIP64BIT -I/opt/vc/include
endif
all: $(SOURCES) $(PROG)
rpi:
make all \
SOURCES="$(SOURCES) $(shell ls src/omx/*.c)" \
LIBS="$(LIBS) -lbcm_host -lvcos -lopenmaxil -L/opt/vc/lib" \
CFLAGS="$(CFLAGS) -DOMX_ENCODER -DOMX_SKIP64BIT -I/opt/vc/include"
install: $(PROG)
install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)

View File

@@ -26,20 +26,15 @@
#ifdef OMX_ENCODER
# include "omx/encoder.h"
# define ENCODER_TYPES_OMX_HINT ", OMX"
#else
# define ENCODER_TYPES_OMX_HINT ""
#endif
#define ENCODER_TYPES_STR "CPU"
#define PUSH _Pragma("push_macro(\"ENCODER_TYPES_STR\")")
#define POP _Pragma("pop_macro(\"ENCODER_TYPES_STR\")")
#ifdef OMX_ENCODER
PUSH
# undef ENCODER_TYPES_STR
# define ENCODER_TYPES_STR POP ENCODER_TYPES_STR ", OMX"
#endif
#undef PUSH
#undef POP
#define ENCODER_TYPES_STR \
"CPU" \
ENCODER_TYPES_OMX_HINT
enum encoder_type_t {
ENCODER_TYPE_UNKNOWN, // Only for encoder_parse_type() and main()