fork(), wait(), exec() in C - Video 2/2
9974 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
Metamask and the Rinkeby Faucet
2265 views
01:59
Introduction to Building Java with Gradle
3400 views
02:00
Running Storm jobs on IDE and cluster
2544 views
01:07
Basic Linux Commands: Working with Directories 2
1596 views
02:28
Charting on Aperture
1737 views
00:45
Choosing a Remote Machine for SSH
3641 views
02:03
Getting Help in a Virtual Class
1655 views
01:09
Running the CS314 Application
2868 views
02:54
Postman Setup / Find Request
1961 views
02:35
Getting Engaged with the CS Department
1887 views
01:58
Reading Page Faults in C
1886 views
01:52
Introduction to Packages in Java
2988 views
02:07
Opening a File in C
1758 views
01:16
Adding a Video to the Infospaces Ecosystem
1435 views
02:00
Java NIO - Objects & Tools
2180 views