fork(), wait(), exec() in C - Video 2/2
8070 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
1650 views
02:00
Launching Storm daemons Under Supervision
2576 views
01:58
Logging in Java with Log4j and Gradle
1925 views
01:14
Trouble-shooting the .bashrc Issue
936 views
46:12
Term Projects: Why They Matter and How to Do It Right
2295 views
04:40
Running Your Container in Kubernetes
2067 views
07:37
CS250/CS280a1: Midterm 1 Review
1151 views
03:04
REMIX: A web-based IDE for SOLIDITY
1107 views
02:07
Uploading a Docker Image to DockerHub
2028 views
01:55
Certificate Installation on MacOS with Google Chrome
1137 views
07:34
Shared Memory in C
2974 views
01:39
Creating a basic .vimrc file
1799 views
01:59
Simple Client / Server Communication
10662 views
01:44
How to Use Respondus Lockdown Browser
1879 views
02:03
Getting Help in a Virtual Class
1374 views