|
1 ############################################################################# |
|
2 #! |
|
3 #! This is a tmake template for creating a makefile that invokes make in |
|
4 #! sub directories - for Win32. |
|
5 #! |
|
6 #${ |
|
7 StdInit(); |
|
8 $m = ""; |
|
9 foreach ( split(/\s+/,$project{"SUBDIRS"}) ) { |
|
10 $m = $m . "\tcd $_\n\tDOMAKE\n\t\@cd ..\n"; |
|
11 } |
|
12 $project{"SUBMAKE"} = $m; |
|
13 Project('MAKEFILE') || Project('MAKEFILE = Makefile'); |
|
14 Project('TMAKE') || Project('TMAKE = tmake'); |
|
15 #$} |
|
16 #! |
|
17 # Makefile for building targets in sub directories. |
|
18 # Generated by tmake at #$ Now(); |
|
19 # Project: #$ Expand("PROJECT"); |
|
20 # Template: #$ Expand("TEMPLATE"); |
|
21 ############################################################################# |
|
22 |
|
23 MAKEFILE= #$ Expand("MAKEFILE"); |
|
24 TMAKE = #$ Expand("TMAKE"); |
|
25 |
|
26 SUBDIRS = #$ ExpandList("SUBDIRS"); |
|
27 |
|
28 all: $(SUBDIRS) |
|
29 |
|
30 #${ |
|
31 foreach ( split(/\s+/,$project{"SUBDIRS"}) ) { |
|
32 if ( Project("TMAKE_NOFORCE") ) { |
|
33 $text = $text . $_ . ":\n\t" . |
|
34 "cd $_\n\t\$(MAKE\)\n\t\@cd ..\n\n"; |
|
35 } else { |
|
36 $text = $text . $_ . ": FORCE\n\t" . |
|
37 "cd $_\n\t\$(MAKE\)\n\t\@cd ..\n\n"; |
|
38 } |
|
39 } |
|
40 #$} |
|
41 #$ TmakeSelf(); |
|
42 |
|
43 tmake_all: |
|
44 #${ |
|
45 foreach ( split(/\s+/,$project{"SUBDIRS"}) ) { |
|
46 $text .= "\tcd $_\n\t\$(TMAKE\) $_.pro -o \$(MAKEFILE)\n\t\@cd ..\n"; |
|
47 } |
|
48 #$} |
|
49 |
|
50 clean: |
|
51 #$ $text = $project{"SUBMAKE"}; $text =~ s/DOMAKE/\$(MAKE\) clean/g; |
|
52 #$ Project("TMAKE_NOFORCE") && DisableOutput(); |
|
53 FORCE: |
|
54 #$ Project("TMAKE_NOFORCE") && EnableOutput(); |