[Positioning] Makefile: call prepare before *.o
When compiling in parallel (make -j), the directory 'obj' was sometimes created too late (i.e. after the end of the first compilation, so the .o could not be written on the disk). This is now fixed.
This commit is contained in:
parent
43ca7a3426
commit
55886734d5
|
@ -113,13 +113,13 @@ SOURCE_TESTS = $(OBJ:$(OBJ_DIR)/%.o=$(TESTS_DIR)/%_test.hh)
|
|||
OBJ_TESTS = $(TESTUTIL_OBJ) $(TESTSETUP_OBJ)
|
||||
INCLUDES_TESTS = $(TESTS_DIR)/valuetraits.hh
|
||||
|
||||
all: prepare $(TARGET)
|
||||
all: $(TARGET)
|
||||
|
||||
# Generic targets
|
||||
$(TESTS_DIR)/%.o: $(TESTS_DIR)/%.cc $(TESTS_DIR)/%.hh
|
||||
$(CXX) $(GXXFLAGS) $(TESTSGXXFLAGS) -o $@ -c $<
|
||||
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cc $(SRC_DIR)/%.hh
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cc $(SRC_DIR)/%.hh prepare
|
||||
$(CXX) $(GXXFLAGS) -o $@ -c $<
|
||||
|
||||
%: $(OBJ_DIR)/%.o
|
||||
|
@ -296,6 +296,7 @@ doc:
|
|||
@$(DOXYGEN) $(DOXYFILE)
|
||||
|
||||
prepare:
|
||||
@echo "Preparing compilation..."
|
||||
@$(MKDIR) $(OBJ_DIR)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
|
||||
- Fix Makefile
|
||||
The 'prepare' target *must* be called before the *.o targets.
|
||||
|
||||
- Write a class for Request::type?
|
||||
CalibrationRequest::direction uses a dedicated class Direction, why
|
||||
not Request::type? That would simplify writing of the type to
|
||||
|
|
Loading…
Reference in New Issue