producers-consumers/Makefile

23 lines
488 B
Makefile
Raw Normal View History

2022-10-11 19:50:07 -05:00
INC := -I include
2022-10-12 21:11:15 -05:00
all: compile link
2022-10-11 19:50:07 -05:00
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
2022-10-11 19:50:07 -05:00
2022-10-12 21:11:15 -05:00
link:
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
2022-10-12 21:11:15 -05:00
exec: compile link
2022-10-12 15:44:12 -05:00
./bin/driver.out
2022-10-11 19:50:07 -05:00
clean:
2022-10-12 21:15:16 -05:00
rm build/*.o
rm bin/*.out