aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: ccea19304b7e786a868c1fb3b1ca5b11c9b5f514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++11 -O2 -fwrapv

.PHONY: all clean remake

all: roots

clean:
	rm -f roots *.o

remake: clean
	$(MAKE) all


roots: $(patsubst %.cpp,%.o,$(wildcard *.cpp))
	$(CXX) -o $@ $^

%.o: %.cpp $(wildcard *.h)
	$(CXX) $(CXXFLAGS) -c -o $@ $<