-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 935 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# COMP20007 Design of Algorithms
# 2019 Semester 1
#
# Assignment 1 Makefile
# Created by Tobias Edwards <[email protected]>
CC = gcc
CFLAGS = -Wall
EXE = a1
OBJ = main.o point.o deque.o convex-hull.o
# Default Target, so "$ make" or "$ make all" will do this
all: $(EXE)
# Create the executable
$(EXE): $(OBJ)
$(CC) $(CFLAGS) -o $(EXE) $(OBJ)
# Other Dependencies
point.o: point.h point.c
$(CC) $(CFLAGS) -c point.c
deque.o: deque.h deque.c
$(CC) $(CFLAGS) -c deque.c
convex-hull.o: convex-hull.h convex-hull.c
$(CC) $(CFLAGS) -c convex-hull.c
# TODO: Add any other dependencies you may create
# "clean" and "all" don't actually create files called "clean" and "all"
# and are thus "Phony Targets"
.PHONY: clean submit all
# Run "$ make clean" to remove the object and executable files
clean:
rm -f $(OBJ) $(EXE)
# Run "$ make submit" to create submission.zip
submit: clean
zip -r submission.zip .