This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MakeFile Issue


Hi all!

i am writing makefile for whole project.I am stuck with one problem.I hope i will get some assistance from you as i got it before also.The problem goes like this:

I have toplevel folder project which contains 20 subdirectories(modules).Project Folder also contains Makefilke which will use all the source files and headers in each of the subdirectory or module to produce object files and then integrating all these object files to produce final target or exe.each module contains source files and header files respective to that module.The problem which i was getting is to how i mention the source files and header files containing in subdirectory 1 or for that matter in subdirectory 2 and so on in toplevel directory.

Note1: I donot want to create a makefile for each module.Instead i want to make only one Makefile which will take all the source files and header files from the respective modules.

Note2: I want to know how i can mention in top level makefile the source files from subdirectory1 or subdirectory 2 so as it can take source files from the respective subdirectories and produce respective targets obviously objectfiles. and how i can mention the object files from the respective folders if it produces so.

Project Folder contains
a)20 subdirectories(modules)Each subdirectory is a module and contains source and header files pretaining to that module.The source file in all these modules doesnot contain main function.There is only one main function in main.c which is containing in top level folder project.
b)MakeFile
c)main.c which contains main() function



Thanks & Regards Parikshat Dubey

_________________________________________________________________
How good are you in a Formula One car? Play now http://server1.msn.co.in/sp05/tataracing/onlinegame.asp



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]