# new to linux...makefiles & kdevelop

This topic is 3329 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
I tried this before and I ended up using the automake facilities of KDevelop. It seemed the easiest way. The project contains of source files spread across different directories, using sources which are synchronized over svn with an MSVC project (I didn't set up the svn control as part of the KDevelop project).

You will need to create a new automake based project.
Then use the automake tool.

Read from the link above onwards to first add new files and become familiar with the concept.
The menu entry "Create automake and friends" should take care of building the makefiles in the background.

Try to link against libraries by looking at the Library FAQ. Add some code to use the linked library/ies. Compile this simple new project.
Try to add a subfolder and the files contained in it.

When this works try a new automake project and add your existing sources using the automake manager.

Please report if you can make any progress.

##### Share on other sites
Quote:
 all of the makefile tutorials I have found are saying you have to list every single .cpp file in your project. This is a bit of work since I have about 40-50 .cpp files, all in 3 or 4 different directories.

Yes, you have to list them, or just use a special rule that will apply to all files with the same extension:
.cpp.o:	$(CPP) -c$(ANY_OPTIONS_YOU_LIKE) $*.cpp.c.o:$(CC) -c $(ANY_OPTIONS_AGAIN)$*.c

This will just apply the commands above to all .cpp and .c files producing .o files.
[biased comment]But, frankly, I'd just create a project with all files with CodeBlocks or QTCreator and let it roll..[/biased comment]

##### Share on other sites
It shouldn't take you to long to add files from just 3,4 directories. Multiple file add is possible afaik.

1. 1
2. 2
Rutin
22
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 29
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
631775
• Total Posts
3002278
×