File tree 3 files changed +33
-3
lines changed
3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 1
- # MINISHEL
1
+ # MINIBASh
2
2
bin /
3
+ build /
3
4
minibash
4
5
venv /
5
6
.vscode /
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.10)
2
+ project (minibash C)
3
+
4
+ set (CMAKE_C_STANDARD 11)
5
+
6
+ # Find the readline library
7
+ find_library (READLINE_LIBRARY NAMES readline)
8
+
9
+ if (READLINE_LIBRARY)
10
+ message (STATUS "Readline library found: ${READLINE_LIBRARY} " )
11
+ set (READLINE_FOUND TRUE )
12
+ else ()
13
+ message (FATAL_ERROR "Readline library not found" )
14
+ endif ()
15
+
16
+ # Include directories
17
+ include_directories (includes)
18
+
19
+ # Source files
20
+ file (GLOB_RECURSE SOURCE_FILES main.c helpers/*.c builtins/*.c execution/*.c parsing/*.c utils/*.c)
21
+
22
+ # Executable
23
+ add_executable (minibash ${SOURCE_FILES} )
24
+
25
+ # Link readline library
26
+ target_link_libraries (minibash ${READLINE_LIBRARY} )
Original file line number Diff line number Diff line change 1
1
### Setup
2
2
1 . Install readline library and some extra dependencies
3
3
`sudo apt-get install lib32readline8 lib32readline-dev make git gcc`
4
- 2 . Clone the repository
4
+ 2 . Clone the repository
5
5
`git clone https://github.com/fortytwobytes/minibash && cd minibash`
6
6
3 . Compile and run the program
7
- `make && ./minibash`
7
+ - with Cmake
8
+ ` mkdir -p build && (cd build && cmake .. && make && ./minibash) `
9
+ - with Makefile
10
+ ` make && ./minibash `
8
11
You can’t perform that action at this time.
0 commit comments