No rule to make target *.use...

Hi…

(NOTE: The common.mk file follows the questions).

  1. my common.mk generates the following error:


make[5]: *** No rule to make target
/home/saic/src/chps/drivers/bmsd/saic-nto.use', needed by /home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto’. Stop.

How do I fix this error? What are the rules to generate the *.use
file? Is this an arbitrary file that I write myself?


2. the macros do not get assigned the proper way, I have the directory
structure

/home/saic/src/chps/drivers/bmsd/nto/x86/o

where

COMPOUND_VARIANT should be => o
CPU should be => x86
OS should be => nto
SECTION should be => drivers
PROJECT should be => bmsd
PRODUCT should be => chps

correct?

But they are not. The macro assignments are skewed by one (if you take
a look at the common.mk file below, for example, you’ll notice that
NAME=$(NAME_PREFIX)$(SECTION) and the name results in ‘saic-nto’ which
indicates that SECTION = nto):

COMPOUND_VARIANT =>
CPU => o
OS => x86
SECTION => nto
PROJECT => drivers
PRODUCT => chps

why is this like this? I wonder what have I done wrong? What could I
be missing? All the Makefiles in the directories are as dictated by
Appendix B in the online docs at:

http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/make_convent.html

For example, the file common.mk resides in the
/home/saic/src/chps/drivers/bmsd directory, and the Makefile in this
directory contains:

LIST=OS
include recurse.mk


Thanks for your help…

Miguel.

=============== common.mk =====================
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

use QCC to compile the c++ source

CXX_x86 = QCC -Vgcc_ntox86
LD_x86 = QCC -Vgcc_ntox86


include $(MKFILES_ROOT)/qmacros.mk

################################
NAME_PREFIX = saic-
TINY_NAME_PREFIX = saic-t
#name of executable
NAME=$(NAME_PREFIX)$(SECTION)
#TINY_NAME=$(subst saic-,saic-t,$(NAME))
TINY_NAME=$(subst $(NAME_PREFIX),$(TINY_NAME_PREFIX),$(NAME))

list of generated object files

OBJS = bms.o server.o

add these directory paths

LOCAL_SOURCE_PATH=$(PROJECT_ROOT)/srclib
LOCAL_INCLUDE_PATH=$(PROJECT_ROOT)/include

#EXTRA_INCVPATH+=$(PROJECT_ROOT)/$(SECTION)/include
EXTRA_INCVPATH+=LOCAL_INCLUDE_PATH
#EXTRA_SRCVPATH+=$(PROJECT_ROOT)/$(SECTION)/srclib
EXTRA_SRCVPATH+=LOCAL_SOURCE_PATH

#################################
include $(MKFILES_ROOT)/qtargets.mk

top level rule to compile every thing

all: $(PROJECT)
bms: bms.o

to link the program

$(PROJECT): $(OBJS)
$(LD) $(OBJS) -o $(NAME)

bms.o: $(LOCAL_SOURCE_PATH)/SAICbms.cc $(LOCAL_INCLUDE_PATH)/SAICbms.h
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/SAICbms.cc

server.o: $(LOCAL_SOURCE_PATH)/serverBMS_D.cc
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/serverBMS_D.cc


=============== end ====================



\


my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Add
USEFILE=
to you common.mk

“Miguel Simon” <simon@ou.edu> wrote in message
news:3BBAA2C2.C36CED21@ou.edu

Hi…

(NOTE: The common.mk file follows the questions).

  1. my common.mk generates the following error:


make[5]: *** No rule to make target
/home/saic/src/chps/drivers/bmsd/saic-nto.use', needed by /home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto’. Stop.

How do I fix this error? What are the rules to generate the *.use
file? Is this an arbitrary file that I write myself?


2. the macros do not get assigned the proper way, I have the directory
structure

/home/saic/src/chps/drivers/bmsd/nto/x86/o

where

COMPOUND_VARIANT should be => o
CPU should be => x86
OS should be => nto
SECTION should be => drivers
PROJECT should be => bmsd
PRODUCT should be => chps

correct?

But they are not. The macro assignments are skewed by one (if you take
a look at the common.mk file below, for example, you’ll notice that
NAME=$(NAME_PREFIX)$(SECTION) and the name results in ‘saic-nto’ which
indicates that SECTION = nto):

COMPOUND_VARIANT =
CPU => o
OS => x86
SECTION => nto
PROJECT => drivers
PRODUCT => chps

why is this like this? I wonder what have I done wrong? What could I
be missing? All the Makefiles in the directories are as dictated by
Appendix B in the online docs at:

http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/make_convent.html

For example, the file common.mk resides in the
/home/saic/src/chps/drivers/bmsd directory, and the Makefile in this
directory contains:

LIST=OS
include recurse.mk


Thanks for your help…

Miguel.

=============== common.mk =====================
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

use QCC to compile the c++ source

CXX_x86 = QCC -Vgcc_ntox86
LD_x86 = QCC -Vgcc_ntox86


include $(MKFILES_ROOT)/qmacros.mk

################################
NAME_PREFIX = saic-
TINY_NAME_PREFIX = saic-t
#name of executable
NAME=$(NAME_PREFIX)$(SECTION)
#TINY_NAME=$(subst saic-,saic-t,$(NAME))
TINY_NAME=$(subst $(NAME_PREFIX),$(TINY_NAME_PREFIX),$(NAME))

list of generated object files

OBJS = bms.o server.o

add these directory paths

LOCAL_SOURCE_PATH=$(PROJECT_ROOT)/srclib
LOCAL_INCLUDE_PATH=$(PROJECT_ROOT)/include

#EXTRA_INCVPATH+=$(PROJECT_ROOT)/$(SECTION)/include
EXTRA_INCVPATH+=LOCAL_INCLUDE_PATH
#EXTRA_SRCVPATH+=$(PROJECT_ROOT)/$(SECTION)/srclib
EXTRA_SRCVPATH+=LOCAL_SOURCE_PATH

#################################
include $(MKFILES_ROOT)/qtargets.mk

top level rule to compile every thing

all: $(PROJECT)
bms: bms.o

to link the program

$(PROJECT): $(OBJS)
$(LD) $(OBJS) -o $(NAME)

bms.o: $(LOCAL_SOURCE_PATH)/SAICbms.cc $(LOCAL_INCLUDE_PATH)/SAICbms.h
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/SAICbms.cc

server.o: $(LOCAL_SOURCE_PATH)/serverBMS_D.cc
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/serverBMS_D.cc


=============== end ====================



\


my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Hi…

Alex Chapiro wrote:

Add
USEFILE=
to you common.mk

This worked. Thanks. :slight_smile:

Now I have another problem when linking: when I type make, the errors
bellow happen (the make file at the end of the message). Notice that
the compile line executes fine, but when it tries to link, then ‘make’
uses qcc instead of QCC. What is wrong with the way the make file tries
to link? In any case, how could I force the linking to happen with QCC
instead of qcc??



make[3]: Entering directory /home/saic/src/chps/drivers/bmsd/nto/x86/o' QCC -Vgcc_ntox86 -I /home/saic/src/common/include -c /home/saic/src/chps/drivers/bmsd/srclib/SAICbms.cc QCC -Vgcc_ntox86 -I /home/saic/src/common/include -c /home/saic/src/chps/drivers/bmsd/srclib/serverBMS_D. cc /bin/rm -f /home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto /usr/bin/qcc -Vgcc_ntox86 -o/home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto SAICbms.o serverB MS_D.o -L. -L/x86/lib -L/x86/usr/lib SAICbms.o: In function __static_initialization_and_destruction_0’:
SAICbms.o(.text+0x1e): undefined reference to
std::ios_base::Init::Init(void)' SAICbms.o(.text+0x33): undefined reference to std::ios_base::Init::~Init(void)’
SAICbms.o: In function `std::bad_exception type_info function’:
… many more errors …



My original problem (2) remains still. :frowning:(

  1. the macros do not get assigned the proper way, I have the directory
    structure

/home/saic/src/chps/drivers/bmsd/nto/x86/o

where

COMPOUND_VARIANT should be => o
CPU should be => x86
OS should be => nto
SECTION should be => drivers
PROJECT should be => bmsd
PRODUCT should be => chps

correct?

But they are not. The macro assignments are skewed by one (if you take
a look at the common.mk file below, for example, you’ll notice that
NAME=$(NAME_PREFIX)$(SECTION) and the name results in ‘saic-nto’ which
indicates that SECTION = nto):

COMPOUND_VARIANT =>
CPU => o
OS => x86
SECTION => nto
PROJECT => drivers
PRODUCT => chps

why is this like this? I wonder what have I done wrong? What could I
be missing? All the Makefiles in the directories are as dictated by
Appendix B in the online docs at:

http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/make_convent.html

For example, the file common.mk resides in the
/home/saic/src/chps/drivers/bmsd directory, and the Makefile in this
directory contains:

LIST=OS
include recurse.mk



Thanks for your help…

Miguel.


=============== common.mk =====================
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

use QCC to compile the c++ source

CXX_x86 = QCC -Vgcc_ntox86
LD_x86 = QCC -Vgcc_ntox86

USEFILE=

include $(MKFILES_ROOT)/qmacros.mk

################################
NAME_PREFIX = saic-
TINY_NAME_PREFIX = saic-t
#name of executable
NAME=$(NAME_PREFIX)$(SECTION)
#TINY_NAME=$(subst saic-,saic-t,$(NAME))
TINY_NAME=$(subst $(NAME_PREFIX),$(TINY_NAME_PREFIX),$(NAME))

list of generated object files

OBJS = bms.o server.o

add these directory paths

LOCAL_SOURCE_PATH=$(PROJECT_ROOT)/srclib
LOCAL_INCLUDE_PATH=$(PROJECT_ROOT)/include

#EXTRA_INCVPATH+=$(PROJECT_ROOT)/$(SECTION)/include
EXTRA_INCVPATH+=LOCAL_INCLUDE_PATH
#EXTRA_SRCVPATH+=$(PROJECT_ROOT)/$(SECTION)/srclib
EXTRA_SRCVPATH+=LOCAL_SOURCE_PATH

#################################
include $(MKFILES_ROOT)/qtargets.mk

top level rule to compile every thing

all: $(PROJECT)
bms: bms.o

to link the program

$(PROJECT): $(OBJS)
$(LD_x86) $(OBJS) -o $(NAME)

bms.o: $(LOCAL_SOURCE_PATH)/SAICbms.cc $(LOCAL_INCLUDE_PATH)/SAICbms.h
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/SAICbms.cc

server.o: $(LOCAL_SOURCE_PATH)/serverBMS_D.cc
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/serverBMS_D.cc


=============== end ====================

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

To modify LD command you can just replace

LD_nto_x86_qcc_qcc=QCC -Vgcc_ntox86

I cannot answer to the secnd part of your question from the top of my head,
it could takes a while to find a correct answer…

“Miguel Simon” <simon@ou.edu> wrote in message
news:3BBB2102.57FD0622@ou.edu

Hi…

Alex Chapiro wrote:

Add
USEFILE=
to you common.mk

This worked. Thanks. > :slight_smile:

Now I have another problem when linking: when I type make, the errors
bellow happen (the make file at the end of the message). Notice that
the compile line executes fine, but when it tries to link, then ‘make’
uses qcc instead of QCC. What is wrong with the way the make file tries
to link? In any case, how could I force the linking to happen with QCC
instead of qcc??



make[3]: Entering directory /home/saic/src/chps/drivers/bmsd/nto/x86/o' QCC -Vgcc_ntox86 -I /home/saic/src/common/include -c /home/saic/src/chps/drivers/bmsd/srclib/SAICbms.cc QCC -Vgcc_ntox86 -I /home/saic/src/common/include -c /home/saic/src/chps/drivers/bmsd/srclib/serverBMS_D. cc /bin/rm -f /home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto /usr/bin/qcc -Vgcc_ntox86 -o/home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto SAICbms.o serverB MS_D.o -L. -L/x86/lib -L/x86/usr/lib SAICbms.o: In function __static_initialization_and_destruction_0’:
SAICbms.o(.text+0x1e): undefined reference to
std::ios_base::Init::Init(void)' SAICbms.o(.text+0x33): undefined reference to std::ios_base::Init::~Init(void)’
SAICbms.o: In function `std::bad_exception type_info function’:
… many more errors …



My original problem (2) remains still. > :frowning:> (

  1. the macros do not get assigned the proper way, I have the directory
    structure

/home/saic/src/chps/drivers/bmsd/nto/x86/o

where

COMPOUND_VARIANT should be => o
CPU should be => x86
OS should be => nto
SECTION should be => drivers
PROJECT should be => bmsd
PRODUCT should be => chps

correct?

But they are not. The macro assignments are skewed by one (if you take
a look at the common.mk file below, for example, you’ll notice that
NAME=$(NAME_PREFIX)$(SECTION) and the name results in ‘saic-nto’ which
indicates that SECTION = nto):

COMPOUND_VARIANT =
CPU => o
OS => x86
SECTION => nto
PROJECT => drivers
PRODUCT => chps

why is this like this? I wonder what have I done wrong? What could I
be missing? All the Makefiles in the directories are as dictated by
Appendix B in the online docs at:

http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/make_convent.html

For example, the file common.mk resides in the
/home/saic/src/chps/drivers/bmsd directory, and the Makefile in this
directory contains:

LIST=OS
include recurse.mk



Thanks for your help…

Miguel.


=============== common.mk =====================
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

use QCC to compile the c++ source

CXX_x86 = QCC -Vgcc_ntox86
LD_x86 = QCC -Vgcc_ntox86

USEFILE=

include $(MKFILES_ROOT)/qmacros.mk

################################
NAME_PREFIX = saic-
TINY_NAME_PREFIX = saic-t
#name of executable
NAME=$(NAME_PREFIX)$(SECTION)
#TINY_NAME=$(subst saic-,saic-t,$(NAME))
TINY_NAME=$(subst $(NAME_PREFIX),$(TINY_NAME_PREFIX),$(NAME))

list of generated object files

OBJS = bms.o server.o

add these directory paths

LOCAL_SOURCE_PATH=$(PROJECT_ROOT)/srclib
LOCAL_INCLUDE_PATH=$(PROJECT_ROOT)/include

#EXTRA_INCVPATH+=$(PROJECT_ROOT)/$(SECTION)/include
EXTRA_INCVPATH+=LOCAL_INCLUDE_PATH
#EXTRA_SRCVPATH+=$(PROJECT_ROOT)/$(SECTION)/srclib
EXTRA_SRCVPATH+=LOCAL_SOURCE_PATH

#################################
include $(MKFILES_ROOT)/qtargets.mk

top level rule to compile every thing

all: $(PROJECT)
bms: bms.o

to link the program

$(PROJECT): $(OBJS)
$(LD_x86) $(OBJS) -o $(NAME)

bms.o: $(LOCAL_SOURCE_PATH)/SAICbms.cc $(LOCAL_INCLUDE_PATH)/SAICbms.h
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/SAICbms.cc

server.o: $(LOCAL_SOURCE_PATH)/serverBMS_D.cc
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/serverBMS_D.cc


=============== end ====================

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Hi Alex…

Thanks for your help. I’ll try this later. The second part is not
nearly as important, howver, so I appreciate your help.


Alex Chapiro wrote:

To modify LD command you can just replace

LD_nto_x86_qcc_qcc=QCC -Vgcc_ntox86

this is not a typo, you really mean this, correct?


Regards…

Miguel.




I cannot answer to the secnd part of your question from the top of my head,
it could takes a while to find a correct answer…

“Miguel Simon” <> simon@ou.edu> > wrote in message
news:> 3BBB2102.57FD0622@ou.edu> …
Hi…

Alex Chapiro wrote:

Add
USEFILE=
to you common.mk

This worked. Thanks. > :slight_smile:

Now I have another problem when linking: when I type make, the errors
bellow happen (the make file at the end of the message). Notice that
the compile line executes fine, but when it tries to link, then ‘make’
uses qcc instead of QCC. What is wrong with the way the make file tries
to link? In any case, how could I force the linking to happen with QCC
instead of qcc??



make[3]: Entering directory /home/saic/src/chps/drivers/bmsd/nto/x86/o' QCC -Vgcc_ntox86 -I /home/saic/src/common/include -c /home/saic/src/chps/drivers/bmsd/srclib/SAICbms.cc QCC -Vgcc_ntox86 -I /home/saic/src/common/include -c /home/saic/src/chps/drivers/bmsd/srclib/serverBMS_D. cc /bin/rm -f /home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto /usr/bin/qcc -Vgcc_ntox86 -o/home/saic/src/chps/drivers/bmsd/nto/x86/o/saic-nto SAICbms.o serverB MS_D.o -L. -L/x86/lib -L/x86/usr/lib SAICbms.o: In function __static_initialization_and_destruction_0’:
SAICbms.o(.text+0x1e): undefined reference to
std::ios_base::Init::Init(void)' SAICbms.o(.text+0x33): undefined reference to std::ios_base::Init::~Init(void)’
SAICbms.o: In function `std::bad_exception type_info function’:
… many more errors …



My original problem (2) remains still. > :frowning:> (

  1. the macros do not get assigned the proper way, I have the directory
    structure

/home/saic/src/chps/drivers/bmsd/nto/x86/o

where

COMPOUND_VARIANT should be => o
CPU should be => x86
OS should be => nto
SECTION should be => drivers
PROJECT should be => bmsd
PRODUCT should be => chps

correct?

But they are not. The macro assignments are skewed by one (if you take
a look at the common.mk file below, for example, you’ll notice that
NAME=$(NAME_PREFIX)$(SECTION) and the name results in ‘saic-nto’ which
indicates that SECTION = nto):

COMPOUND_VARIANT =
CPU => o
OS => x86
SECTION => nto
PROJECT => drivers
PRODUCT => chps

why is this like this? I wonder what have I done wrong? What could I
be missing? All the Makefiles in the directories are as dictated by
Appendix B in the online docs at:

http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/make_convent.html

For example, the file common.mk resides in the
/home/saic/src/chps/drivers/bmsd directory, and the Makefile in this
directory contains:

LIST=OS
include recurse.mk



Thanks for your help…

Miguel.


=============== common.mk =====================
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

use QCC to compile the c++ source

CXX_x86 = QCC -Vgcc_ntox86
LD_x86 = QCC -Vgcc_ntox86

USEFILE=

include $(MKFILES_ROOT)/qmacros.mk

################################
NAME_PREFIX = saic-
TINY_NAME_PREFIX = saic-t
#name of executable
NAME=$(NAME_PREFIX)$(SECTION)
#TINY_NAME=$(subst saic-,saic-t,$(NAME))
TINY_NAME=$(subst $(NAME_PREFIX),$(TINY_NAME_PREFIX),$(NAME))

list of generated object files

OBJS = bms.o server.o

add these directory paths

LOCAL_SOURCE_PATH=$(PROJECT_ROOT)/srclib
LOCAL_INCLUDE_PATH=$(PROJECT_ROOT)/include

#EXTRA_INCVPATH+=$(PROJECT_ROOT)/$(SECTION)/include
EXTRA_INCVPATH+=LOCAL_INCLUDE_PATH
#EXTRA_SRCVPATH+=$(PROJECT_ROOT)/$(SECTION)/srclib
EXTRA_SRCVPATH+=LOCAL_SOURCE_PATH

#################################
include $(MKFILES_ROOT)/qtargets.mk

top level rule to compile every thing

all: $(PROJECT)
bms: bms.o

to link the program

$(PROJECT): $(OBJS)
$(LD_x86) $(OBJS) -o $(NAME)

bms.o: $(LOCAL_SOURCE_PATH)/SAICbms.cc $(LOCAL_INCLUDE_PATH)/SAICbms.h
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/SAICbms.cc

server.o: $(LOCAL_SOURCE_PATH)/serverBMS_D.cc
$(CXX_x86) -I /home/saic/src/common/include -c
$(LOCAL_SOURCE_PATH)/serverBMS_D.cc


=============== end ====================

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Hi…

make with common.mk works as advertised in the docs. :slight_smile:

However, as I said before, in my case, the SECTOR, PROJECT, PRODUCT
macros do not get set properly, but they are not essential.

Alex Chapiro wrote:

To modify LD command you can just replace

LD_nto_x86_qcc_qcc=QCC -Vgcc_ntox86

This did the trick. Thanks.

Regards.

Miguel.


\


my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com