blob: 99484a6b6a6cd413cec98ca0b27a19be33d91d3b [file] [log] [blame]
Johnny Chen9bc867a2010-08-23 23:56:08 +00001#----------------------------------------------------------------------
2# Clients fill in the source files to build
3#----------------------------------------------------------------------
4# C_SOURCES := main.c
5# CXX_SOURCES :=
6# OBJC_SOURCES :=
7# OBJCXX_SOURCES :=
8# DYLIB_C_SOURCES :=
Johnny Chene9f97702012-01-11 01:42:58 +00009# DYLIB_CXX_SOURCES :=
10#
11# Specifying DYLIB_ONLY has the effect of building dylib only, skipping
12# the building of the a.out executable program. For example,
13# DYLIB_ONLY := YES
14#
Johnny Chen64a7e742012-01-17 00:58:08 +000015# Also might be of interest:
Johnny Chen4876b5f2012-01-11 01:59:55 +000016# FRAMEWORK_INCLUDES (Darwin only) :=
17# CFLAGS_EXTRAS :=
18# LD_EXTRAS :=
Michael Sartain802b0552013-07-02 18:13:13 +000019# SPLIT_DEBUG_SYMBOLS := YES
Johnny Chen64a7e742012-01-17 00:58:08 +000020#
21# And test/functionalities/archives/Makefile:
22# MAKE_DSYM := NO
23# ARCHIVE_NAME := libfoo.a
24# ARCHIVE_C_SOURCES := a.c b.c
Johnny Chen9bc867a2010-08-23 23:56:08 +000025
26# Uncomment line below for debugging shell commands
27# SHELL = /bin/sh -x
28
29#----------------------------------------------------------------------
Johnny Chen6c17c082010-09-16 20:54:06 +000030# If ARCH is not defined, default to x86_64.
Peter Collingbourne518f03d2011-06-20 19:06:04 +000031# If OS is not defined, use 'uname -s' to determine the OS name.
Johnny Chen6c17c082010-09-16 20:54:06 +000032#----------------------------------------------------------------------
33ifeq "$(ARCH)" ""
34 ARCH = x86_64
35endif
36
Peter Collingbourne518f03d2011-06-20 19:06:04 +000037ifeq "$(OS)" ""
38 OS = $(shell uname -s)
39endif
40
Johnny Chen6c17c082010-09-16 20:54:06 +000041#----------------------------------------------------------------------
Johnny Chen597cbbb2011-08-23 21:54:10 +000042# CC defaults to clang.
Johnny Chen4ab4a9b2011-08-24 18:12:53 +000043#
44# If you change the defaults of CC, be sure to also change it in the file
45# test/plugins/builder_base.py, which provides a Python way to return the
46# value of the make variable CC -- getCompiler().
47#
Johnny Chen6055b442011-01-14 20:55:13 +000048# See also these functions:
49# o cxx_compiler
50# o cxx_linker
Johnny Chend43e2082011-01-14 20:46:49 +000051#----------------------------------------------------------------------
Johnny Chen597cbbb2011-08-23 21:54:10 +000052CC ?= clang
Johnny Chend43e2082011-01-14 20:46:49 +000053ifeq "$(CC)" "cc"
Johnny Chen597cbbb2011-08-23 21:54:10 +000054 CC = clang
Johnny Chend43e2082011-01-14 20:46:49 +000055endif
56
57#----------------------------------------------------------------------
Daniel Malea2745d842013-01-25 00:31:48 +000058# ARCHFLAG is the flag used to tell the compiler which architecture
59# to compile for. The default is the flag that clang accepts.
60#----------------------------------------------------------------------
61ARCHFLAG ?= -arch
62
63#----------------------------------------------------------------------
Johnny Chen9bc867a2010-08-23 23:56:08 +000064# Change any build/tool options needed
65#----------------------------------------------------------------------
Peter Collingbourne518f03d2011-06-20 19:06:04 +000066ifeq "$(OS)" "Darwin"
Greg Clayton3bffb082011-12-10 02:15:28 +000067 DS := dsymutil
Peter Collingbourne518f03d2011-06-20 19:06:04 +000068 DSFLAGS =
69 DSYM = $(EXE).dSYM
Johnny Chenfe141622012-01-12 23:09:42 +000070 AR := libtool
71 ARFLAGS := -static -o
Daniel Malea2745d842013-01-25 00:31:48 +000072else
73 # On non-Apple platforms, -arch becomes -m
74 ARCHFLAG := -m
75
76 # i386 becomes 32, and x86_64 becomes 64
77 ifeq "$(ARCH)" "x86_64"
78 override ARCH := $(subst x86_64,64,$(ARCH))
79 endif
80 ifeq "$(ARCH)" "i386"
81 override ARCH := $(subst i386,32,$(ARCH))
82 endif
Michael Sartain802b0552013-07-02 18:13:13 +000083
84 ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
85 DSYM = $(EXE).debug
86 endif
Peter Collingbourne518f03d2011-06-20 19:06:04 +000087endif
88
Greg Claytone595c6b2013-02-28 18:47:39 +000089CFLAGS ?= -g -O0
Daniel Malea2745d842013-01-25 00:31:48 +000090CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS)
91
Johnny Chen53e2edb2011-08-09 20:07:16 +000092CXXFLAGS +=$(CFLAGS)
93LD = $(CC)
94LDFLAGS ?= $(CFLAGS)
Daniel Malea2745d842013-01-25 00:31:48 +000095LDFLAGS += $(LD_EXTRAS)
Johnny Chen53e2edb2011-08-09 20:07:16 +000096OBJECTS =
97EXE ?= a.out
98
Peter Collingbourne518f03d2011-06-20 19:06:04 +000099ifneq "$(DYLIB_NAME)" ""
100 ifeq "$(OS)" "Darwin"
101 DYLIB_FILENAME = lib$(DYLIB_NAME).dylib
102 else
103 DYLIB_FILENAME = lib$(DYLIB_NAME).so
104 endif
105endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000106
Johnny Chenbdb4efc2011-01-14 18:19:53 +0000107# Function that returns the counterpart C++ compiler, given $(CC) as arg.
Greg Claytonb39751b2013-11-22 21:05:25 +0000108cxx_compiler_notdir = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring icc,$(1)), $(subst icc,icpc,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))))
109cxx_compiler = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_compiler_notdir,$(notdir $(1)))),$(call cxx_compiler_notdir,$(1)))
Johnny Chenbdb4efc2011-01-14 18:19:53 +0000110
111# Function that returns the C++ linker, given $(CC) as arg.
Greg Claytonb39751b2013-11-22 21:05:25 +0000112cxx_linker_notdir = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring icc,$(1)), $(subst icc,icpc,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))))
113cxx_linker = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_linker_notdir,$(notdir $(1)))),$(call cxx_linker_notdir,$(1)))
Johnny Chen832d2332010-09-30 01:22:34 +0000114
Johnny Chen9bc867a2010-08-23 23:56:08 +0000115#----------------------------------------------------------------------
Daniel Maleac7ffa7a2013-06-05 19:32:34 +0000116# C++ standard library options
117#----------------------------------------------------------------------
118ifeq (1,$(USE_LIBSTDCPP))
119 # Clang requires an extra flag: -stdlib=libstdc++
120 ifneq (,$(findstring clang,$(CC)))
Enrico Granataa1acb492013-06-07 01:58:52 +0000121 CXXFLAGS += -stdlib=libstdc++
Daniel Maleac7ffa7a2013-06-05 19:32:34 +0000122 LDFLAGS += -stdlib=libstdc++
123 endif
124endif
125
Greg Clayton1767a732013-06-13 21:27:14 +0000126ifeq (1,$(USE_LIBCPP))
127 # Clang requires an extra flag: -stdlib=libstdc++
128 ifneq (,$(findstring clang,$(CC)))
129 CXXFLAGS += -stdlib=libc++
130 LDFLAGS += -stdlib=libc++
131 endif
132endif
133
Daniel Maleac7ffa7a2013-06-05 19:32:34 +0000134#----------------------------------------------------------------------
Johnny Chen9bc867a2010-08-23 23:56:08 +0000135# dylib settings
136#----------------------------------------------------------------------
137ifneq "$(strip $(DYLIB_C_SOURCES))" ""
138 DYLIB_OBJECTS +=$(strip $(DYLIB_C_SOURCES:.c=.o))
139endif
140
Sean Callanan72772842012-02-22 23:57:45 +0000141ifneq "$(strip $(DYLIB_OBJC_SOURCES))" ""
142 DYLIB_OBJECTS +=$(strip $(DYLIB_OBJC_SOURCES:.m=.o))
143endif
144
Greg Claytond50d2382012-01-10 00:00:15 +0000145ifneq "$(strip $(DYLIB_CXX_SOURCES))" ""
146 DYLIB_OBJECTS +=$(strip $(DYLIB_CXX_SOURCES:.cpp=.o))
147 CXX = $(call cxx_compiler,$(CC))
148 LD = $(call cxx_linker,$(CC))
149endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000150
151#----------------------------------------------------------------------
152# Check if we have any C source files
153#----------------------------------------------------------------------
154ifneq "$(strip $(C_SOURCES))" ""
155 OBJECTS +=$(strip $(C_SOURCES:.c=.o))
156endif
157
158#----------------------------------------------------------------------
159# Check if we have any C++ source files
160#----------------------------------------------------------------------
161ifneq "$(strip $(CXX_SOURCES))" ""
162 OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
Johnny Chen832d2332010-09-30 01:22:34 +0000163 CXX = $(call cxx_compiler,$(CC))
Johnny Chenbdb4efc2011-01-14 18:19:53 +0000164 LD = $(call cxx_linker,$(CC))
Johnny Chen9bc867a2010-08-23 23:56:08 +0000165endif
166
167#----------------------------------------------------------------------
168# Check if we have any ObjC source files
169#----------------------------------------------------------------------
170ifneq "$(strip $(OBJC_SOURCES))" ""
171 OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
172 LDFLAGS +=-lobjc
173endif
174
175#----------------------------------------------------------------------
176# Check if we have any ObjC++ source files
177#----------------------------------------------------------------------
178ifneq "$(strip $(OBJCXX_SOURCES))" ""
179 OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
Johnny Chen832d2332010-09-30 01:22:34 +0000180 CXX = $(call cxx_compiler,$(CC))
Johnny Chenbdb4efc2011-01-14 18:19:53 +0000181 LD = $(call cxx_linker,$(CC))
Johnny Chen8da4ddf2012-04-24 23:05:07 +0000182 ifeq "$(findstring lobjc,$(LDFLAGS))" ""
Johnny Chen9bc867a2010-08-23 23:56:08 +0000183 LDFLAGS +=-lobjc
184 endif
185endif
186
Johnny Chenfe141622012-01-12 23:09:42 +0000187#----------------------------------------------------------------------
188# Check if we have any C source files for archive
189#----------------------------------------------------------------------
190ifneq "$(strip $(ARCHIVE_C_SOURCES))" ""
191 ARCHIVE_OBJECTS +=$(strip $(ARCHIVE_C_SOURCES:.c=.o))
192endif
193
194#----------------------------------------------------------------------
195# Check if we have any C++ source files for archive
196#----------------------------------------------------------------------
197ifneq "$(strip $(ARCHIVE_CXX_SOURCES))" ""
198 ARCHIVE_OBJECTS +=$(strip $(ARCHIVE_CXX_SOURCES:.cpp=.o))
199 CXX = $(call cxx_compiler,$(CC))
200 LD = $(call cxx_linker,$(CC))
201endif
202
203#----------------------------------------------------------------------
204# Check if we have any ObjC source files for archive
205#----------------------------------------------------------------------
206ifneq "$(strip $(ARCHIVE_OBJC_SOURCES))" ""
207 ARCHIVE_OBJECTS +=$(strip $(ARCHIVE_OBJC_SOURCES:.m=.o))
208 LDFLAGS +=-lobjc
209endif
210
211#----------------------------------------------------------------------
212# Check if we have any ObjC++ source files for archive
213#----------------------------------------------------------------------
214ifneq "$(strip $(ARCHIVE_OBJCXX_SOURCES))" ""
215 ARCHIVE_OBJECTS +=$(strip $(ARCHIVE_OBJCXX_SOURCES:.mm=.o))
216 CXX = $(call cxx_compiler,$(CC))
217 LD = $(call cxx_linker,$(CC))
Johnny Chen8da4ddf2012-04-24 23:05:07 +0000218 ifeq "$(findstring lobjc,$(LDFLAGS))" ""
Johnny Chenfe141622012-01-12 23:09:42 +0000219 LDFLAGS +=-lobjc
220 endif
221endif
222
Matt Kopecf2430f52013-07-24 21:39:24 +0000223#----------------------------------------------------------------------
224# Check if we are compiling with gcc 4.6
225#----------------------------------------------------------------------
226ifneq (,$(filter g++,$(CXX)))
227 CXXVERSION = $(shell g++ -dumpversion | cut -b 1-3)
228 ifeq "$(CXXVERSION)" "4.6"
229 # GCC 4.6 cannot handle -std=c++11, so replace it with -std=c++0x
230 # instead. FIXME: remove once GCC version is upgraded.
231 override CXXFLAGS := $(subst -std=c++11,-std=c++0x,$(CXXFLAGS))
232 endif
233endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000234
235#----------------------------------------------------------------------
Johnny Chenbeac8f92012-01-10 00:41:11 +0000236# DYLIB_ONLY variable can be used to skip the building of a.out.
237# See the sections below regarding dSYM file as well as the building of
238# EXE from all the objects.
239#----------------------------------------------------------------------
240
241#----------------------------------------------------------------------
Johnny Chen9bc867a2010-08-23 23:56:08 +0000242# Make the dSYM file from the executable if $(MAKE_DSYM) != "NO"
243#----------------------------------------------------------------------
Matt Kopec7663b3a2013-09-25 17:44:00 +0000244ifneq "$(DYLIB_ONLY)" "YES"
Michael Sartain802b0552013-07-02 18:13:13 +0000245$(DSYM) : $(EXE)
Peter Collingbourne518f03d2011-06-20 19:06:04 +0000246ifeq "$(OS)" "Darwin"
Johnny Chen91016392011-06-20 20:08:26 +0000247ifneq "$(MAKE_DSYM)" "NO"
Johnny Chen9bc867a2010-08-23 23:56:08 +0000248 $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
Johnny Chen91016392011-06-20 20:08:26 +0000249endif
Michael Sartain802b0552013-07-02 18:13:13 +0000250else
251ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
Michael Sartain802b0552013-07-02 18:13:13 +0000252 objcopy --only-keep-debug "$(EXE)" "$(DSYM)"
253 objcopy --strip-debug --add-gnu-debuglink="$(DSYM)" "$(EXE)" "$(EXE)"
254endif
255endif
Johnny Chenbeac8f92012-01-10 00:41:11 +0000256endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000257
258#----------------------------------------------------------------------
259# Compile the executable from all the objects.
260#----------------------------------------------------------------------
Johnny Chenbeac8f92012-01-10 00:41:11 +0000261ifneq "$(DYLIB_NAME)" ""
262ifeq "$(DYLIB_ONLY)" ""
Johnny Chenfe141622012-01-12 23:09:42 +0000263$(EXE) : $(OBJECTS) $(ARCHIVE_NAME) $(DYLIB_FILENAME)
Richard Mittonec8b2822013-10-17 20:09:33 +0000264 $(LD) $(OBJECTS) $(ARCHIVE_NAME) -L. -l$(DYLIB_NAME) $(LDFLAGS) -o "$(EXE)"
Johnny Chenbeac8f92012-01-10 00:41:11 +0000265else
266EXE = $(DYLIB_FILENAME)
267endif
268else
Johnny Chenfe141622012-01-12 23:09:42 +0000269$(EXE) : $(OBJECTS) $(ARCHIVE_NAME)
Daniel Malea2745d842013-01-25 00:31:48 +0000270 $(LD) $(OBJECTS) $(LDFLAGS) $(ARCHIVE_NAME) -o "$(EXE)"
Johnny Chenfe141622012-01-12 23:09:42 +0000271endif
272
273#----------------------------------------------------------------------
274# Make the archive
275#----------------------------------------------------------------------
276ifneq "$(ARCHIVE_NAME)" ""
277ifeq "$(OS)" "Darwin"
278$(ARCHIVE_NAME) : $(ARCHIVE_OBJECTS)
279 $(AR) $(ARFLAGS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS)
280 $(RM) $(ARCHIVE_OBJECTS)
281else
282$(ARCHIVE_NAME) : $(foreach ar_obj,$(ARCHIVE_OBJECTS),$(ARCHIVE_NAME)($(ar_obj)))
283endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000284endif
285
286#----------------------------------------------------------------------
287# Make the dylib
288#----------------------------------------------------------------------
Peter Collingbourne518f03d2011-06-20 19:06:04 +0000289$(DYLIB_FILENAME) : $(DYLIB_OBJECTS)
290ifeq "$(OS)" "Darwin"
291 $(LD) $(LDFLAGS) $(DYLIB_OBJECTS) -install_name "@executable_path/$(DYLIB_FILENAME)" -dynamiclib -o "$(DYLIB_FILENAME)"
Greg Clayton0c9773c2012-09-20 21:43:11 +0000292ifneq "$(MAKE_DSYM)" "NO"
293ifneq "$(DS)" ""
294 $(DS) $(DSFLAGS) "$(DYLIB_FILENAME)"
295endif
296endif
Peter Collingbourne518f03d2011-06-20 19:06:04 +0000297else
298 $(LD) $(LDFLAGS) $(DYLIB_OBJECTS) -shared -o "$(DYLIB_FILENAME)"
Michael Sartain802b0552013-07-02 18:13:13 +0000299ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
300 objcopy --only-keep-debug "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).debug"
301 objcopy --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
302endif
Peter Collingbourne518f03d2011-06-20 19:06:04 +0000303endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000304
305#----------------------------------------------------------------------
306# Automatic variables based on items already entered. Below we create
307# an objects lists from the list of sources by replacing all entries
308# that end with .c with .o, and we also create a list of prerequisite
309# files by replacing all .c files with .d.
310#----------------------------------------------------------------------
311PREREQS := $(OBJECTS:.o=.d)
Johnny Chene3dc0f02010-08-24 16:35:00 +0000312ifneq "$(DYLIB_NAME)" ""
313 DYLIB_PREREQS := $(DYLIB_OBJECTS:.o=.d)
314endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000315
316#----------------------------------------------------------------------
317# Rule for Generating Prerequisites Automatically using .d files and
318# the compiler -MM option. The -M option will list all system headers,
319# and the -MM option will list all non-system dependencies.
320#----------------------------------------------------------------------
321%.d: %.c
322 @set -e; rm -f $@; \
Johnny Chen189bff12011-08-04 20:44:56 +0000323 $(CC) -M $(CFLAGS) $< > $@.$$$$; \
Johnny Chen9bc867a2010-08-23 23:56:08 +0000324 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
325 rm -f $@.$$$$
326
327%.d: %.cpp
328 @set -e; rm -f $@; \
Stefanus Du Toitf1620ef2013-07-30 17:33:30 +0000329 $(CXX) -M $(CXXFLAGS) $< > $@.$$$$; \
Johnny Chen9bc867a2010-08-23 23:56:08 +0000330 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
331 rm -f $@.$$$$
332
333%.d: %.m
334 @set -e; rm -f $@; \
Johnny Chen189bff12011-08-04 20:44:56 +0000335 $(CC) -M $(CFLAGS) $< > $@.$$$$; \
Johnny Chen9bc867a2010-08-23 23:56:08 +0000336 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
337 rm -f $@.$$$$
338
339%.d: %.mm
340 @set -e; rm -f $@; \
Stefanus Du Toitf1620ef2013-07-30 17:33:30 +0000341 $(CXX) -M $(CXXFLAGS) $< > $@.$$$$; \
Johnny Chen9bc867a2010-08-23 23:56:08 +0000342 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
343 rm -f $@.$$$$
344
345#----------------------------------------------------------------------
346# Include all of the makefiles for each source file so we don't have
347# to manually track all of the prerequisites for each source file.
348#----------------------------------------------------------------------
349sinclude $(PREREQS)
Johnny Chene3dc0f02010-08-24 16:35:00 +0000350ifneq "$(DYLIB_NAME)" ""
351 sinclude $(DYLIB_PREREQS)
352endif
Johnny Chen9bc867a2010-08-23 23:56:08 +0000353
Johnny Chen8da4ddf2012-04-24 23:05:07 +0000354# Define a suffix rule for .mm -> .o
355.SUFFIXES: .mm .o
356.mm.o:
357 $(CXX) $(CXXFLAGS) -c $<
358
Johnny Chen9bc867a2010-08-23 23:56:08 +0000359.PHONY: clean
360dsym: $(DSYM)
361all: $(EXE) $(DSYM)
Johnny Chene1030cd2010-09-27 20:44:46 +0000362clean::
Johnny Chen9bc867a2010-08-23 23:56:08 +0000363ifeq "$(DYLIB_NAME)" ""
Greg Clayton1767a732013-06-13 21:27:14 +0000364 rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
Johnny Chen9bc867a2010-08-23 23:56:08 +0000365else
Michael Sartain802b0552013-07-02 18:13:13 +0000366 rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME) $(DYLIB_FILENAME).dSYM $(DYLIB_FILENAME).debug *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
Johnny Chen9bc867a2010-08-23 23:56:08 +0000367endif
Johnny Chenfa380412011-01-14 21:18:12 +0000368
369#----------------------------------------------------------------------
370# From http://blog.melski.net/tag/debugging-makefiles/
371#
372# Usage: make print-CC print-CXX print-LD
373#----------------------------------------------------------------------
374print-%:
375 @echo '$*=$($*)'
376 @echo ' origin = $(origin $*)'
377 @echo ' flavor = $(flavor $*)'
378 @echo ' value = $(value $*)'
Johnny Chen8b2c3212011-01-28 17:22:29 +0000379
380
381### Local Variables: ###
382### mode:makefile ###
383### End: ###