fork(), wait(), exec() in C - Video 2/2
9820 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:52
Java: Compile and Run Programs in the Terminal
4559 views
01:59
Introduction to Building Java with Gradle
3294 views
01:43
Internal Components of a Computer
1608 views
02:24
Intro to Aperture's Inspection Pane
1590 views
02:37
Hadoop 3.3.6 Cluster Configuration
2674 views
01:55
Certificate Installation on MacOS with Google Chrome
1356 views
02:07
Opening a File in C
1568 views
00:46
vsCode Port Forward for Remote SSH
2432 views
01:53
Java NIO - Introduction
1869 views
02:04
Makefile for Java Programs
3368 views
01:32
Submitting Assignments Using Checkin
2166 views
02:00
Java NIO - Server Select Loop
2202 views
07:37
CS250/CS280a1: Midterm 1 Review
1820 views
02:28
Charting on Aperture
1648 views
01:18
Using PuTTY to SSH
4593 views