65d0ecdef7
this ensures "make sitl-heli" rebuilds after a "make sitl" Thanks to Michael Oborne for reporting this
39 lines
994 B
Makefile
39 lines
994 B
Makefile
|
|
#
|
|
# Build sketch objects
|
|
#
|
|
SKETCH_INCLUDES = $(SKETCHLIBINCLUDES)
|
|
|
|
$(BUILDROOT)/%.o: $(BUILDROOT)/%.cpp
|
|
$(RULEHDR)
|
|
$(v)$(CXX) $(CXXFLAGS) -c -o $@ $< -I$(SRCROOT) $(SKETCH_INCLUDES)
|
|
|
|
$(BUILDROOT)/%.o: $(BUILDROOT)/make.flags $(SRCROOT)/%.cpp
|
|
$(RULEHDR)
|
|
$(v)$(CXX) $(CXXFLAGS) -c -o $@ $*.cpp $(SKETCH_INCLUDES)
|
|
|
|
$(BUILDROOT)/%.o: $(SRCROOT)/%.c
|
|
$(RULEHDR)
|
|
$(v)$(CC) $(CFLAGS) -c -o $@ $< $(SKETCH_INCLUDES)
|
|
|
|
$(BUILDROOT)/%.o: $(SRCROOT)/%.S
|
|
$(RULEHDR)
|
|
$(v)$(AS) $(ASFLAGS) -c -o $@ $< $(SKETCH_INCLUDES)
|
|
|
|
#
|
|
# Build library objects from sources in the sketchbook
|
|
#
|
|
SLIB_INCLUDES = -I$(dir $<)/utility $(SKETCHLIBINCLUDES)
|
|
|
|
$(BUILDROOT)/libraries/%.o: $(SKETCHBOOK)/libraries/%.cpp
|
|
$(RULEHDR)
|
|
$(v)$(CXX) $(CXXFLAGS) -c -o $@ $< $(SLIB_INCLUDES)
|
|
|
|
$(BUILDROOT)/libraries/%.o: $(SKETCHBOOK)/libraries/%.c
|
|
$(RULEHDR)
|
|
$(v)$(CC) $(CFLAGS) -c -o $@ $< $(SLIB_INCLUDES)
|
|
|
|
$(BUILDROOT)/libraries/%.o: $(SKETCHBOOK)/libraries/%.S
|
|
$(RULEHDR)
|
|
$(v)$(AS) $(ASFLAGS) -c -o $@ $< $(SLIB_INCLUDES)
|