From cb2d64d351b22cf32254a0781634a107b01488f4 Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Mon, 1 Oct 2018 16:58:08 +1000 Subject: Rename top-level header, fix CMakeLists target Signed-off-by: Mark Farrugia --- CMakeLists.txt | 6 ++---- include/avirt.h | 29 ----------------------------- include/avirt/avirt.h | 29 +++++++++++++++++++++++++++++ src/avirt-config.c | 4 +++- 4 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 include/avirt.h create mode 100644 include/avirt/avirt.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 9af162f..68e817a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,11 +22,9 @@ # LIBAVIRT CONFIGURATION LIBRARY #------------------------------------------------------------------------------- -# Defines -add_definitions(-D_GNU_SOURCE) - # Target -add_library(avirt STATIC src/avirt_*.c) +file(GLOB SOURCE_FILES "src/avirt-*.c") +add_library(avirt STATIC ${SOURCE_FILES}) # Target includes target_include_directories(avirt PUBLIC include) diff --git a/include/avirt.h b/include/avirt.h deleted file mode 100644 index 5bb8731..0000000 --- a/include/avirt.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * AVIRT User-space library - * - * avirt.h - AVIRT User-space library header - * - * Copyright (C) 2018 Fiberdyne Systems Pty Ltd - * - * 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 2 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 . - */ - -#ifndef _AVIRT_H_ -#define _AVIRT_H_ - -int AVIRT_CreateStream(const char *name, unsigned int channels, int direction); - -int AVIRT_SealCard(); - -#endif // _AVIRT_H_ diff --git a/include/avirt/avirt.h b/include/avirt/avirt.h new file mode 100644 index 0000000..5bb8731 --- /dev/null +++ b/include/avirt/avirt.h @@ -0,0 +1,29 @@ +/* + * AVIRT User-space library + * + * avirt.h - AVIRT User-space library header + * + * Copyright (C) 2018 Fiberdyne Systems Pty Ltd + * + * 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 2 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 . + */ + +#ifndef _AVIRT_H_ +#define _AVIRT_H_ + +int AVIRT_CreateStream(const char *name, unsigned int channels, int direction); + +int AVIRT_SealCard(); + +#endif // _AVIRT_H_ diff --git a/src/avirt-config.c b/src/avirt-config.c index f819c65..2feeda1 100644 --- a/src/avirt-config.c +++ b/src/avirt-config.c @@ -19,7 +19,9 @@ * along with this program. If not, see . */ -#include "avirt-config.h" +#define _GNU_SOURCE + +#include #include #include -- cgit 1.2.3-korg