Makefile File not found

Hi,

I'm having a lot of trouble with a Makefile I am trying to make. I think it is a basic principles issue. When I try to make, I get the error a

buildfiles/bin/serial.o file not found error

And I have gone over this code multiple times. Based on the compiler, I believe the way I reference .cpp files into .o files is correct. Also the way I reference the dependencies is correct. I am trying to do this so that the gloab variables in global.cpp can be included in other files. They are externed in global.h. My makefile is as follows:

SRC_DIR = exospheres/src
INC_DIR = exospheres/include
BIN_OBJ_DIR = buildfiles/bin

CXX = QCC 

CPPFLAGS     += -Wno-deprecated
CXXFLAGS     += -Wno-deprecated

INCLUDES     +=    -I$(INC_DIR) \
                            -I. 

SENSORS                 =     $(SRC_DIR)/serial.cpp

CONTROL                    =        $(SRC_DIR)/ABVCtrl.cpp \
                                        $(SRC_DIR)/ABVstate.cpp \
                                        $(SRC_DIR)/ABV.cpp \
                                        $(SRC_DIR)/global.cpp \
                                        $(SRC_DIR)/ABVControl.cpp

SOURCES_cpp            =     $(SENSORS) \
                                        $(CONTROL) \
                                        $(SRC_DIR)/main.cpp 

OBJECTS_CONTROL       =     $(SOURCES_cpp:$(SRC_DIR)/%.cpp=$(BIN_OBJ_DIR)/%.o) 

$(BIN_OBJ_DIR)/abv:        $(OBJECTS_CONTROL)  
                            $(CXX) -o $@ $(CXXFLAGS) $^

$(OBJECTS_CONTROL): $(INC_DIR) 

.PHONY : clean
clean :
    -rm $(BIN_OBJ_DIR)/abv $(OBJECTS_CONTROL)

I have been struggling with this and am really stumped. This is code for a PC104 board.

The QCC tag indicates a C++ compile for my OS. It should be identical to any makefile other than that.

Thanks much,

Connie

---------- Post updated 04-17-11 at 11:33 AM ---------- Previous update was 04-16-11 at 11:54 PM ----------

Sorry for the double post-I'm really trying to get this resolved. Does anyone have any ideas for this?

If you're sorry for it that means you already know it's against the rules to bump posts and you shouldn't have done it.

I wouldn't do a makefile where you have scripts converting .cpp into .o extensions to tell it what it needs to build. List everything explicitly so you can tell if anything got left out.

Does serial.o end up anywhere, perhaps in the wrong directory?

The original version creates 4 of the .o files in the exospheres/src directory-I'm not sure why just some of them and why that directory.

I've tried adding in:

OBJECTS_CONTROL       =     $(BIN_OBJ_DIR)/serial.o $(BIN_OBJ_DIR)/ABVCtrl.o $(BIN_OBJ_DIR)/ABVstate.o $(BIN_OBJ_DIR)/ABV.o \
                                                $(BIN_OBJ_DIR)/global.o  $(BIN_OBJ_DIR)/ABVControl.o $(BIN_OBJ_DIR)/actuator.o  $(BIN_OBJ_DIR)/thruster.o \
                                                $(BIN_OBJ_DIR)/main.o 

And this gives no object files anywhere.

I tried doing a few litteraly:

OBJECTS_CONTROL: buildfiles/bin/serial.o etc...

with the same result of no object files created.

when I do make -n, the build of buildfiles/bin/abv contains all the correct paths and path names to the supposed object files-they just aren't being created for some reason.