.PHONY: all clean | |
CXX = c++ | |
LDFLAGS = | |
CXXFLAGS = -I. | |
EXE = exe/hello-world-ng | |
mod_OBJ = mod/greeting.o | |
hello_world_ng_OBJ = exe/hello-world-ng.o | |
OBJ = $(hello_world_ng_OBJ) $(mod_OBJ) | |
all: $(EXE) | |
clean: | |
$(RM) $(OBJ) | |
$(RM) $(EXE) | |
exe/hello-world-ng: $(hello_world_ng_OBJ) $(mod_OBJ) | |
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ | |
%.o: %.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< |