Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # COMP20007 Design of Algorithms
- # 2019 Semester 1
- #
- # Assignment 1 Makefile
- # Created by Tobias Edwards <tobias.edwards@unimelb.edu.au>
- CC = gcc
- CFLAGS = -g -Wall -std=c99
- EXE = a1
- OBJ = main.o point.o deque.o convex-hull.o list.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
- list.o: list.h list.c
- $(CC) $(CFLAGS) -c list.c
- # test command to run - 15 ouput files
- test1:
- ./a1 -o < sample_input/orientation-1-in.txt > test_output/out1.txt
- diff sample_input/orientation-1-out.txt test_output/out1.txt
- test2:
- ./a1 -o < sample_input/orientation-2-in.txt > test_output/out2.txt
- diff sample_input/orientation-2-out.txt test_output/out2.txt
- test3:
- ./a1 -o < sample_input/orientation-3-in.txt > test_output/out3.txt
- diff sample_input/orientation-3-out.txt test_output/out3.txt
- test4:
- ./a1 -o < sample_input/orientation-4-in.txt > test_output/out4.txt
- diff sample_input/orientation-4-out.txt test_output/out4.txt
- test5:
- ./a1 -o < sample_input/orientation-5-in.txt > test_output/out5.txt
- diff sample_input/orientation-5-out.txt test_output/out5.txt
- test_1:
- ./a1 -d < sample_input/deque-1-in.txt > test_output/out_1.txt
- diff sample_input/deque-1-out.txt test_output/out_1.txt
- test_2:
- ./a1 -d < sample_input/deque-2-in.txt > test_output/out_2.txt
- diff sample_input/deque-2-out.txt test_output/out_2.txt
- test_3:
- ./a1 -d < sample_input/deque-3-in.txt > test_output/out_3.txt
- diff sample_input/deque-3-out.txt test_output/out_3.txt
- test_4:
- ./a1 -d < sample_input/deque-4-in.txt > test_output/out_4.txt
- diff sample_input/deque-4-out.txt test_output/out_4.txt
- test_5:
- ./a1 -d < sample_input/deque-5-in.txt > test_output/out_5.txt
- diff sample_input/deque-5-out.txt test_output/out_5.txt
- test__1:
- ./a1 -i < sample_input/inside-hull-1-in.txt > test_output/out__1.txt
- diff sample_input/inside-hull-1-out.txt test_output/out__1.txt
- test__2:
- ./a1 -i < sample_input/inside-hull-2-in.txt > test_output/out__2.txt
- diff sample_input/inside-hull-2-out.txt test_output/out__2.txt
- test__3:
- ./a1 -i < sample_input/inside-hull-3-in.txt > test_output/out__3.txt
- diff sample_input/inside-hull-3-out.txt test_output/out__3.txt
- test__4:
- ./a1 -i < sample_input/inside-hull-4-in.txt > test_output/out__4.txt
- diff sample_input/inside-hull-4-out.txt test_output/out__4.txt
- test__5:
- ./a1 -i < sample_input/inside-hull-5-in.txt > test_output/out__5.txt
- diff sample_input/inside-hull-5-out.txt test_output/out__5.txt
- # append all tests together
- test: test1 test2 test3 test4 test5 test_1 test_2 test_3 test_4 test_5 test__1 test__2 test__3 test__4 test__5 test__5
- # "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 .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement