[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
non recursive make
From: |
sharan basappa |
Subject: |
non recursive make |
Date: |
Mon, 23 Apr 2007 14:39:56 +0000 |
I come from hardware background and I am trying to define a framework for
build and compile of
our project. The goal is also to avoid recusrive make. I have a
subdirectories (for modules) where make for that directory are kept.
I would like to know
1) I have module make files in top make file. Is this correct ?
I have seen one document that says that the submodule make include top make
2) I have included paths in the submodule make files (like one/print1.c)
Is there a way to avoid this and automatically add the path since I have to
type
the path manually
3) suggestions to improvise over this
Details
Top directory Top has the following files
TopMake and main.c
subdirectory one has print1.c and module.mk
subdirectory two has print2.c and module.mk
Top/TopMake contents
.PHONY : $(SUBDIRS)
SUBDIRS := one two
main : main.o print1.o print2.o
include $(patsubst %, %/module.mk, $(SUBDIRS))
Top/main.c contents
#include <stdio.h>
int main ()
{
print1 ();
print2 ();
}
Top/one/print1.c
#include <stdio.h>
void print1 ()
{
printf ("I am print1 \n");
}
Top/one/module.mk
print1.o : ./one/print1.c
gcc -c ./one/print1.c
Top/two/print2.c
#include <stdio.h>
void print2 ()
{
printf ("I am print2 \n");
}
Top/two/mdoule.mk
print2.o : ./two/print2.c
gcc -c ./two/print2.c
~
_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian.
http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- non recursive make,
sharan basappa <=