-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
43 lines (30 loc) · 655 Bytes
/
makefile
File metadata and controls
43 lines (30 loc) · 655 Bytes
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
# Makefile for the Binary Search Tree project
.POSIX:
INC = node.hpp bst.hpp io.hpp
SRC = node.cpp bst.cpp io.cpp main.cpp
OBJ = $(SRC:.cpp=.o)
CC = g++
CFLAGS = -O3 -std=c++11 -I. -W -Wall
all: options bst
options:
@echo "bst build options:"
@echo "CFLAGS = $(CFLAGS)"
@echo "CC = $(CC)"
.SUFFIXES: .cpp .o
.cpp.o:
$(CC) $(CFLAGS) -c $<
node.o: node.hpp
bst.o: bst.hpp
io.o: io.hpp bst.hpp
main.o: io.hpp bst.hpp
# $(OBJ):
bst: $(OBJ)
$(CC) -o $@ $(OBJ)
clean: clean_obj clean_bin
clean_obj:
@echo "Removing objects"
@rm -f $(OBJ)
clean_bin:
@echo "Removing binary fils"
@rm -f bst
.PHONY: all options clean clean_obj clean_bin