Split program into three files, added arguments for fork amounts, and passes sharedID into forks for exec

This commit is contained in:
2022-10-13 23:10:33 -05:00
parent 8339af50c4
commit a22970ff41
8 changed files with 121 additions and 39 deletions
+5 -1
View File
@@ -6,9 +6,13 @@ 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
gcc $(INC) -c -o build/shared.o src/shared.c
link:
gcc -o bin/driver.out build/*.o
gcc -o bin/driver.out build/driver.o build/shared.o
gcc -o bin/producer.out build/producer.o build/shared.o
gcc -o bin/consumer.out build/consumer.o build/shared.o
exec: compile link
./bin/driver.out