-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
43 lines (32 loc) · 1.33 KB
/
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
40
41
42
43
# Harsh Rawat, harsh-rawat, hrawat2
# Sidharth Gurbani, gurbani, gurbani
#
# This is the makefile for Assignment 3 of CS537 in Fall 2020 offering
# Run "make all" to build the source code
# The executable file is named make537
#
#
PROGNAME = make537
CC = gcc
CFLAGS = -Wall -pedantic -Wextra
LDFLAGS =
OBJECTS = main.o error_handle.o linked_list.o graph.o text_parser.o makefile_parser.o execution_engine.o
all: clean $(PROGNAME)
$(PROGNAME): $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGNAME) $(OBJECTS)
error_handle.o: error_handle.h error_handle.c
$(CC) $(CFLAGS) $(LDFLAGS) -c error_handle.c
linked_list.o: error_handle.h linked_list.h linked_list.c
$(CC) $(CFLAGS) $(LDFLAGS) -c linked_list.c
graph.o: error_handle.h linked_list.h graph.h graph.c
$(CC) $(CFLAGS) $(LDFLAGS) -c graph.c
text_parser.o: error_handle.h linked_list.h text_parser.h text_parser.c
$(CC) $(CFLAGS) $(LDFLAGS) -c text_parser.c
makefile_parser.o: error_handle.h linked_list.h graph.h text_parser.h makefile_parser.h makefile_parser.c
$(CC) $(CFLAGS) $(LDFLAGS) -c makefile_parser.c
execution_engine.o: error_handle.h makefile_parser.h execution_engine.h execution_engine.c
$(CC) $(CFLAGS) $(LDFLAGS) -c execution_engine.c
main.o: error_handle.h makefile_parser.h execution_engine.h main.c
$(CC) $(CFLAGS) $(LDFLAGS) -c main.c
clean:
rm -f $(OBJECTS) $(PROGNAME)