OBFI

Brainfuck Interpreter
git clone http://git.omkov.net/OBFI
Log | Tree | Refs | README | LICENCE | Download

AuthorJakob Wakeling <[email protected]>
Date2020-08-26 12:02:57
Commit3f2add678e5ce91916765a00e5ceabf4c666f583
Parent2df50075436668fcfb96d4f86b135d4045520d0d

Move lib into subdirectory

Diffstat

M CMakeLists.txt | 3 ++-
R src/error.c -> src/lib/error.c | 0
R src/error.h -> src/lib/error.h | 0
M src/obfi.c | 2 +-

4 files changed, 3 insertions, 2 deletions

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e57013d..0774b31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,7 @@ PROJECT(OBFI VERSION 1.0.2 LANGUAGES C)
 
 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
 
+FILE(GLOB LIBSRC ${CMAKE_SOURCE_DIR}/src/lib/*)
 FILE(GLOB SOURCES ${CMAKE_SOURCE_DIR}/src/*)
 
-ADD_EXECUTABLE(obfi ${SOURCES})
+ADD_EXECUTABLE(obfi ${SOURCES} ${LIBSRC})
diff --git a/src/error.c b/src/lib/error.c
similarity index 100%
rename from src/error.c
rename to src/lib/error.c
diff --git a/src/error.h b/src/lib/error.h
similarity index 100%
rename from src/error.h
rename to src/lib/error.h
diff --git a/src/obfi.c b/src/obfi.c
index 9e8bb4f..d748ea7 100644
--- a/src/obfi.c
+++ b/src/obfi.c
@@ -30,7 +30,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
 */
 
-#include "error.h"
+#include "lib/error.h"
 
 #include <stddef.h>
 #include <stdint.h>