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

01:34
Logging Into VM for CS370 Term Project
2152 views

01:29
How to Change File Permissions
1432 views

00:46
vsCode Port Forward for Remote SSH
1511 views

01:57
Windows: Installing a Local Web Server
1460 views

02:35
Getting Engaged with the CS Department
1045 views

01:12
Intro to Sustain's Data Download Tool
781 views

02:00
Running Storm jobs on IDE and cluster
2125 views

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

01:16
Adding a Video to the Infospaces Ecosystem
1141 views

02:03
Getting Help in a Virtual Class
1067 views

02:07
Passing a Pipe's File Descriptor to a Process
2716 views

02:43
Implement a RESTful API with Spark
1421 views

01:35
Development Environment using vsCode with Docker
2232 views

01:19
Being a Good Citizen on Piazza
1425 views

01:09
Running the CS314 Application
2009 views