fork(), wait(), exec() in C - Video 2/2
6675 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
02:00
Apache Spark - Setting Up a Spark Cluster
3139 views
02:06
Installing the SLF4J Maven Dependency
1549 views
01:57
Dockerfiles - Part 1
1134 views
01:58
Reading Page Faults in C
701 views
01:29
How to Change File Permissions
1401 views
02:00
Java NIO - Server Select Loop
1861 views
01:38
GSON
960 views
01:58
Logging in Java with Log4j and Gradle
1467 views
00:46
vsCode Port Forward for Remote SSH
1455 views
01:09
Running the CS314 Application
1914 views
01:59
Simple Client / Server Communication
2816 views
03:54
Remote SSH Using VS Code
2991 views
01:24
Setting Up Gradle in Eclipse
1749 views
02:04
Writing Distributed Applications with PyTorch
1845 views
02:07
Uploading a Docker Image to DockerHub
1605 views