how to recompile a linuxcnc directory?

More
21 Aug 2024 15:27 #308302 by Thayloreing
Hello my friends, I made some changes to create some pins in the halui.cc file that I acquired on github, but I have no idea how to recompile it so that the changes are children, could anyone help me? Maybe give a step-by-step guide on how I can recompile. thank you in advance

Please Log in or Create an account to join the conversation.

More
21 Aug 2024 17:10 #308320 by Aciera
If you want to modify the source code you would need to clone the source code and build linuxcnc locally on your machine (called a 'Run In Place' or 'RIP' installation):
linuxcnc.org/docs/master/html/code/building-linuxcnc.html

Please Log in or Create an account to join the conversation.

More
21 Aug 2024 18:24 #308329 by Thayloreing
and there is no way to just compile this file? just building Linuxcnc from scratch? I'm not very experienced with this, I thought maybe it wouldn't even compile a component, but apparently it's more complicated than I imagined it would be.

Please Log in or Create an account to join the conversation.

More
21 Aug 2024 18:41 #308332 by Aciera
I'm not a expert but to compile this file it needs to link all the #includes so I don't see how that would work without the source code.

In any case doing a RIP installation is not really such a big deal. I work pretty much exclusively with locally built installations, getting all the required build dependencies can be a bit tedious but once you've got past that it's really quite simple.

Please Log in or Create an account to join the conversation.

More
22 Aug 2024 00:14 #308352 by rodw
The build system should just build what you have changed.

Please Log in or Create an account to join the conversation.

More
22 Aug 2024 01:21 #308357 by Thayloreing
I'm going to study the manual, but I've never done it, I'll probably have several questions as I go along, I ask you to be patient with me, but I thank you for taking the time to answer

Please Log in or Create an account to join the conversation.

More
23 Aug 2024 14:56 - 23 Aug 2024 15:01 #308467 by mighty_mick
There are rules in files named 'Makefile'. You can consider to learn how make works. To compile only halui, just do these steps below:

1. Go to your project directory
2. Go to src directory located in your porject root directory
3. run this: make ../bin/halui

You can compile only halui.cc with these steps. But before doing it, be sure you already configured the source tree.

halui executable is being outputted at bin directory in your project root directory. This is why you are should run ../bin/halui rule in Makefile located in your src directory. You can build many single executables with this combination. If you wanna learn what does the Makefile include, just do these:
1. type this to your shell in src directory: make 
2. After typing 'make', press space to give space character
3. Press TAB two times. 

It is gonna show the rules. You can build axis, mdi, milltask, halui, iocontrol etc. in the same way.
Last edit: 23 Aug 2024 15:01 by mighty_mick.
The following user(s) said Thank You: Thayloreing

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum