add this to pull

This commit is contained in:
Samantha Boyer 2022-10-27 15:32:16 -05:00
commit 93925e9972
4 changed files with 35 additions and 6 deletions

View File

@ -1,14 +1,29 @@
INC := -I include INC := -I include
all: main exec all: compile link
main: compile:
gcc $(INC) -c -o build/main.o src/main.c gcc $(INC) -c -o build/main.o src/main.c
gcc $(INC) -c -o build/Integrated.o src/Integrated.c gcc $(INC) -c -o build/Integrated.o src/Integrated.c
gcc $(INC) -c -o build/Pish.o src/Pish.c gcc $(INC) -c -o build/Pish.o src/Pish.c
exec: link:
gcc -o bin/pish.out build/*.o gcc -o bin/pish.out build/*.o
exec: compile link
./bin/pish.out
debug: debugCompile debugLink
debugCompile:
gcc $(INC) -g -c -o build/main.o src/main.c
gcc $(INC) -g -c -o build/Integrated.o src/Integrated.c
gcc $(INC) -g -c -o build/Pish.o src/Pish.c
debugLink:
gcc -g -o bin/pish.out build/*.o
clean: clean:
rm build/* rm build/*.o
rm bin/*.out

9
include/Common.h Executable file
View File

@ -0,0 +1,9 @@
#ifndef COMMON_H
#define COMMON_H
typedef struct CommandStruct {
char* argv[100]; // Max 100 commands
int argc;
} CommandStruct;
#endif

View File

@ -1,6 +1,8 @@
#ifndef INTEGRATED_H #ifndef INTEGRATED_H
#define INTEGRATED_H #define INTEGRATED_H
#include "Common.h"
void IntegratedCheck(char* command); void IntegratedCheck(char* command);
#endif #endif

View File

@ -1,8 +1,11 @@
#ifndef PISH_H #ifndef PISH_H
#define PISH_H #define PISH_H
char* getcmd(void); #include "Common.h"
void exec(char* command);
void Pish(void); void Pish(void);
void Execute(char* command);
void GetInput(char* inputString);
void ParseInput(char* inputString, CommandStruct* command);
#endif #endif