fork(), wait(), exec() in C - Video 2/2
10025 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
00:58
Remote Login From Mac OSX via SSH
4182 views
03:39
How To Use Planning Mode In Claude Code
172 views
01:19
Being a Good Citizen on Piazza
1800 views
02:20
Makefile for C Programs
4853 views
02:01
Docker volumes for data persistence
2046 views
01:43
Factory Design Patterns
2185 views
02:09
Hadoop 3.3.6 Environment Setup
1170 views
01:43
Installing Apache Zookeeper and Storm
1961 views
01:59
Introduction to Building Java with Gradle
3487 views
01:12
Intro to Sustain's Data Download Tool
1474 views
02:29
SSH Port Forwarding to Access Web Sites
4780 views
02:00
Running Storm jobs on IDE and cluster
2581 views
03:04
Metamask and the Rinkeby Faucet
2304 views
01:45
VS Code - Four VS Code "Hacks" for Java
65 views
08:05
Multi-Threaded Java Programs
2675 views