makefiles for projects

Greetings,

I am looking for help with makefile development for a project that I am
working on. I am studying the documentation include with QNXRTP titled
“Appendix: Conventions for Makefiles and Directions” and I am a little
confused. I am wondering if there is any more information available to read?
I have been to the GNU web site and looked at their documentation, but I
didn’t find it to be much help either.

My project organization is as folows:


Some of the questions that I have are:

  • What do I need to put into

Thanks,
~MP

Sorry about that. I prematurely sent that last post. Anyway here is some
more information. I hope that this is clear.

My project organization is as follows. I have attached a file that has my
project directory structure sans source code. It has my makefiles in for
analysis by some kind soul. I have to admit my makefiles look pitiful.

Section1 object file depends on the Section2 object file.
Section4 and Section5 object files depend on the Section3 object file

The Project object file depends on all the Section object files.
I just need to do simple compiling w/ qcc. I don’t need any fancy switches /
flags at this point in time/

Some of the questions that I have are:

  • What do I need to put into common.mk
  • Am I on the right track here?

Thanks again,
~MP


“Michael Polcha” <mikep@metasensors.com> wrote in message
news:9kcbum$hrq$1@inn.qnx.com

Greetings,

I am looking for help with makefile development for a project that I am
working on. I am studying the documentation include with QNXRTP titled
“Appendix: Conventions for Makefiles and Directions” and I am a little
confused. I am wondering if there is any more information available to
read?
I have been to the GNU web site and looked at their documentation, but I
didn’t find it to be much help either.

My project organization is as folows:


Some of the questions that I have are:

  • What do I need to put into

Thanks,
~MP

begin 666 Project.tar.gz
M’XL("!::3L"U!R;VIE8W0N=&%R.V=7U/;1A3%>Q/H9GVH7FHO?^W+WG(
M4-+2%NQBTM<,8R
$#5A$-IU^.YJ)9’8,3&)O-=%YPR#=P;C!P[G:O?^M*O!
M<%SD?[OI:MC;FQA3S&KM7TNMO:QE5)(1D3/<:YY:7Z5X"W2]7ET66]8H
M7SWVOB
]’^J0>/Q’^;YPL^3._Y)W7X0Q5]RJ_-_YOYQ-_F=*Y;/W?_% M*A_2^"^,%8I[_S5C%OX3^O_O3V9(XK_4H?YK)>$_M?^M58&G^*^8#OX;U/\# M\/_T\KV[FM^X;_6?,V:4VNZ_$8W_ADG_?BN%SS^#_WO7T>AT/'IS]O/;OUZ= MG[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YGT3^MU%=O??2
YL?/XG^ ^9_VTO
M)YR_J.)_BN#\[^3".<_8O[_:?Y;7_Y_1?]?2XO]/VGRC_X_\M_DO_WL[Y;_ M]?Z_LAK[?Y((_7_D/^8_WNXK6KC?]\GS_X?^G[ \S/^%/;CG/S[[_M_^YOA? M\E](7==_K<KGOTENX'\2S:\6,W>5_7DT.GM]\DN_>GWY89HOKN;7_K^A[Q:S M^55S>?C^A^HM+_K][[)QX99NE=WZ:8/_-BWR97:=9^]<X?H?_<;I[Z]/_CB> MO#T?7;P8?O!_[FNW6H:/#I^0+U<_;OL,E.?D]9\3UW^C9:S_X#\D_DOJZ[^H MKO\X_X_$?T7M?YU_^$_BOZ;VWYC2?SS_,[7_\78/WL+]'M_D/U,E_\?U/[7_ M^^G]-?X_^OQOU?BO=?G\5X[S/])H?#[Z[?@H8+_J_P"-0 B"( B"( B"( B" 0( B"H&>A_P#+HZ\2,@`````
`
end

Michael Polcha a écrit :

Sorry about that. I prematurely sent that last post. Anyway here is some
more information. I hope that this is clear.

My project organization is as follows. I have attached a file that has my
project directory structure sans source code. It has my makefiles in for
analysis by some kind soul. I have to admit my makefiles look pitiful.

Section1 object file depends on the Section2 object file.
Section4 and Section5 object files depend on the Section3 object file

The Project object file depends on all the Section object files.
I just need to do simple compiling w/ qcc. I don’t need any fancy switches /
flags at this point in time/

Some of the questions that I have are:

  • What do I need to put into common.mk
  • Am I on the right track here?

Thanks again,
~MP

“Michael Polcha” <> mikep@metasensors.com> > wrote in message
news:9kcbum$hrq$> 1@inn.qnx.com> …
Greetings,

I am looking for help with makefile development for a project that I am
working on. I am studying the documentation include with QNXRTP titled
“Appendix: Conventions for Makefiles and Directions” and I am a little
confused. I am wondering if there is any more information available to
read?
I have been to the GNU web site and looked at their documentation, but I
didn’t find it to be much help either.

My project organization is as folows:


Some of the questions that I have are:

  • What do I need to put into

Thanks,
~MP



Name: Project.tar.gz
Project.tar.gz Type: Unix Tape Archive (application/x-tar)
Encoding: x-uuencode

Look at the tgz file. (tar -zxf Project.tgz)

Better to have a common.mk in each section. You would need different libraries,
you would need different flags, Section1 could be a binariy, Section2 could be a
shared library, Section3 a static library, Section4 another binary…

I don’t know if you really wants a binary, in the Project/nto/x86/o directory. I
think that it’s not the usage. Typically, This is your project directory, and
this project could a binary like a server, for example, this server need an API
library, and you can have some test programs. In that case the directory tree
could be:

Project
server
nto
x86
o
server_API
nto
x86
so
prog_test1
nto
x86
o
prog_test2
nto
x86
o

As you can see, Project doesn’t produce an executable. in that case you don’t
have any common.mk in that directory, only a Makefile with ‘include recurse.mk’.


OS, CPU, COMPOUND_VARIANT in your makefiles are not necessary if you respect
Project/Section/os/cpu/variant like Project/Section/nto/x86/o.

The qnx make procedure wants the corresponding use files for every binaries.
This is a file named, for example Section2.use because Section2 will be the name
of the produced binary, and you will find the text written in you Section2.use
by:

use Section2.


This file could be empty, but must exists.

Try this:
$cd Project
$use ./nto/x86/o/Project


Look at the Project/Makefile how to define a make order but as far as I know,
you cannot define the exact order. Maybe not a real problem.

Hope that will help you!
Regards,
Alain.