fork(), wait(), exec() in C - Video 2/2
6092 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:07
Opening a File in C
257 views
01:51
Hadoop-3.1.2 Cluster Configuration
2248 views
02:00
Apache Spark - Setting Up a Spark Cluster
2850 views
02:00
Running Storm jobs on IDE and cluster
1924 views
02:06
Postman Setup / Config Request
803 views
01:52
Introduction to Packages in Java
1508 views
01:57
Java NIO - Client Example
1366 views
01:25
Compiling and Running Java from the Command Line
708 views
02:09
Hadoop 3.3.6 Environment Setup
223 views
02:08
Setting up a package structure in Java
448 views
01:29
How to Change File Permissions
1138 views
01:43
Internal Components of a Computer
750 views
04:40
Running Your Container in Kubernetes
1392 views
04:46
CS250/CS280a1: HW1 Setup and Submission
828 views
01:12
Intro to Sustain's Data Download Tool
507 views