commit e4debd05db2de356b295c89b714ae732fd94002d Author: TriantaTV Date: Tue Oct 11 19:50:07 2022 -0500 Initial Commit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3647fa0 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +INC := -I include + +all: compile exec + +compile: + gcc $(INC) -c -o build/driver.o src/driver.c + gcc $(INC) -c -o build/producer.o src/producer.c + gcc $(INC) -c -o build/consumer.o src/consumer.c + +exec: + ./driver.out + +clean: + rm driver.out consumer.out producer.out \ No newline at end of file diff --git a/bin/driver.out b/bin/driver.out new file mode 100755 index 0000000..9c6c0fd Binary files /dev/null and b/bin/driver.out differ diff --git a/build/consumer.o b/build/consumer.o new file mode 100644 index 0000000..f28fa71 Binary files /dev/null and b/build/consumer.o differ diff --git a/build/driver.o b/build/driver.o new file mode 100644 index 0000000..dca3480 Binary files /dev/null and b/build/driver.o differ diff --git a/build/producer.o b/build/producer.o new file mode 100644 index 0000000..606092d Binary files /dev/null and b/build/producer.o differ diff --git a/include/consumer.h b/include/consumer.h new file mode 100644 index 0000000..e69de29 diff --git a/include/producer.h b/include/producer.h new file mode 100644 index 0000000..e69de29 diff --git a/src/consumer.c b/src/consumer.c new file mode 100644 index 0000000..4ca6817 --- /dev/null +++ b/src/consumer.c @@ -0,0 +1,4 @@ +void consumer(void) +{ + ; +} \ No newline at end of file diff --git a/src/driver.c b/src/driver.c new file mode 100644 index 0000000..7607b82 --- /dev/null +++ b/src/driver.c @@ -0,0 +1,19 @@ +#include +#include + +int GetSplitAmount(char* argv); + +int main(int argc, char* argv[]) +{ + int splitLimit = 1; + if (argc == 2) + splitLimit = GetSplitAmount(argv[1]); + +} + +int GetSplitAmount(char* argv) +{ + int splitAmount; + sscanf(argv, "%d", &splitAmount); + return splitAmount; +} diff --git a/src/producer.c b/src/producer.c new file mode 100644 index 0000000..1478cbb --- /dev/null +++ b/src/producer.c @@ -0,0 +1,4 @@ +void producer(void) +{ + ; +} \ No newline at end of file