-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
26 lines (19 loc) · 716 Bytes
/
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
CXX=g++
CPPFLAGS= -W -Wall -std=c++17 -g -I.
SOURCES:= random.cpp random.h
OBJECTS:= random.cpp
OUTDIR:= bin
all: main diceroll random-bytes code-usage
random.o: $(SOURCES)
$(CXX) $(CPPFLAGS) -c $(OBJECTS)
main: $(SOURCES) main.cpp
$(CXX) $(CPPFLAGS) -o $(OUTDIR)/$@ $(OBJECTS) main.cpp
diceroll: random.o examples/diceroll.cpp
$(CXX) $(CPPFLAGS) -o $(OUTDIR)/diceroll $(OBJECTS) examples/diceroll.cpp
random-bytes: random.o examples/random-bytes.cpp
$(CXX) $(CPPFLAGS) -o $(OUTDIR)/random-bytes $(OBJECTS) examples/random-bytes.cpp
code-usage: random.o examples/code-usage.cpp
$(CXX) $(CPPFLAGS) -o $(OUTDIR)/code-usage $(OBJECTS) examples/code-usage.cpp
.PHONY: clean
clean:
rm -f bin/* *.o *.c~ *.h~