fork(), wait(), exec() in C - Video 2/2
6600 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:29
How to Change File Permissions
1342 views
01:58
Apache Spark - Using the Spark Shell
2894 views
01:12
Intro to Sustain's Data Download Tool
711 views
01:56
Hadoop - Configuration Files
1997 views
02:01
Docker volumes for data persistence
1372 views
02:07
Opening a File in C
664 views
04:40
Running Your Container in Kubernetes
1620 views
01:32
Submitting Assignments Using Checkin
1783 views
01:44
How to Use Respondus Lockdown Browser
883 views
01:17
Hello World in C
1345 views
03:04
Metamask and the Rinkeby Faucet
1700 views
04:46
CS250/CS280a1: HW1 Setup and Submission
1141 views
01:55
Basic Linux Commands: Working with Directories 1
945 views
02:03
Getting Help in a Virtual Class
985 views
01:40
Remote Login From Windows via SSH
3089 views