Skip to content

Commit

Permalink
Refactor project to include under src
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidchu committed Jan 7, 2024
1 parent 2e462be commit f26d85d
Show file tree
Hide file tree
Showing 52 changed files with 422 additions and 422 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
venv/

# Ignore Python Caches
compiler/results
src/compiler/results
__pycache__/

# Ignore CMake's build directory
Expand Down
32 changes: 16 additions & 16 deletions src/CMakeLists.txt → src/c_interpretter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Make src public to tests
include_directories("${CMAKE_SOURCE_DIR}")

# Add libraries
## Compiler Compatibility Files
add_subdirectory("${CMAKE_SOURCE_DIR}/src/bool")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/common")

## Standard Library Wrappers
add_subdirectory("${CMAKE_SOURCE_DIR}/src/mem")

## Custom Library
add_subdirectory("${CMAKE_SOURCE_DIR}/src/arr")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/tbl")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/rstr")

# Make src public to tests
include_directories("${CMAKE_SOURCE_DIR}")

# Add libraries
## Compiler Compatibility Files
add_subdirectory("${CMAKE_SOURCE_DIR}/src/bool")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/common")

## Standard Library Wrappers
add_subdirectory("${CMAKE_SOURCE_DIR}/src/mem")

## Custom Library
add_subdirectory("${CMAKE_SOURCE_DIR}/src/arr")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/tbl")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/rstr")

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Create the 'arr' target
add_library("arr" "${CMAKE_SOURCE_DIR}/src/arr/arr.c")

# Link executable to libraries
# Create the 'arr' target
add_library("arr" "${CMAKE_SOURCE_DIR}/src/arr/arr.c")

# Link executable to libraries
target_link_libraries("arr" PRIVATE "mem" "common")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/bool/bool.h → src/c_interpretter/bool/bool.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#ifndef __STDC_VERSION__ /* C89 */
typedef enum { false = 0, true = 1 } bool;
#else
#include <stdbool.h>
#pragma once

#ifndef __STDC_VERSION__ /* C89 */
typedef enum { false = 0, true = 1 } bool;
#else
#include <stdbool.h>
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f26d85d

Please sign in to comment.