File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ run: $(TARGETS)
5757.PHONY : r
5858r : run
5959
60- $(BUILD_DIR ) /% .o : src/ % .cpp
60+ $(BUILD_DIR ) /% .o : % .cpp
6161 @mkdir --parents $(shell dirname $@ )
6262 $(CXX ) $(CXXFLAGS ) -MMD -MF $(@:.o=.d ) -c -o $@ $<
6363
64- $(BUILD_DIR ) /% .o : src/ % .c
64+ $(BUILD_DIR ) /% .o : % .c
6565 @mkdir --parents $(shell dirname $@ )
6666 $(CC ) $(CFLAGS ) -MMD -MF $(@:.o=.d ) -c -o $@ $<
6767
Original file line number Diff line number Diff line change @@ -3,13 +3,11 @@ TARGETS = \
33 $(TARGET_DIR ) /cpp-example
44
55DEPS := src/c-example.c src/example.c
6- DEPS := $(DEPS:src/%.c=$(BUILD_DIR ) /%.o )
7- $(TARGET_DIR ) /c-example : $(DEPS )
6+ $(TARGET_DIR ) /c-example : $(DEPS:%.c=$(BUILD_DIR ) /%.o )
87 @mkdir --parents $(shell dirname $@ )
98 $(CC ) -o $@ $^ $(LDFLAGS )
109
1110DEPS := src/cpp-example.cpp
12- DEPS := $(DEPS:src/%.cpp=$(BUILD_DIR ) /%.o )
13- $(TARGET_DIR ) /cpp-example : $(DEPS )
11+ $(TARGET_DIR ) /cpp-example : $(DEPS:%.cpp=$(BUILD_DIR ) /%.o )
1412 @mkdir --parents $(shell dirname $@ )
1513 $(CXX ) -o $@ $^ $(LDFLAGS )
You can’t perform that action at this time.
0 commit comments