fork(), wait(), exec() in C - Video 2/2
7485 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

04:58
fork(), wait(), exec() in C - Video 2/2
7485 views

01:18
Using PuTTY to SSH
2266 views

02:24
Intro to Aperture's Inspection Pane
1104 views

01:50
Basic Git Tutorial Part 3: Branches
1697 views

01:49
Finding and Using Multiple 120 Lab Machines
4315 views

01:29
Development Environment using vsCode with Remote SSH
3083 views

01:31
Create a Maven Project in IntelliJ
2730 views

01:25
Compiling and Running Java from the Command Line
1322 views

01:58
Logging in Java with Log4j and Gradle
1604 views

08:05
Multi-Threaded Java Programs
2024 views

02:28
Charting on Aperture
1034 views

02:02
Basic editing of videos using iMovie for MacOS
1986 views

02:08
Setting up a package structure in Java
975 views

00:58
Cloning a GitHub Repository
4205 views

01:58
Apache Spark - Using the Spark Shell
3041 views