Visit The New, Modern Unix Linux Community

Full Discussion: Makefile File not found
Top Forums Shell Programming and Scripting Makefile File not found Post 302514588 by cciarleg on Sunday 17th of April 2011 11:33:49 AM
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:

Code:
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?
 
Test Your Knowledge in Computers #847
Difficulty: Medium
Proximity marketing is the localized wireless distribution of advertising content associated with a particular place.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Makefile autogenerated by shell script for a given .c code file

Hi, I have learned native compilation of basic c code example programs from the net. The issue is, .c code file doesn't come with respective Makefile. Visited some web sites with Makefile manuals but still can not master writing Makefile file to work. The idea is to have intelligent shell... (5 Replies)
Discussion started by: darius2
5 Replies

2. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

3. UNIX for Advanced & Expert Users

Makefile executing another Makefile first?

I have 2 libraries in 2 different directories that I build with Makefiles. library B depends on library A. If I modify a .cpp file in library A and run lib B's Makefile can I have B's makefile to automatically rebuild library A? I am now rebuilding A, followed by B... but I'd like B to... (0 Replies)
Discussion started by: wwuster
0 Replies

4. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

5. Shell Programming and Scripting

Delete a pattern present in file 2 from file 1 if found in file 1.

I have two files File1 ==== 1|2000-00-00|2010-02-02|| 2| 00:00:00|2012-02-24|| 3|2000-00-00|2011-02-02|| File2 ==== 2000-00-00 00:00:00 I want the delete the patterns which are found in file 2 from file 1, Expected output: File1 ==== (5 Replies)
Discussion started by: machomaddy
5 Replies

6. Programming

[Makefile]File + constant problem

Hi guys, I am writing a Makefile with some strange features. What I have is: list of files *.efi list of guids (guid is just a number) one *.efi file is supposed to be used with one guid, so efi file and guid is a pair. What I need is: list of files *.fv How to make *.fv file... (1 Reply)
Discussion started by: Chrisdot
1 Replies

7. Programming

Genrate lib (.a) and binary file (exec) in the same Makefile

Hi there, I have, in my application, one Makefile that generates a .a file. I would like to generate .a and binary executable in the same Makefile. This is possible? Thank you! (2 Replies)
Discussion started by: cayo
2 Replies

8. Solaris

SunOS 5.5.1 usage of Makefile command in make file

I am new to Solaris and compilation using make files. I have a code base which is organized into different folders. At the root folder is a master make file and in the sub directories, there are make files for that particular folder. In the make files present in subdirectories, I am seeing... (2 Replies)
Discussion started by: rajujayanthy
2 Replies

9. Shell Programming and Scripting

How to call .sh file from makefile.am?

in this bin_SCRIPTS = doEcho.sh this command is not working, $(shell ./doEcho.sh ) this is also not working then how to execute it? (1 Reply)
Discussion started by: srikanth007
1 Replies

10. UNIX for Beginners Questions & Answers

How to call .sh file from makefile.am?

I have used $(shell ./doEcho.sh) and also tried bin_SCRIPTS = doEcho.sh but it is not working it is compiling but not executing. I have kept mkdir filename in doEcho.sh (2 Replies)
Discussion started by: srikanth007
2 Replies
XMKMF(1)						      General Commands Manual							  XMKMF(1)

NAME
xmkmf - create a Makefile from an Imakefile SYNOPSIS
xmkmf [ -a ] [ topdir [ curdir ] ] DESCRIPTION
The xmkmf command is the normal way to create a Makefile from an Imakefile shipped with third-party software. When invoked with no arguments in a directory containing an Imakefile, the imake program is run with arguments appropriate for your system (configured into xmkmf when X was built) and generates a Makefile. When invoked with the -a option, xmkmf builds the Makefile in the current directory, and then automatically executes ``make Makefiles'' (in case there are subdirectories), ``make includes'', and ``make depend'' for you. This is the normal way to configure software that is out- side the X Consortium build tree. If working inside the X Consortium build tree (unlikely unless you are an X developer, and even then this option is never really used), the topdir argument should be specified as the relative pathname from the current directory to the top of the build tree. Optionally, curdir may be specified as a relative pathname from the top of the build tree to the current directory. It is necessary to supply curdir if the current directory has subdirectories, or the Makefile will not be able to build the subdirectories. If a topdir is given, xmkmf assumes nothing is installed on your system and looks for files in the build tree instead of using the installed versions. SEE ALSO
imake(1) XFree86 Version 4.7.0 XMKMF(1)

Featured Tech Videos

All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy