add this to pull
This commit is contained in:
commit
93925e9972
23
Makefile
23
Makefile
@ -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
9
include/Common.h
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef COMMON_H
|
||||||
|
#define COMMON_H
|
||||||
|
|
||||||
|
typedef struct CommandStruct {
|
||||||
|
char* argv[100]; // Max 100 commands
|
||||||
|
int argc;
|
||||||
|
} CommandStruct;
|
||||||
|
|
||||||
|
#endif
|
@ -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
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user