Creating Makefile

1,003 views
Skip to first unread message

Andrew Hardy

unread,
Sep 19, 2012, 4:31:48 AM9/19/12
to omn...@googlegroups.com
If there is no makefile for some reason in the project

How do I create the makefile 'from the ide'?

there is no menu item named "makemake" like the command line command.

________________________________
Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.

Gregorio Corral

unread,
Sep 19, 2012, 4:40:09 AM9/19/12
to omn...@googlegroups.com
Look at Project properties OMNeT++/Makemake. In any case, for me is very useful follow the command executions by the console tab.

2012/9/19 Andrew Hardy <a.h...@2009.ljmu.ac.uk>


--
--
Sent from the OMNeT++ mailing list. To configure your membership, visit http://groups.google.com/group/omnetpp




Andrew Hardy

unread,
Sep 19, 2012, 4:54:33 AM9/19/12
to omn...@googlegroups.com, Gregorio Corral
Hi,

Thanks for this.

Sorry I don't quite follow your suggestion though. I opened up the
project properties dialog and navigated as you suggest but the app then
just hangs
because ofcourse there is NO makefile. That is the point of my question.

I don't see anything in their that allows me to create the make file.
Can you direct me further?

I had expected it to be done through a menu item, but there are none
named "makemake"


On 19/09/2012 09:40, Gregorio Corral wrote:
> Look at Project properties OMNeT++/Makemake. In any case, for me is very useful follow the command executions by the console tab.
>
> 2012/9/19 Andrew Hardy <a.h...@2009.ljmu.ac.uk<mailto:a.h...@2009.ljmu.ac.uk>>
> --
> --
> Sent from the OMNeT++ mailing list. To configure your membership, visit http://groups.google.com/group/omnetpp
>
>
>
>
>
> --
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2221 / Virus Database: 2441/5276 - Release Date: 09/18/12
>
>
>

Rudolf Hornig

unread,
Sep 19, 2012, 5:20:41 AM9/19/12
to omn...@googlegroups.com
The IDE never read a makefile, it just creates them so it should not just hang because a makefile is missing.
makefiles are automatucally generated for *each* source folder based on the settings in the "makemake" page in the project proerties dialog.

In that page you can set whether a directory have a handwritten or a generated makefile...

If you have for example a 'src' folder that folder will have an automatically generated makefile (during the build process). In this case you have to create a toplevel makefile (i.e. on which is in the project root) MANUALLY. If you don't have a makefile in the project root, copy a makefile there from an other project (just simply create a new project with "src" and "simulation" directories).

Andrew Hardy

unread,
Sep 19, 2012, 5:34:12 AM9/19/12
to omn...@googlegroups.com, Rudolf Hornig

Thanks for that.

This is actually part of the question about no rule to clean and no rule
to build all or target.

It is some one elses machine and I am not in front of it unfortunately,
but if I recall correctly...

There is no src folder and currently no makefile in the project root and
when one executes build project from ide it says
no rule to build target.

This set me thinking there was some reason why it wasn't generating the
make file hence no rule. Hence posting this more specific question.

But maybe there is another reason why.

This machine seems to have a lot of different work spaces in differemt
places in the directory structure and some projects ahve same names or
are the same projects with
different names.

Is there a common path type issue that leads to failure to find a rule
to build / failure to generate makefile?

Andrew


On 19/09/2012 10:20, Rudolf Hornig wrote:
> The IDE never read a makefile, it just creates them so it should not just hang because a makefile is missing.
> makefiles are automatucally generated for *each* source folder based on the settings in the "makemake" page in the project proerties dialog.
>
> In that page you can set whether a directory have a handwritten or a generated makefile...
>
> If you have for example a 'src' folder that folder will have an automatically generated makefile (during the build process). In this case you have to create a toplevel makefile (i.e. on which is in the project root) MANUALLY. If you don't have a makefile in the project root, copy a makefile there from an other project (just simply create a new project with "src" and "simulation" directories).
>
> On Wednesday, September 19, 2012 10:54:37 AM UTC+2, Andrew Hardy wrote:
> Hi,
>
> Thanks for this.
>
> Sorry I don't quite follow your suggestion though. I opened up the
> project properties dialog and navigated as you suggest but the app then
> just hangs
> because ofcourse there is NO makefile. That is the point of my question.
>
> I don't see anything in their that allows me to create the make file.
> Can you direct me further?
>
> I had expected it to be done through a menu item, but there are none
> named "makemake"
>
>
> On 19/09/2012 09:40, Gregorio Corral wrote:
>> Look at Project properties OMNeT++/Makemake. In any case, for me is very useful follow the command executions by the console tab.
>>
>> 2012/9/19 Andrew Hardy <a.h...@2009.ljmu.ac.uk<javascript:><mailto:a.h...@2009.ljmu.ac.uk<javascript:>>>
>> If there is no makefile for some reason in the project
>>
>> How do I create the makefile 'from the ide'?
>>
>> there is no menu item named "makemake" like the command line command.
>>
>> ________________________________
>> Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.
>>
>> --
>> --
>> Sent from the OMNeT++ mailing list. To configure your membership, visit http://groups.google.com/group/omnetpp
>>
>>
>>
>>
>>
>> --
>> --
>> Sent from the OMNeT++ mailing list. To configure your membership,
>> visit http://groups.google.com/group/omnetpp
>>
>>
>>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com<http://www.avg.com>

Rudolf Hornig

unread,
Sep 20, 2012, 5:33:35 AM9/20/12
to omn...@googlegroups.com
You should know two things to have a basic understanding of the build process:
1. When you invoke a build the IDE actually executes a makefile. The makefile's location is specified on: 
    - Project Properties | C/C++ Build | Builder Settings (page)
    - you can see the actual command executed by the IDE and also the directory where it is executed. (by default it is ${ProjDirPath} which stands for the root directory of the project so a makefile MUST be present in that directory.

2. How that makefile gets there is unimportant. You can write it manually (custom makefile) or you can ask the IDE to create one for you (makemake). If you opt to have an automatic makefile the eutomatic makefile generation is configured on:
   - Project Properties | OMNeT++ | Makemake. You have to select the directory in question there and set on the right side whether that directory contains an automatic (makemake) or handwritten (custom) makefile. (you must also signal where your source files are actually located).

There are two commonly used configurations:
 1. the project root has an automatic makefile (makemake) and it is set as the source folder. This is common for simple projects, where you just throw in your code. Most omnet samples are organized this way.

 2. the root of the project has a handwritten (custom) makefile and the project root is excluded (no sources there) + there is a 'src' folder which has a generated makefile and it is set as a source location.

Checking those two dialog should lead to the solution. (the problem is most likely with the makemake page)
Rudolf

Andrew Hardy

unread,
Sep 20, 2012, 7:12:06 AM9/20/12
to omn...@googlegroups.com
Thanks Rudolph.

I shall pass this on to the person I was trying to help.

I am not sure what was going wrong. For me I think the build had always
worked and I had never had cause to delve deeper.


On 20/09/2012 10:33, Rudolf Hornig wrote:
> You should know two things to have a basic understanding of the build process:
> 1. When you invoke a build the IDE actually executes a makefile. The makefile's location is specified on:
> - Project Properties | C/C++ Build | Builder Settings (page)
> - you can see the actual command executed by the IDE and also the directory where it is executed. (by default it is ${ProjDirPath} which stands for the root directory of the project so a makefile MUST be present in that directory.
>
> 2. How that makefile gets there is unimportant. You can write it manually (custom makefile) or you can ask the IDE to create one for you (makemake). If you opt to have an automatic makefile the eutomatic makefile generation is configured on:
> - Project Properties | OMNeT++ | Makemake. You have to select the directory in question there and set on the right side whether that directory contains an automatic (makemake) or handwritten (custom) makefile. (you must also signal where your source files are actually located).
>
> There are two commonly used configurations:
> 1. the project root has an automatic makefile (makemake) and it is set as the source folder. This is common for simple projects, where you just throw in your code. Most omnet samples are organized this way.
>
> 2. the root of the project has a handwritten (custom) makefile and the project root is excluded (no sources there) + there is a 'src' folder which has a generated makefile and it is set as a source location.
>
> Checking those two dialog should lead to the solution. (the problem is most likely with the makemake page)
> Rudolf
>
>>> Checked by AVG - www.avg.com<http://www.avg.com><http://www.avg.com>
>>> Version: 2012.0.2221 / Virus Database: 2441/5276 - Release Date: 09/18/12
>>>
>>>
>>>
>> --
>> --
>> Sent from the OMNeT++ mailing list. To configure your membership,
>> visit http://groups.google.com/group/omnetpp
>>
>>
>>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com<http://www.avg.com>
>> Version: 2012.0.2221 / Virus Database: 2441/5276 - Release Date: 09/18/12
>>
>>
>>
>
> --
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2221 / Virus Database: 2441/5278 - Release Date: 09/19/12
>
>
>

Tayyaba Suleman

unread,
Jan 12, 2023, 2:11:22 PM1/12/23
to OMNeT++ Users
Hi,

Can anyone help me in understanding this error? I am trying to install Omnet++ on ubuntu, and after all the installation process goes correctly when I configure, it says no math C library found and doesn't create the make file. 

Reply all
Reply to author
Forward
0 new messages