fixed ld error

This commit is contained in:
Devaev Maxim
2020-09-01 08:53:33 +03:00
parent 0ac9f77619
commit 266e210b04
7 changed files with 40 additions and 10 deletions

View File

@@ -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
View 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;

View File

@@ -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 { \

View File

@@ -59,7 +59,7 @@
#include "../encoder.h"
#include "../stream.h"
#ifdef WITH_GPIO
# include "../gpio.h"
# include "../gpio/gpio.h"
#endif
#include "unix.h"

View File

@@ -44,7 +44,7 @@
#include "stream.h"
#include "http/server.h"
#ifdef WITH_GPIO
# include "gpio.h"
# include "gpio/gpio.h"
#endif

View File

@@ -40,7 +40,7 @@
#include "encoder.h"
#include "http/server.h"
#ifdef WITH_GPIO
# include "gpio.h"
# include "gpio/gpio.h"
#endif

View File

@@ -38,7 +38,7 @@
#include "device.h"
#include "encoder.h"
#ifdef WITH_GPIO
# include "gpio.h"
# include "gpio/gpio.h"
#endif