fork(), wait(), exec() in C - Video 2/2
8000 views
This is the second video on fork(), wait(), and exec() in C. For CS370 Homework 2.
MAKEFILE
------------------
#list of files
C_SRCS = Fork.c ChildTask.c
C_OBJS = Fork.o ChildTask.o
#C_HEADERS
OBJS = ${C_OBJS}
EXE1 = fork
EXE2 = childTask
#compiler and loader commands and flags
GCC = gcc
GCC_FLAGS = -std=c11 -g -Wall -c -I.
LD_FLAGS = -std=c11 -g -Wall -I.
#compile .c files to .o files
.c.o:
$(GCC) $(GCC_FLAGS) $<
#target is the executable
all: fork childTask
fork: Fork.o
$(GCC) $(LD_FLAGS) Fork.o -o $(EXE1)
childTask: ChildTask.o
$(GCC) $(LD_FLAGS) ChildTask.o -o $(EXE2)
#recomplile c objects if headers change
$(C_OBJS): ${C_HEADERS}
#clean up directory
clean:
rm -f *.o *- $(EXE1) $(EXE2)
package:
zip -r submission.zip Fork.c ChildTask.c Makefile README.txt
Suggested Videos
03:04
REMIX: A web-based IDE for SOLIDITY
1101 views
04:40
Running Your Container in Kubernetes
2059 views
02:23
Zip Files in Linux
2300 views
02:06
Building and Running a Maven Project
2297 views
02:07
Uploading a Docker Image to DockerHub
2020 views
01:58
Logging in Java with Log4j and Gradle
1913 views
01:25
Compiling and Running Java from the Command Line
1536 views
02:04
Writing Distributed Applications with PyTorch
2118 views
02:28
Charting on Aperture
1406 views
01:16
Adding a Video to the Infospaces Ecosystem
1300 views
03:04
Metamask and the Rinkeby Faucet
2110 views
01:28
Trouble-shooting the Datanode Issue
697 views
02:18
Basic Docker Commands
1675 views
01:57
Windows: Installing a Local Web Server
1761 views
01:52
Introduction to Packages in Java
2686 views