Hi…
(NOTE: The common.mk file follows the questions).
- 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