annotate packages/pkgconf/makrules.src @ 4:1d7f19c9e4d1 ecos-sw-1999-05-11

Merge from eCos master repository on 1999-05-11-21:11:10-BST
author jlarmour
date Tue, 11 May 1999 14:07:25 +0000
parents 443894e2e912
children c38311975d4f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
1 #===============================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
2 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
3 # makrules.src
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
4 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
5 # This file contains generic rules that can be applied to all src
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
6 # directories.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
7 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
8 #===============================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
9 #####COPYRIGHTBEGIN####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
10 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
11 # -------------------------------------------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
12 # The contents of this file are subject to the Cygnus eCos Public License
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
13 # Version 1.0 (the "License"); you may not use this file except in
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
14 # compliance with the License. You may obtain a copy of the License at
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
15 # http://sourceware.cygnus.com/ecos
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
16 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
17 # Software distributed under the License is distributed on an "AS IS"
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
18 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
19 # License for the specific language governing rights and limitations under
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
20 # the License.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
21 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
22 # The Original Code is eCos - Embedded Cygnus Operating System, released
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
23 # September 30, 1998.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
24 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
25 # The Initial Developer of the Original Code is Cygnus. Portions created
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
26 # by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved.
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
27 # -------------------------------------------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
28 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
29 #####COPYRIGHTEND####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
30 #===============================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
31
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
32 .PHONY: default build clean
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
33
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
34 # Source files can be picked up from the build tree or the component
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
35 # repository. This allows copies of the sources to be made in the
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
36 # build tree and edited there.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
37 VPATH := . $(COMPONENT_REPOSITORY)/$($(PACKAGE)_DIR)/src
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
38
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
39 # The object files and the dependency files can be deduced mainly
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
40 # from the list of source files. OTHER_OBJS and OTHER_DEPS are
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
41 # provided as an escape mechanism, as is OTHER_TARGETS.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
42
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
43 OBJECTS := $(COMPILE:.cxx=.o)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
44 OBJECTS := $(OBJECTS:.c=.o)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
45 OBJECTS := $(OBJECTS:.S=.o)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
46 OBJECTS := $(foreach obj,$(OBJECTS),$(dir $(obj))$(PACKAGE)_$(notdir $(obj)))
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
47 DEPS := $(OBJECTS:.o=.d)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
48
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
49 EXTRAS_OBJECTS := $(EXTRAS_COMPILE:.cxx=.o)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
50 EXTRAS_OBJECTS := $(EXTRAS_OBJECTS:.c=.o)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
51 EXTRAS_OBJECTS := $(EXTRAS_OBJECTS:.S=.o)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
52 EXTRAS_OBJECTS := $(foreach obj,$(EXTRAS_OBJECTS),$(dir $(obj))$(PACKAGE)_$(notdir $(obj)))
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
53 DEPS := $(DEPS) $(EXTRAS_OBJECTS:.o=.d)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
54
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
55 OBJECTS := $(OBJECTS) $(OTHER_OBJS)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
56 EXTRAS_OBJECTS := $(EXTRAS_OBJECTS) $(EXTRAS_OTHER_OBJECTS)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
57 DEPS := $(DEPS) $(OTHER_DEPS)
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
58
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
59 # The header file search path is as follows:
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
60 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
61 # $(PREFIX)/include
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
62 # These headers are what will be used by application code.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
63 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
64 # .
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
65 # Header files private to a package and copied into the build tree.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
66 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
67 # $(COMPONENT_REPOSITORY)/<package>/src
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
68 # Header files private to a package and still in the repository.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
69 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
70 # It is possible for additional paths to be specified by the user,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
71 # typically by editing the makevars file. Any such search paths take
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
72 # precedence over the default path.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
73
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
74 INCLUDE_PATH := $(INCLUDE_PATH) -I$(PREFIX)/include $(foreach dir,$(VPATH),-I$(dir))
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
75
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
76 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
77 # This is the default target. It is responsible for updating the library,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
78 # building any special targets, and updating the dependency information.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
79
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
80 build: $(LIBRARY).stamp extras $(OTHER_TARGETS)
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
81 ifneq ($(strip $(DEPS)),)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
82 @$(CAT) $(DEPS) > makefile.deps
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
83 endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
84
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
85
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
86 # Updating the library involves using ar with any object files that
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
87 # have been rebuilt. A few packages may not involve any object files
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
88 # at all.
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
89
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
90 $(LIBRARY).stamp: $(OBJECTS)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
91 ifneq ($(strip $(OBJECTS)),)
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
92 $(AR) rcs $(PREFIX)/lib/$(LIBRARY) $?
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
93 endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
94 $(TOUCH) $@
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
95
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
96 # Updating libextras.a may or may not be a no-op, many packages
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
97 # will not want to put anything there.
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
98 .PHONY: extras
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
99 ifeq ($(strip $(EXTRAS_OBJECTS)),)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
100 extras:
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
101 else
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
102 extras: $(PREFIX)/lib/libextras.a($(EXTRAS_OBJECTS))
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
103 endif
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
104
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
105 # The clean target cleans up the intermediate files, any object
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
106 # files, and any dependency files.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
107
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
108 clean: $(OTHER_CLEAN)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
109 $(RM) $(LIBRARY).stamp
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
110 @$(RM) makefile.deps
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
111 ifneq ($(strip $(OBJECTS)),)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
112 $(RM) $(OBJECTS)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
113 endif
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
114 ifneq ($(strip $(EXTRAS_OBJECTS)),)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
115 $(RM) $(EXTRAS_OBJECTS)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
116 endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
117 ifneq ($(strip $(DEPS)),)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
118 @$(RM) $(DEPS)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
119 endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
120
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
121 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
122 # These file dependencies ensure that all files are rebuilt if
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
123 # there is a change to the build environment, e.g. if a different
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
124 # compiler is being used.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
125 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
126 ifneq ($(strip $(OBJECTS)),)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
127 $(OBJECTS) : $(BUILD_TREE)/pkgconf/pkgconf.mak
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
128 $(OBJECTS) : $(BUILD_TREE)/pkgconf/makevars $(PACKAGE_RULES_FILE)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
129 endif
4
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
130 ifneq ($(strip $(EXTRAS_OBJECTS)),)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
131 $(EXTRAS_OBJECTS) : $(BUILD_TREE)/pkgconf/pkgconf.mak
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
132 $(EXTRAS_OBJECTS) : $(BUILD_TREE)/pkgconf/makevars $(PACKAGE_RULES_FILE)
1d7f19c9e4d1 Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents: 2
diff changeset
133 endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
134 ifneq ($(strip $(OTHER_TARGETS)),)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
135 $(OTHER_TARGETS) : $(BUILD_TREE)/pkgconf/pkgconf.mak
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
136 $(OTHER_TARGETS) : $(BUILD_TREE)/pkgconf/makevars $(PACKAGE_RULES_FILE)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
137 endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
138
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
139 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
140 # This rule reads in any previously generated dependency information.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
141 #
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
142 ifneq ($(wildcard makefile.deps),)
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
143 include makefile.deps
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
144 endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
145
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
146