Mercurial > nand-ecoscentric
annotate packages/pkgconf/makrules.tst @ 64:c38311975d4f ecos-sw-2000-01-28
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
| author | jlarmour |
|---|---|
| date | Fri, 28 Jan 2000 04:59:39 +0000 |
| parents | 1d7f19c9e4d1 |
| children | bf00f99aec69 |
| rev | line source |
|---|---|
| 0 | 1 #============================================================================= |
| 2 # | |
| 3 # makrules.tst | |
| 4 # | |
| 5 # This file contains generic rules that can be applied to all tests | |
| 6 # directories. | |
| 7 # | |
| 8 #============================================================================= | |
| 9 #####COPYRIGHTBEGIN#### | |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
10 # |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
11 # ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
12 # The contents of this file are subject to the Red Hat eCos Public License |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
13 # Version 1.0 (the "License"); you may not use this file except in |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
14 # compliance with the License. You may obtain a copy of the License at |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
15 # http://sourceware.cygnus.com/ecos |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
16 # |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
17 # Software distributed under the License is distributed on an |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
18 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
19 # License for the specific language governing rights and limitations under |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
20 # the License. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
21 # |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
22 # The Original Code is eCos - Embedded Configurable Operating System, |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
23 # released September 30, 1998. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
24 # |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
25 # The Initial Developer of the Original Code is Red Hat. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
26 # Portions created by Red Hat are |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
27 # Copyright (C) 1998, 1999, 2000 Red Hat, Inc. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
28 # All Rights Reserved. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
29 # ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
4
diff
changeset
|
30 # |
| 0 | 31 #####COPYRIGHTEND#### |
| 32 #============================================================================= | |
| 33 | |
| 34 .PHONY: default build clean | |
| 35 | |
| 36 # Source files can be picked up from the build tree or the component | |
| 37 # repository. This allows copies of the sources to be made in the | |
| 38 # build tree and edited there. | |
| 39 VPATH := . $(COMPONENT_REPOSITORY)/$($(PACKAGE)_DIR)/tests | |
| 40 | |
| 41 # The object files and the dependency files can be deduced mainly | |
| 42 # from the list of tests. | |
| 43 STAMPS := $(foreach target,$(TESTS),$(target).stamp) | |
| 44 OBJECTS := $(STAMPS:.stamp=.o) | |
| 45 OBJECTS := $(foreach obj,$(OBJECTS),$(dir $(obj))$(PACKAGE)_$(notdir $(obj))) | |
| 46 DEPS := $(OBJECTS:.o=.d) $(OTHER_DEPS) | |
| 47 | |
| 48 # The header file search path is as follows: | |
| 49 # | |
| 50 # $(PREFIX)/include | |
| 51 # These headers are what will be used by application code. | |
| 52 # | |
| 53 # . | |
| 54 # Header files private to a package and copied into the build tree. | |
| 55 # | |
| 56 # $(COMPONENT_REPOSITORY)/<package>/src | |
| 57 # Header files private to a package and still in the repository. | |
| 58 # | |
| 59 # It is possible for additional paths to be specified by the user, | |
| 60 # typically by editing the makevars file. Any such search paths take | |
| 61 # precedence over the default path. | |
| 62 | |
| 63 INCLUDE_PATH := $(INCLUDE_PATH) -I$(PREFIX)/include $(foreach dir,$(VPATH),-I$(dir)) | |
| 64 | |
| 65 # These rules cause mostof the work to be done. | |
| 66 build: $(STAMPS) $(OTHER_TESTS) | |
| 67 ifneq ($(strip $(DEPS)),) | |
| 68 @$(CAT) $(DEPS) > makefile.deps | |
| 69 endif | |
| 70 | |
| 71 clean: $(foreach test,$(TESTS),$(test).clean) $(OTHER_CLEAN) | |
| 72 @$(RM) makefile.deps | |
| 73 ifneq ($(strip $(DEPS)),) | |
| 74 @$(RM) $(DEPS) | |
| 75 endif | |
| 76 | |
| 77 # These rules generate a test executable from a single .o file, | |
| 78 # and perform a matching clean-up operation. It is also necessary | |
| 79 # to have dependencies on libtarget.a et al. | |
| 80 | |
| 81 ifneq ($(STAMPS),) | |
| 82 | |
| 83 LIBDEPS := $(wildcard $(PREFIX)/lib/*) | |
| 84 | |
| 85 %.stamp: $(PACKAGE)_%.o $(LIBDEPS) | |
| 2 | 86 ifneq ($(IGNORE_LINK_ERRORS),) |
|
4
1d7f19c9e4d1
Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents:
2
diff
changeset
|
87 -$(CC) -o $(PREFIX)/tests/$(PACKAGE)/$*$(EXEEXT) $< $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -nostdlib |
| 2 | 88 else |
|
4
1d7f19c9e4d1
Merge from eCos master repository on 1999-05-11-21:11:10-BST
jlarmour
parents:
2
diff
changeset
|
89 $(CC) -o $(PREFIX)/tests/$(PACKAGE)/$*$(EXEEXT) $< $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -nostdlib |
| 2 | 90 endif |
| 0 | 91 @$(TOUCH) $@ |
| 92 | |
| 93 %.clean: | |
| 94 $(RM) $(PREFIX)/tests/$(PACKAGE)/$*$(EXEEXT) $(dir $*.o)$(PACKAGE)_$(notdir $*.o) | |
| 95 @$(RM) $*.stamp | |
| 96 endif | |
| 97 | |
| 98 # These file dependencies ensure that all files are rebuilt if | |
| 99 # there is a change to the build environment, e.g. if a different | |
| 100 # compiler is being used. | |
| 101 # | |
| 102 ifneq ($(strip $(OBJECTS)),) | |
| 103 $(OBJECTS) : $(BUILD_TREE)/pkgconf/pkgconf.mak | |
| 104 $(OBJECTS) : $(BUILD_TREE)/pkgconf/makevars $(PACKAGE_RULES_FILE) | |
| 105 endif | |
| 106 | |
| 107 # | |
| 108 # This rule reads in any previously generated dependency information. | |
| 109 # | |
| 110 ifneq ($(wildcard makefile.deps),) | |
| 111 include makefile.deps | |
| 112 endif |
