blob: 26607eb883076cb81118f0725695eb1a81787176 [file] [log] [blame]
Matthias Andreas Benkard33147302018-04-09 21:22:22 +02001.PHONY: all clean
2
Matthias Andreas Benkard38610ae2018-04-10 20:39:24 +02003CXX = c++
4LDFLAGS =
5CXXFLAGS = -I.
6
7EXE = exe/hello-world-ng
8
9mod_OBJ = mod/greeting.o
10hello_world_ng_OBJ = exe/hello-world-ng.o
11
12OBJ = $(hello_world_ng_OBJ) $(mod_OBJ)
13
14all: $(EXE)
Matthias Andreas Benkard33147302018-04-09 21:22:22 +020015
16clean:
Matthias Andreas Benkard38610ae2018-04-10 20:39:24 +020017 $(RM) $(OBJ)
18 $(RM) $(EXE)
Matthias Andreas Benkard33147302018-04-09 21:22:22 +020019
Matthias Andreas Benkard38610ae2018-04-10 20:39:24 +020020exe/hello-world-ng: $(hello_world_ng_OBJ) $(mod_OBJ)
Matthias Andreas Benkard33147302018-04-09 21:22:22 +020021 $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
22
23%.o: %.cpp
24 $(CXX) $(CXXFLAGS) -o $@ -c $<