fork(), wait(), exec() in C - Video 2/2
8424 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:24
Setting Up Gradle in Eclipse
2413 views
02:08
Setting up a package structure in Java
1230 views
01:43
Factory Design Patterns
2029 views
01:32
User Experience: Color Matters
2199 views
01:58
Hadoop - Environment Setup
3768 views
01:09
Mounting a Filesystem on Windows
1534 views
02:06
Installing the SLF4J Maven Dependency
2523 views
00:31
Changing Your CS Password
1280 views
01:18
Using PuTTY to SSH
4457 views
01:34
Logging Into VM for CS370 Term Project
2559 views
02:35
Getting Engaged with the CS Department
1411 views
02:00
Hadoop Cluster Configuration
1103 views
01:40
Remote Login From Windows via SSH
4069 views
02:04
Writing Distributed Applications with PyTorch
2167 views
00:46
vsCode Port Forward for Remote SSH
2355 views