mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-26 19:56:33 +00:00
fixed ld error
This commit is contained in:
1
Makefile
1
Makefile
@@ -37,6 +37,7 @@ endif
|
||||
ifneq ($(call optbool,$(WITH_GPIO)),)
|
||||
_LIBS += -lwiringPi
|
||||
override CFLAGS += -DWITH_GPIO
|
||||
_SRCS += $(shell ls src/gpio/*.c)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
29
src/gpio/gpio.c
Normal file
29
src/gpio/gpio.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*****************************************************************************
|
||||
# #
|
||||
# uStreamer - Lightweight and fast MJPG-HTTP streamer. #
|
||||
# #
|
||||
# Copyright (C) 2018 Maxim Devaev <mdevaev@gmail.com> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
|
||||
int gpio_pin_prog_running;
|
||||
int gpio_pin_stream_online;
|
||||
int gpio_pin_has_http_clients;
|
||||
int gpio_pin_workers_busy_at;
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
#include <wiringPi.h>
|
||||
|
||||
#include "tools.h"
|
||||
#include "logging.h"
|
||||
#include "../tools.h"
|
||||
#include "../logging.h"
|
||||
|
||||
|
||||
int gpio_pin_prog_running;
|
||||
int gpio_pin_stream_online;
|
||||
int gpio_pin_has_http_clients;
|
||||
int gpio_pin_workers_busy_at;
|
||||
extern int gpio_pin_prog_running;
|
||||
extern int gpio_pin_stream_online;
|
||||
extern int gpio_pin_has_http_clients;
|
||||
extern int gpio_pin_workers_busy_at;
|
||||
|
||||
|
||||
#define GPIO_INIT { \
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "../encoder.h"
|
||||
#include "../stream.h"
|
||||
#ifdef WITH_GPIO
|
||||
# include "../gpio.h"
|
||||
# include "../gpio/gpio.h"
|
||||
#endif
|
||||
|
||||
#include "unix.h"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "stream.h"
|
||||
#include "http/server.h"
|
||||
#ifdef WITH_GPIO
|
||||
# include "gpio.h"
|
||||
# include "gpio/gpio.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "encoder.h"
|
||||
#include "http/server.h"
|
||||
#ifdef WITH_GPIO
|
||||
# include "gpio.h"
|
||||
# include "gpio/gpio.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "device.h"
|
||||
#include "encoder.h"
|
||||
#ifdef WITH_GPIO
|
||||
# include "gpio.h"
|
||||
# include "gpio/gpio.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user