-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
43 lines (33 loc) · 790 Bytes
/
makefile
File metadata and controls
43 lines (33 loc) · 790 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 Mother's Day 2020
CC=g++
CFLAGS=-std=c++11 -Iinclude -Wall
PROGRAM=MothersDay2020.out
OBJECTS = \
Main.o \
src/Words.o \
src/Challenge.o \
src/Game.o \
src/helpers.o \
src/challenges/ReversedWord.o \
src/challenges/InterweavedLetters.o \
src/challenges/NextLetter.o \
src/challenges/NextLetterRandom.o \
src/challenges/RandomSubsitution.o \
src/challenges/ShiftLeftReverse.o \
src/challenges/ShiftRight.o \
src/challenges/SwapHalves.o \
src/challenges/SwappedFirstLast.o \
src/challenges/VowelsToSymbols.o \
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CC) $^ -lreadline -lhistory -o $@
%.o: %.cpp
$(CC) -c $(CFLAGS) $< -o $@
# Run the file
.PHONY: run
run: $(PROGRAM)
./$(PROGRAM)
# Remove all files
.PHONY: clean
clean:
rm -f $(PROGRAM) $(OBJECTS)