-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 994 Bytes
/
Makefile
File metadata and controls
35 lines (27 loc) · 994 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
# --------------------------------------------------------
# Makefile - versitility to use again for C or C++ files
# 'make' builds executable targets
# 'make numGen' creates random number generator object
# 'make clean' removes all .o and executable files
# --------------------------------------------------------
# the compiler: gcc for C program, define as g++ for C++
CC = g++
# compiler flags:
# -g adds debugging information to the executable file (dSYM files)
# -Wall turns on most, but not all, compiler warnings
# -w inhibits all warning messages
CFLAGS = -w -openmp
# GCC standard support for different C++ dialects (98, 11, 14, 17, or 2a)
STD = -std=c++14
SORTPRGM=mysort
SORTSRC=mysort.cpp
NUMGENPRGM=numGen
NUMGENSRC=randomNumberGen.cpp
all: $(SORTPRGM)
.PHONY: clean
$(SORTPRGM): $(SORTSRC)
$(CC) $(STD) $(CFLAGS) $(SORTSRC) -o $(SORTPRGM)
$(NUMGENPRGM): $(NUMGENSRC)
$(CC) $(STD) $(NUMGENSRC) -o $(NUMGENPRGM)
clean:
rm -rf $(SORTPRGM) $(NUMGENPRGM)