-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
16 lines (12 loc) · 789 Bytes
/
makefile
File metadata and controls
16 lines (12 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CC = gcc # this is compiler
CFLAGS = -Wall -g -std=c99 -D_GNU_SOURCE -Werror #these are all flags for compiler (same as used in lecture notes week 5), althought the -D-GNU... is from a piazza post
OBJ = driver.o info.o printing.o #these are all the object files that need to be compiled
myMonitoringTool: $(OBJ) # this compiles the object file into monitoringtool using CC and Cflags
$(CC) $(CFLAGS) -o $@ $^
%.o: %.c #This compiles the c file into an object file
$(CC) $(CFLAGS) -c $<
run: myMonitoringTool # this allows us to add command line args and run the monitoringtool(reference #7)
./myMonitoringTool $(ARGS)
.PHONY: clean #used PHONY as we did in lecture notes
clean: #added a clean to get rid of excess files after running program
rm -f *.o myMonitoringTool