-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 758 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (26 loc) · 758 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
# A makefile that canbe used for a generic C++ project in which there is
# a single executable named project3, which depends on all source code files.
# To build or update the executable, or any files that require rebuilding,
# type
# make
# To remove object files only, type
# make clean
# To remove object files and the executable, type
# make cleanall
#
# Written by FrancisIrizarry. Operating System Project
CXX := /usr/bin/g++
CXXFLAGS += -Wall -g -std=c++17 -lm
SRCS = $(wildcard *.cpp)
OBJS = $(patsubst %.cpp,%.o,$(SRCS))
PROG = sortToFolder
all: $(PROG)
.PHONY: clean cleanall
clean:
rm -f $(OBJS)
cleanall:
rm -f $(OBJS) $(PROG)
$(PROG): $(OBJS)
$(CXX) -o $(PROG) $(OBJS)
.cpp:
$(CXX) -c $@.cpp $(CXXFLAGS)