Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 1 | .PHONY: all clean |
| 2 | |
Matthias Andreas Benkard | 38610ae | 2018-04-10 20:39:24 +0200 | [diff] [blame^] | 3 | CXX = c++ |
| 4 | LDFLAGS = |
| 5 | CXXFLAGS = -I. |
| 6 | |
| 7 | EXE = exe/hello-world-ng |
| 8 | |
| 9 | mod_OBJ = mod/greeting.o |
| 10 | hello_world_ng_OBJ = exe/hello-world-ng.o |
| 11 | |
| 12 | OBJ = $(hello_world_ng_OBJ) $(mod_OBJ) |
| 13 | |
| 14 | all: $(EXE) |
Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 15 | |
| 16 | clean: |
Matthias Andreas Benkard | 38610ae | 2018-04-10 20:39:24 +0200 | [diff] [blame^] | 17 | $(RM) $(OBJ) |
| 18 | $(RM) $(EXE) |
Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 19 | |
Matthias Andreas Benkard | 38610ae | 2018-04-10 20:39:24 +0200 | [diff] [blame^] | 20 | exe/hello-world-ng: $(hello_world_ng_OBJ) $(mod_OBJ) |
Matthias Andreas Benkard | 3314730 | 2018-04-09 21:22:22 +0200 | [diff] [blame] | 21 | $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ |
| 22 | |
| 23 | %.o: %.cpp |
| 24 | $(CXX) $(CXXFLAGS) -o $@ -c $< |