Revision: | 1.5 |
Committed: | Wed Feb 2 19:49:16 2011 UTC (12 years, 7 months ago) by arta |
Branch: | MAIN |
CVS Tags: | Ver_6-0, Ver_6-1, Ver_6-2, Ver_6-3, Ver_6-4, Ver_LATEST, NetDRMS_Ver_8-12, Ver_9-41, Ver_DRMSLATEST, Ver_9-5, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, NetDRMS_Ver_2-6, NetDRMS_Ver_2-7, NetDRMS_Ver_LATEST, NetDRMS_Ver_8-8, NetDRMS_Ver_8-10, NetDRMS_Ver_8-11, NetDRMS_Ver_8-4, NetDRMS_Ver_8-5, NetDRMS_Ver_8-6, NetDRMS_Ver_8-7, NetDRMS_Ver_8-0, NetDRMS_Ver_8-1, NetDRMS_Ver_8-2, NetDRMS_Ver_8-3, Ver_8-8, Ver_8-2, Ver_8-3, Ver_8-0, Ver_8-1, Ver_8-6, Ver_8-7, Ver_8-4, Ver_8-5, Ver_7-0, Ver_8-10, Ver_8-11, Ver_8-12, NetDRMS_Ver_6-4, NetDRMS_Ver_6-2, NetDRMS_Ver_6-3, NetDRMS_Ver_6-0, NetDRMS_Ver_6-1, Ver_5-14, Ver_5-13, NetDRMS_Ver_9-9, NetDRMS_Ver_9-41, NetDRMS_Ver_9-1, NetDRMS_Ver_9-0, NetDRMS_Ver_9-3, NetDRMS_Ver_9-2, NetDRMS_Ver_9-5, NetDRMS_Ver_9-4, Ver_7-1, NetDRMS_Ver_7-1, NetDRMS_Ver_7-0 |
Changes since 1.4: | +1 -1 lines |
Log Message: | Source configure and make changes that allow users to checkout NetDRMS plus specified proj directories. |
# | Content |
---|---|
1 | # Note: this design uses target-specific flags, because it's the only |
2 | # way to get the value of a variable that's different for each |
3 | # subdirectory, $(d), into the build recipes. Once you go that way, |
4 | # you can as well use the feature to specify (extra) objects and |
5 | # libraries to be linked or archived. |
6 | |
7 | |
8 | # Standard stuff |
9 | |
10 | .SUFFIXES: |
11 | .SUFFIXES: .c .o |
12 | |
13 | all: targets |
14 | |
15 | # Subdirectories, in random order |
16 | |
17 | dir := base |
18 | -include $(SRCDIR)/$(dir)/Rules.mk |
19 | dir := proj |
20 | -include $(SRCDIR)/$(LOCALIZATIONDIR)/Rules.mk |
21 | |
22 | # Non-default targets |
23 | idl: $(LIBJSOC_MAIN_SOCK_I) |
24 | dsds: $(LIBSOIJSOC) $(LIBDSDS) |
25 | examples: $(EXAMPLES) |
26 | sums: $(SUMS_BIN) |
27 | universe: targets idl dsds examples sums $(LIBDSPUTIL) |
28 | |
29 | # General directory-independent flags (MUST BE DEFINED BEFORE THE SECTION |
30 | # "General directory-independent rules" |
31 | $(FPICOBJ): CF_TGT := $(CF_TGT) -fPIC |
32 | |
33 | $(FIOBJ): CF_TGT := $(CF_TGT) -DFLIB |
34 | |
35 | $(IIOBJ): CF_TGT := $(CF_TGT) -DIDLLIB |
36 | |
37 | # General directory-independent rules |
38 | %.c: %.pgc |
39 | $(ECPG) |
40 | %.c: %.i |
41 | $(SWIG) |
42 | |
43 | %.o: %.f |
44 | $(FCOMP) |
45 | |
46 | %.o: %.f90 |
47 | $(FCOMP) |
48 | |
49 | # If a .f file is to be compiled more than one, the Rules.mk file that |
50 | # contains the rules for that .f file exists in a subdirectory of the |
51 | # directory that contains the .f file. As a result, the stem of the |
52 | # of the corresponding .o file is the child of the stem of the .f file. |
53 | %.o: ../%.f |
54 | $(FCOMP) |
55 | |
56 | %.o: ../%.f90 |
57 | $(FCOMP) |
58 | |
59 | %.o: %.c |
60 | $(COMP) |
61 | |
62 | # If a .c file is to be compiled more than one, the Rules.mk file that |
63 | # contains the rules for that .c file exists in a subdirectory of the |
64 | # directory that contains the .c file. As a result, the stem of the |
65 | # of the corresponding .o file is the child of the stem of the .c file. |
66 | %.o: ../%.c |
67 | $(COMP) |
68 | |
69 | %: %.o |
70 | $(LINK) |
71 | |
72 | %: %.c |
73 | $(COMPLINK) |
74 | |
75 | |
76 | # These two targets collect real targets, i.e. ones that can be built. |
77 | |
78 | .PHONY: targets |
79 | targets: $(TGT_BIN) $(TGT_LIB) |
80 | |
81 | # These targets merely contain commands to be executed, i.e. they collect |
82 | # only .PHONY targets, even if they're not explicitly marked as such. |
83 | # The install target does not collect dependencies (other than for forcing |
84 | # things to be built) because it's always considered 'out of date' anway as |
85 | # it's a .PHONY target. Instead, it collects installation commands that will be |
86 | # ran in addition to the standard ones to install the known targets. |
87 | |
88 | .PHONY: clean |
89 | clean: |
90 | rm -f $(CLEAN) |
91 | |
92 | # Prevent make from removing any build targets, including intermediate ones |
93 | |
94 | .SECONDARY: $(CLEAN) |
95 |