blob: 2a49a4623e6877560fb24c8abeaa3c464cdc02c0 [file] [log] [blame]
Misha Brukman6d5ab862004-04-24 00:10:56 +00001#===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===#
2#
John Criswelld8846c12003-10-21 14:33:46 +00003# The LLVM Compiler Infrastructure
4#
5# This file was developed by the LLVM research group and is distributed under
6# the University of Illinois Open Source License. See LICENSE.TXT for details.
7#
Misha Brukman6d5ab862004-04-24 00:10:56 +00008#===------------------------------------------------------------------------===#
Chris Lattner00950542001-06-06 20:29:01 +00009#
Reid Spencer3a561f52004-10-23 20:04:14 +000010# This file is included by all of the LLVM makefiles. For details on how to use
11# it properly, please see the document MakefileGuide.html in the docs directory.
Chris Lattneraf06a082003-08-15 03:02:52 +000012#
Vikram S. Adved60aede2002-07-09 12:04:21 +000013#===-----------------------------------------------------------------------====
Chris Lattner00950542001-06-06 20:29:01 +000014
Reid Spencercc2d1e22004-10-30 09:19:36 +000015################################################################################
Reid Spencer3a561f52004-10-23 20:04:14 +000016# TARGETS: Define standard targets that can be invoked
Reid Spencercc2d1e22004-10-30 09:19:36 +000017################################################################################
John Criswell7a73b802003-06-30 21:59:07 +000018
Chris Lattner00950542001-06-06 20:29:01 +000019#--------------------------------------------------------------------
Reid Spencer3a561f52004-10-23 20:04:14 +000020# Define the various target sets
21#--------------------------------------------------------------------
Reid Spencer3d659492004-11-02 16:36:03 +000022RecursiveTargets := all clean clean-all check install uninstall
23LocalTargets := all-local clean-local clean-all-local check-local \
24 install-local printvars uninstall-local
Reid Spencercc2d1e22004-10-30 09:19:36 +000025TopLevelTargets := dist dist-check dist-clean tags dist-gzip dist-bzip2 \
26 dist-zip
27UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
28InternalTargets := preconditions distdir dist-hook
Reid Spencer3a561f52004-10-23 20:04:14 +000029
Reid Spencercc2d1e22004-10-30 09:19:36 +000030################################################################################
Reid Spencer9411c642004-10-26 22:26:33 +000031# INITIALIZATION: Basic things the makefile needs
Reid Spencercc2d1e22004-10-30 09:19:36 +000032################################################################################
33
34#--------------------------------------------------------------------
35# Set the VPATH so that we can find source files.
36#--------------------------------------------------------------------
37VPATH=$(BUILD_SRC_DIR)
Reid Spencer9411c642004-10-26 22:26:33 +000038
39#--------------------------------------------------------------------
40# Reset the list of suffixes we know how to build
41#--------------------------------------------------------------------
42.SUFFIXES:
Reid Spencercc2d1e22004-10-30 09:19:36 +000043.SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a .bc .td .ps .dot
44.SUFFIXES: $(SHLIBEXT) $(SUFFIXES)
Reid Spencer9411c642004-10-26 22:26:33 +000045
Reid Spencer3a561f52004-10-23 20:04:14 +000046#--------------------------------------------------------------------
47# Mark all of these targets as phony to avoid implicit rule search
48#--------------------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +000049.PHONY: $(UserTargets) $(InternalTargets)
Reid Spencer3a561f52004-10-23 20:04:14 +000050
51#--------------------------------------------------------------------
Reid Spencer9411c642004-10-26 22:26:33 +000052# Make sure all the user-target rules are double colon rules and
53# they are defined first.
Reid Spencer3a561f52004-10-23 20:04:14 +000054#--------------------------------------------------------------------
55
Reid Spencercc2d1e22004-10-30 09:19:36 +000056$(UserTargets)::
Reid Spencer151f8ba2004-10-25 08:27:37 +000057
Reid Spencer9411c642004-10-26 22:26:33 +000058################################################################################
59# PRECONDITIONS: that which must be built/checked first
60################################################################################
61
Reid Spencer023c4462004-11-17 19:08:44 +000062SrcMakefiles := $(filter %Makefile %Makefile.tests %Makefile.JIT,\
63 $(wildcard $(BUILD_SRC_DIR)/Makefile*))
Reid Spencercc2d1e22004-10-30 09:19:36 +000064ObjMakefiles := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SrcMakefiles))
65ConfigureScript := $(LLVM_SRC_ROOT)/configure
66ConfigStatusScript := $(LLVM_OBJ_ROOT)/config.status
67MakefileConfigIn := $(LLVM_SRC_ROOT)/Makefile.config.in
68MakefileConfig := $(LLVM_OBJ_ROOT)/Makefile.config
69PreConditions := $(ConfigStatusScript) $(MakefileConfig) $(ObjMakefiles)
Reid Spencer9411c642004-10-26 22:26:33 +000070
Reid Spencercc2d1e22004-10-30 09:19:36 +000071preconditions : $(PreConditions)
Reid Spencer9411c642004-10-26 22:26:33 +000072
73#------------------------------------------------------------------------
74# Make sure the BUILT_SOURCES are built first
75#------------------------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +000076$(filter-out clean clean-local,UserTargets):: $(BUILT_SOURCES)
Reid Spencer9411c642004-10-26 22:26:33 +000077
78clean-local::
79ifneq ($(strip $(BUILT_SOURCES)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +000080 -$(Verb) $(RM) -f $(BUILT_SOURCES)
Reid Spencer9411c642004-10-26 22:26:33 +000081endif
82
Reid Spencercc2d1e22004-10-30 09:19:36 +000083$(BUILT_SOURCES) : $(ObjMakefiles)
Reid Spencer80f0ef72004-10-28 00:41:43 +000084
Reid Spencer9411c642004-10-26 22:26:33 +000085#------------------------------------------------------------------------
86# Make sure we're not using a stale configuration
87#------------------------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +000088.PRECIOUS: $(ConfigStatusScript)
89$(ConfigStatusScript): $(ConfigureScript)
90 $(Echo) Reconfiguring with $<
Reid Spencer7d277002004-11-29 12:37:44 +000091 $(Verb) cd $(BUILD_OBJ_ROOT) && \
92 $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
93 $(ConfigStatusScript)
Reid Spencer9411c642004-10-26 22:26:33 +000094
95#------------------------------------------------------------------------
96# Make sure the configuration makefile is up to date
97#------------------------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +000098$(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript)
99 $(Echo) Regenerating $@
100 $(Verb) cd $(LLVM_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config
Reid Spencer9411c642004-10-26 22:26:33 +0000101
102#------------------------------------------------------------------------
103# If the Makefile in the source tree has been updated, copy it over into the
104# build tree. But, only do this if the source and object makefiles differ
105#------------------------------------------------------------------------
106ifneq ($(BUILD_OBJ_DIR),$(BUILD_SRC_DIR))
107
Reid Spencer023c4462004-11-17 19:08:44 +0000108Makefile: $(BUILD_SRC_DIR)/Makefile
Reid Spencercc2d1e22004-10-30 09:19:36 +0000109 $(Echo) "Updating Makefile"
110 $(Verb) $(MKDIR) $(@D)
111 $(Verb) cp -f $< $@
Reid Spencer9411c642004-10-26 22:26:33 +0000112
113# Copy the Makefile.* files unless we're in the root directory which avoids
114# the copying of Makefile.config.in or other things that should be explicitly
115# taken care of.
Reid Spencer9411c642004-10-26 22:26:33 +0000116$(BUILD_OBJ_DIR)/Makefile% : $(BUILD_SRC_DIR)/Makefile%
Reid Spencer86606782004-10-26 23:10:00 +0000117 @case '$?' in \
118 *Makefile.rules) ;; \
119 *.in) ;; \
Reid Spencercc2d1e22004-10-30 09:19:36 +0000120 *) $(Echo) "Updating $(@F)" ; \
Reid Spencer86606782004-10-26 23:10:00 +0000121 $(MKDIR) $(@D) ; \
122 cp -f $< $@ ;; \
123 esac
124
Reid Spencer9411c642004-10-26 22:26:33 +0000125endif
126
127#------------------------------------------------------------------------
128# Set up the basic dependencies
129#------------------------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +0000130$(UserTargets):: $(PreConditions)
Reid Spencer9411c642004-10-26 22:26:33 +0000131
132all:: all-local
Reid Spencer3a561f52004-10-23 20:04:14 +0000133check:: check-local
134clean:: clean-local
Reid Spencer3d659492004-11-02 16:36:03 +0000135clean-all:: clean-local clean-all-local
Reid Spencer9411c642004-10-26 22:26:33 +0000136install:: install-local
137uninstall:: uninstall-local
138check-local:: all-local
139install-local:: all-local
Reid Spencer3a561f52004-10-23 20:04:14 +0000140
141###############################################################################
142# VARIABLES: Set up various variables based on configuration data
143###############################################################################
144
145#--------------------------------------------------------------------
146# Variables derived from configuration we are building
Chris Lattner00950542001-06-06 20:29:01 +0000147#--------------------------------------------------------------------
148
Chris Lattner760da062003-03-14 20:25:22 +0000149ifdef ENABLE_PROFILING
Reid Spencer9af3b292004-11-01 07:50:27 +0000150 BuildMode := Profile
Reid Spencercc2d1e22004-10-30 09:19:36 +0000151 CXX.Flags := -O3 -DNDEBUG -felide-constructors -finline-functions -pg
152 C.Flags := -O3 -DNDEBUG -pg
153 LD.Flags := -O3 -DNDEBUG -pg
Chris Lattner760da062003-03-14 20:25:22 +0000154else
155 ifdef ENABLE_OPTIMIZED
Reid Spencer9af3b292004-11-01 07:50:27 +0000156 BuildMode := Release
Reid Spencercc2d1e22004-10-30 09:19:36 +0000157 CXX.Flags := -O3 -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer
158 C.Flags := -O3 -DNDEBUG -fomit-frame-pointer
159 LD.Flags := -O3 -DNDEBUG
Chris Lattner760da062003-03-14 20:25:22 +0000160 else
Reid Spencer9af3b292004-11-01 07:50:27 +0000161 BuildMode := Debug
Reid Spencercc2d1e22004-10-30 09:19:36 +0000162 CXX.Flags := -g -D_DEBUG
163 C.Flags := -g -D_DEBUG
164 LD.Flags := -g -D_DEBUG
Reid Spencer4d71b662004-10-22 21:01:56 +0000165 KEEP_SYMBOLS := 1
Chris Lattner760da062003-03-14 20:25:22 +0000166 endif
167endif
168
Reid Spencercc2d1e22004-10-30 09:19:36 +0000169CXX.Flags += $(CXXFLAGS)
170C.Flags += $(CFLAGS)
171CPP.Flags += $(CPPFLAGS)
172LD.Flags += $(LDFLAGS)
173AR.Flags := cru
174LibTool.Flags := --tag=CXX
Reid Spencer3a561f52004-10-23 20:04:14 +0000175
176#--------------------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000177# Directory locations
Reid Spencer3a561f52004-10-23 20:04:14 +0000178#--------------------------------------------------------------------
Reid Spencer9af3b292004-11-01 07:50:27 +0000179ObjDir := $(BUILD_OBJ_DIR)/$(BuildMode)
Reid Spencer815cbcf2004-11-18 10:03:46 +0000180LibDir := $(BUILD_OBJ_ROOT)/$(BuildMode)/lib
Reid Spencer9a5acaf2004-11-18 20:04:39 +0000181ToolDir := $(BUILD_OBJ_ROOT)/$(BuildMode)/bin
Reid Spencer815cbcf2004-11-18 10:03:46 +0000182ExmplDir := $(BUILD_OBJ_ROOT)/$(BuildMode)/examples
183LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
Reid Spencer9a5acaf2004-11-18 20:04:39 +0000184LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
Reid Spencer815cbcf2004-11-18 10:03:46 +0000185LExmplDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
John Criswell7a73b802003-06-30 21:59:07 +0000186
Reid Spencer3a561f52004-10-23 20:04:14 +0000187#--------------------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000188# Full Paths To Compiled Tools and Utilities
Reid Spencer3a561f52004-10-23 20:04:14 +0000189#--------------------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +0000190EchoCmd := $(ECHO) llvm[$(MAKELEVEL)]:
191Echo := @$(EchoCmd)
192ifndef LIBTOOL
Reid Spencer4d71b662004-10-22 21:01:56 +0000193LIBTOOL := $(LLVM_OBJ_ROOT)/mklib
Reid Spencercc2d1e22004-10-30 09:19:36 +0000194endif
195ifndef LLVMAS
196LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT)
197endif
198ifndef BURG
199BURG := $(LLVMToolDir)/burg$(EXEEXT)
200endif
201ifndef TBLGEN
202TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT)
203endif
204ifndef GCCLD
205GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
206endif
207ifndef LLVMGCC
208LLVMGCC := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCCDIR)/bin/gcc
209endif
210ifndef LLVMGXX
211LLVMGXX := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCCDIR)/bin/g++
212endif
Dinakar Dhurjatiffb55cd2003-05-29 16:18:20 +0000213
Reid Spencer4d71b662004-10-22 21:01:56 +0000214# Need a better way to compute this.
Reid Spencercc2d1e22004-10-30 09:19:36 +0000215LLVMGCCLibDir := $(dir $(shell $(LLVMGCC) -print-file-name=libgcc.a))/
Dinakar Dhurjatiffb55cd2003-05-29 16:18:20 +0000216
Reid Spencer3a561f52004-10-23 20:04:14 +0000217#--------------------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000218# Adjust to user's request
Reid Spencer3a561f52004-10-23 20:04:14 +0000219#--------------------------------------------------------------------
Dinakar Dhurjatiffb55cd2003-05-29 16:18:20 +0000220
Reid Spencercc2d1e22004-10-30 09:19:36 +0000221# Adjust LIBTOOL flags for shared libraries, or not.
John Criswell82f4a5a2003-07-31 20:58:51 +0000222ifndef SHARED_LIBRARY
Reid Spencercc2d1e22004-10-30 09:19:36 +0000223 LibTool.Flags += --tag=disable-shared
Reid Spencer4d71b662004-10-22 21:01:56 +0000224else
Reid Spencercc2d1e22004-10-30 09:19:36 +0000225 LD.Flags += -rpath $(LibDir)
John Criswell82f4a5a2003-07-31 20:58:51 +0000226endif
227
Reid Spencercceed9f2004-11-08 17:32:12 +0000228ifdef TOOL_VERBOSE
229 C.Flags += -v
230 CXX.Flags += -v
231 LD.Flags += -v
232 BCLinkLib.Flags += -v
233 VERBOSE := 1
234endif
235
Reid Spencer3a561f52004-10-23 20:04:14 +0000236# Adjust settings for verbose mode
Chris Lattner760da062003-03-14 20:25:22 +0000237ifndef VERBOSE
Reid Spencercc2d1e22004-10-30 09:19:36 +0000238 Verb := @
239 LibTool.Flags += --silent
240 AR.Flags += >/dev/null 2>/dev/null
241 ConfigureScriptFLAGS += >$(BUILD_OBJ_DIR)/configure.out 2>&1
Reid Spencer151f8ba2004-10-25 08:27:37 +0000242else
Reid Spencercc2d1e22004-10-30 09:19:36 +0000243 ConfigureScriptFLAGS :=
Misha Brukmanb5f096f2002-09-12 16:05:39 +0000244endif
245
Vikram S. Advefeeae582002-09-18 11:55:13 +0000246# By default, strip symbol information from executable
Chris Lattner760da062003-03-14 20:25:22 +0000247ifndef KEEP_SYMBOLS
Reid Spencercc2d1e22004-10-30 09:19:36 +0000248 Strip := $(PLATFORMSTRIPOPTS)
249 StripWarnMsg := "(without symbols)"
Vikram S. Advefeeae582002-09-18 11:55:13 +0000250endif
251
Reid Spencer3a561f52004-10-23 20:04:14 +0000252# Adjust linker flags for building an executable
Reid Spencer4d71b662004-10-22 21:01:56 +0000253ifdef TOOLNAME
Reid Spencer815cbcf2004-11-18 10:03:46 +0000254ifdef EXAMPLE_TOOL
255 LD.Flags += -rpath $(ExmplDir) -export-dynamic
256else
Reid Spencercc2d1e22004-10-30 09:19:36 +0000257 LD.Flags += -rpath $(ToolDir) -export-dynamic
Dinakar Dhurjati87ea8aa2003-10-29 14:28:35 +0000258endif
Reid Spencer815cbcf2004-11-18 10:03:46 +0000259endif
Dinakar Dhurjati87ea8aa2003-10-29 14:28:35 +0000260
Reid Spencer3a561f52004-10-23 20:04:14 +0000261#----------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000262# Options To Invoke Tools
Reid Spencer3a561f52004-10-23 20:04:14 +0000263#----------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000264
265CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused
266
Reid Spencercc2d1e22004-10-30 09:19:36 +0000267LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
268CPP.Flags += -I$(BUILD_OBJ_DIR) \
Reid Spencer151f8ba2004-10-25 08:27:37 +0000269 -I$(BUILD_SRC_DIR) \
270 -I$(BUILD_SRC_ROOT)/include \
271 -I$(BUILD_OBJ_ROOT)/include \
272 -I$(LLVM_OBJ_ROOT)/include \
273 -I$(LLVM_SRC_ROOT)/include \
274 -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
Reid Spencer4d71b662004-10-22 21:01:56 +0000275
Reid Spencercc2d1e22004-10-30 09:19:36 +0000276Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags)
277LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C)
278BCCompile.C = $(LLVMGCC) $(CPP.Flags) $(CompileCommonOpts) $(C.Flags) -c
279Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
280LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX)
281BCCompile.CXX = $(LLVMGXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c
282Link = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
283 $(CompileCommonOpts) $(LD.Flags) $(Strip)
284Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
Reid Spencera69b1ea2004-10-28 09:15:28 +0000285 $(CompileCommonOpts)
Reid Spencercceed9f2004-11-08 17:32:12 +0000286BCLinkLib = $(LLVMGCC) -shared -nostdlib $(BCLinkLib.Flags)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000287LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL)
Reid Spencer3a561f52004-10-23 20:04:14 +0000288Burg = $(BURG) -I $(BUILD_SRC_DIR)
289TableGen = $(TBLGEN) -I $(BUILD_SRC_DIR)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000290Archive = $(AR) $(AR.Flags)
Reid Spencer5991dcb2004-11-14 21:46:55 +0000291LArchive = $(ToolDir)/llvm-ar rcsf
Reid Spencer4d71b662004-10-22 21:01:56 +0000292ifdef RANLIB
Reid Spencer3a561f52004-10-23 20:04:14 +0000293Ranlib = $(RANLIB)
Reid Spencer4d71b662004-10-22 21:01:56 +0000294else
Reid Spencer3a561f52004-10-23 20:04:14 +0000295Ranlib = ranlib
John Criswell7a73b802003-06-30 21:59:07 +0000296endif
297
Chris Lattner00950542001-06-06 20:29:01 +0000298#----------------------------------------------------------
Reid Spencer3a561f52004-10-23 20:04:14 +0000299# Get the list of source files
300#----------------------------------------------------------
301ifndef SOURCES
Reid Spencercc2d1e22004-10-30 09:19:36 +0000302 Sources := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \
303 $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \
304 $(BUILD_SRC_DIR)/*.l))
305else
306 Sources := $(SOURCES)
Reid Spencer4d71b662004-10-22 21:01:56 +0000307endif
308
309ifdef BUILT_SOURCES
Reid Spencercc2d1e22004-10-30 09:19:36 +0000310Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES))
Vikram S. Advead9ea7e2002-10-14 16:40:04 +0000311endif
Vikram S. Adve112a72c2001-07-15 13:16:47 +0000312
Reid Spencer3a561f52004-10-23 20:04:14 +0000313#----------------------------------------------------------
314# Types of objects that can be built from sources
315#----------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +0000316BaseNameSources := $(sort $(basename $(Sources)))
317ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o)
318ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo)
319ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
Reid Spencer3a561f52004-10-23 20:04:14 +0000320
321###############################################################################
322# DIRECTORIES: Handle recursive descent of directory structure
323###############################################################################
John Criswell82f4a5a2003-07-31 20:58:51 +0000324
Chris Lattner00950542001-06-06 20:29:01 +0000325#---------------------------------------------------------
Reid Spencera69b1ea2004-10-28 09:15:28 +0000326# Provide rules to make install dirs. This must be early
327# in the file so they get built before dependencies
328#---------------------------------------------------------
329
330$(bindir):
Reid Spencercc2d1e22004-10-30 09:19:36 +0000331 $(Verb) $(MKDIR) $(bindir)
Chris Lattnere4cb90f2004-11-01 06:14:59 +0000332
Reid Spencera69b1ea2004-10-28 09:15:28 +0000333$(libdir):
Reid Spencercc2d1e22004-10-30 09:19:36 +0000334 $(Verb) $(MKDIR) $(libdir)
Reid Spencera69b1ea2004-10-28 09:15:28 +0000335
336$(bytecode_libdir):
Reid Spencercc2d1e22004-10-30 09:19:36 +0000337 $(Verb) $(MKDIR) $(bytecode_libdir)
Reid Spencera69b1ea2004-10-28 09:15:28 +0000338
339$(sysconfdir):
Reid Spencercc2d1e22004-10-30 09:19:36 +0000340 $(Verb) $(MKDIR) $(sysconfdir)
Reid Spencera69b1ea2004-10-28 09:15:28 +0000341
Reid Spencercc2d1e22004-10-30 09:19:36 +0000342# To create other directories, as needed, and timestamp their creation
343%/.dir:
344 $(Verb) $(MKDIR) $* > /dev/null
Reid Spencerfbbf3072004-11-29 05:00:33 +0000345 $(Verb) $(DATE) > $@
Reid Spencercc2d1e22004-10-30 09:19:36 +0000346
Reid Spencer815cbcf2004-11-18 10:03:46 +0000347.PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir
348.PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir
Reid Spencera69b1ea2004-10-28 09:15:28 +0000349
350#---------------------------------------------------------
Reid Spencer3a561f52004-10-23 20:04:14 +0000351# Handle the DIRS options for sequential construction
Chris Lattner00950542001-06-06 20:29:01 +0000352#---------------------------------------------------------
353
Reid Spencercc2d1e22004-10-30 09:19:36 +0000354SubDirs :=
Anand Shukla7c7a07e2002-09-18 04:29:30 +0000355ifdef DIRS
Reid Spencercc2d1e22004-10-30 09:19:36 +0000356SubDirs += $(DIRS)
357$(RecursiveTargets)::
358 $(Verb) for dir in $(DIRS); do \
Reid Spencer4d71b662004-10-22 21:01:56 +0000359 if [ ! -f $$dir/Makefile ]; then \
360 $(MKDIR) $$dir; \
361 cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
362 fi; \
Reid Spencer151f8ba2004-10-25 08:27:37 +0000363 ($(MAKE) -C $$dir $@ ) || exit 1; \
Chris Lattnerf1ffd992002-09-17 23:35:02 +0000364 done
Anand Shukla7c7a07e2002-09-18 04:29:30 +0000365endif
Chris Lattnera8abc222002-09-18 03:22:27 +0000366
Reid Spencer3a561f52004-10-23 20:04:14 +0000367#---------------------------------------------------------
368# Handle the EXPERIMENTAL_DIRS options ensuring success
369# after each directory is built.
370#---------------------------------------------------------
371ifdef EXPERIMENTAL_DIRS
Reid Spencercc2d1e22004-10-30 09:19:36 +0000372$(RecursiveTargets)::
373 $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \
Reid Spencer3a561f52004-10-23 20:04:14 +0000374 if [ ! -f $$dir/Makefile ]; then \
375 $(MKDIR) $$dir; \
376 cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
377 fi; \
Reid Spencer151f8ba2004-10-25 08:27:37 +0000378 ($(MAKE) -C $$dir $@ ) || exit 0; \
Reid Spencer3a561f52004-10-23 20:04:14 +0000379 done
380endif
Chris Lattnera8abc222002-09-18 03:22:27 +0000381
Reid Spencer3a561f52004-10-23 20:04:14 +0000382#---------------------------------------------------------
383# Handle the PARALLEL_DIRS options for parallel construction
384#---------------------------------------------------------
385ifdef PARALLEL_DIRS
386
Reid Spencercc2d1e22004-10-30 09:19:36 +0000387SubDirs += $(PARALLEL_DIRS)
388
Reid Spencer3a561f52004-10-23 20:04:14 +0000389# Unfortunately, this list must be maintained if new
390# recursive targets are added.
Reid Spencercc2d1e22004-10-30 09:19:36 +0000391all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS))
392clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS))
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000393clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS))
Reid Spencercc2d1e22004-10-30 09:19:36 +0000394check :: $(addsuffix /.makecheck ,$(PARALLEL_DIRS))
395install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS))
Reid Spencer3a561f52004-10-23 20:04:14 +0000396uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS))
397
Reid Spencercc2d1e22004-10-30 09:19:36 +0000398Parallel_Targets := $(foreach T,$(RecursiveTargets),%/.make$(T))
Reid Spencer3a561f52004-10-23 20:04:14 +0000399
400$(Parallel_Targets) :
Reid Spencercc2d1e22004-10-30 09:19:36 +0000401 $(Verb) if [ ! -f $(@D)/Makefile ]; then \
Reid Spencer4d71b662004-10-22 21:01:56 +0000402 $(MKDIR) $(@D); \
403 cp $(BUILD_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
John Criswellb3866b62003-11-25 19:32:22 +0000404 fi; \
Reid Spencer151f8ba2004-10-25 08:27:37 +0000405 $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
Chris Lattner00950542001-06-06 20:29:01 +0000406endif
407
Reid Spencer3a561f52004-10-23 20:04:14 +0000408#---------------------------------------------------------
409# Handle the OPTIONAL_DIRS options for directores that may
410# or may not exist.
411#---------------------------------------------------------
John Criswell2a6530f2003-06-27 16:58:44 +0000412ifdef OPTIONAL_DIRS
Reid Spencer151f8ba2004-10-25 08:27:37 +0000413
Reid Spencercc2d1e22004-10-30 09:19:36 +0000414SubDirs += $(OPTIONAL_DIRS)
Reid Spencer151f8ba2004-10-25 08:27:37 +0000415
Reid Spencercc2d1e22004-10-30 09:19:36 +0000416$(RecursiveTargets)::
417 $(Verb) for dir in $(OPTIONAL_DIRS); do \
Reid Spencer4d71b662004-10-22 21:01:56 +0000418 if [ -d $(BUILD_SRC_DIR)/$$dir ]; then\
419 if [ ! -f $$dir/Makefile ]; then \
420 $(MKDIR) $$dir; \
421 cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \
422 fi; \
Reid Spencer151f8ba2004-10-25 08:27:37 +0000423 ($(MAKE) -C$$dir $@ ) || exit 1; \
Reid Spencer4d71b662004-10-22 21:01:56 +0000424 fi \
John Criswell2a6530f2003-06-27 16:58:44 +0000425 done
426endif
427
Reid Spencerfc945082004-08-20 09:20:05 +0000428#---------------------------------------------------------
429# Handle the CONFIG_FILES options
430#---------------------------------------------------------
431ifdef CONFIG_FILES
Reid Spencerfc945082004-08-20 09:20:05 +0000432
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000433install-local:: $(sysconfdir) $(CONFIG_FILES)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000434 $(Echo) Installing Configuration Files To $(sysconfdir)
435 $(Verb)for file in $(CONFIG_FILES); do \
Reid Spencer1b426ab2004-11-23 05:59:53 +0000436 if test -f $(BUILD_OBJ_DIR)/$${file} ; then \
437 $(INSTALL) $(BUILD_OBJ_DIR)/$${file} $(sysconfdir) ; \
438 elif test -f $(BUILD_SRC_DIR)/$${file} ; then \
439 $(INSTALL) $(BUILD_SRC_DIR)/$${file} $(sysconfdir) ; \
440 else \
441 $(ECHO) Error: cannot find config file $${file}. ; \
442 fi \
Reid Spencerfc945082004-08-20 09:20:05 +0000443 done
Reid Spencer3a561f52004-10-23 20:04:14 +0000444
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000445uninstall-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000446 $(Echo) Uninstalling Configuration Files From $(sysconfdir)
447 $(Verb)for file in $(CONFIG_FILES); do \
Reid Spencer151f8ba2004-10-25 08:27:37 +0000448 $(RM) -f $(sysconfdir)/$${file} ; \
Reid Spencere5487ba2004-10-24 07:53:21 +0000449 done
450
Reid Spencerfc945082004-08-20 09:20:05 +0000451endif
452
Reid Spencer3a561f52004-10-23 20:04:14 +0000453###############################################################################
454# Library Build Rules: Four ways to build a library
455###############################################################################
Chris Lattner00950542001-06-06 20:29:01 +0000456
Brian Gaeke8abff792004-01-22 22:53:48 +0000457
Reid Spencer3a561f52004-10-23 20:04:14 +0000458# if we're building a library ...
Chris Lattner00950542001-06-06 20:29:01 +0000459ifdef LIBRARYNAME
Vikram S. Adve112a72c2001-07-15 13:16:47 +0000460
Chris Lattner2a548c52002-09-16 22:36:42 +0000461# Make sure there isn't any extranous whitespace on the LIBRARYNAME option
Chris Lattnerccb4ebd2002-09-16 22:34:56 +0000462LIBRARYNAME := $(strip $(LIBRARYNAME))
Reid Spencercc2d1e22004-10-30 09:19:36 +0000463LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la
464LibName.A := $(LibDir)/lib$(LIBRARYNAME).a
465LibName.O := $(LibDir)/$(LIBRARYNAME).o
466LibName.BC := $(LibDir)/lib$(LIBRARYNAME).bc
Chris Lattnerccb4ebd2002-09-16 22:34:56 +0000467
Reid Spencer3a561f52004-10-23 20:04:14 +0000468#---------------------------------------------------------
469# Shared Library Targets:
470# If the user asked for a shared library to be built
471# with the SHARED_LIBRARY variable, then we provide
472# targets for building them.
473#---------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000474ifdef SHARED_LIBRARY
475
Reid Spencercc2d1e22004-10-30 09:19:36 +0000476all-local:: $(LibName.LA)
Reid Spencer4d71b662004-10-22 21:01:56 +0000477
Reid Spencercc2d1e22004-10-30 09:19:36 +0000478$(LibName.LA): $(BUILT_SOURCES) $(ObjectsLO) $(LibDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000479 $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000480 $(Verb) $(Link) -o $@ $(ObjectsLO)
481 $(Verb) $(LTInstall) $@ $(LibDir)
Reid Spencer3a561f52004-10-23 20:04:14 +0000482
483clean-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000484ifneq ($(strip $(LibName.LA)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000485 -$(Verb) $(RM) -f $(LibName.LA)
Reid Spencere5487ba2004-10-24 07:53:21 +0000486endif
Reid Spencer4d71b662004-10-22 21:01:56 +0000487
Reid Spencere5487ba2004-10-24 07:53:21 +0000488DestSharedLib = $(libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
Reid Spencer4d71b662004-10-22 21:01:56 +0000489
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000490install-local:: $(DestSharedLib)
Reid Spencere5487ba2004-10-24 07:53:21 +0000491
Reid Spencercc2d1e22004-10-30 09:19:36 +0000492$(DestSharedLib): $(libdir) $(LibName.LA)
Reid Spencer9af3b292004-11-01 07:50:27 +0000493 $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000494 $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
495 $(Verb) $(LIBTOOL) --finish $(libdir)
Reid Spencere5487ba2004-10-24 07:53:21 +0000496
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000497uninstall-local::
Reid Spencer9af3b292004-11-01 07:50:27 +0000498 $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
Reid Spencer12d79512004-11-12 02:27:36 +0000499 -$(Verb) $(RM) -f $(libdir)/lib$(LIBRARYNAME).*
Reid Spencere5487ba2004-10-24 07:53:21 +0000500
Reid Spencer4d71b662004-10-22 21:01:56 +0000501endif
502
Reid Spencer3a561f52004-10-23 20:04:14 +0000503#---------------------------------------------------------
504# Bytecode Library Targets:
505# If the user asked for a bytecode library to be built
506# with the BYTECODE_LIBRARY variable, then we provide
507# targets for building them.
508#---------------------------------------------------------
Reid Spencer4d71b662004-10-22 21:01:56 +0000509ifdef BYTECODE_LIBRARY
510
511ifdef EXPORTED_SYMBOL_LIST
512 BCLinkLib += -Xlinker -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST)
513else
514 ifdef EXPORTED_SYMBOL_FILE
515 BCLinkLib += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
516 else
517 BCLinkLib += -Xlinker -disable-internalize
518 endif
519endif
520
Reid Spencercc2d1e22004-10-30 09:19:36 +0000521all-local:: $(LibName.BC)
Reid Spencer4d71b662004-10-22 21:01:56 +0000522
Reid Spencercc2d1e22004-10-30 09:19:36 +0000523$(LibName.BC): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000524 $(Echo) Linking $(BuildMode) Bytecode Library $(notdir $@)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000525 $(Verb) $(BCLinkLib) -o $@ $(ObjectsBC)
Reid Spencer4d71b662004-10-22 21:01:56 +0000526
Reid Spencer3a561f52004-10-23 20:04:14 +0000527clean-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000528ifneq ($(strip $(LibName.BC)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000529 -$(Verb) $(RM) -f $(LibName.BC)
Reid Spencere5487ba2004-10-24 07:53:21 +0000530endif
Reid Spencer4d71b662004-10-22 21:01:56 +0000531
Reid Spencere5487ba2004-10-24 07:53:21 +0000532DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc
Reid Spencere45ebfa2004-10-26 07:09:33 +0000533
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000534install-local:: $(DestBytecodeLib)
Chris Lattner481cc7c2003-08-15 02:18:35 +0000535
Reid Spencercc2d1e22004-10-30 09:19:36 +0000536$(DestBytecodeLib): $(bytecode_libdir) $(LibName.BC)
Reid Spencer9af3b292004-11-01 07:50:27 +0000537 $(Echo) Installing $(BuildMode) Bytecode Library $(DestBytecodeLib)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000538 $(Verb) $(INSTALL) $(LibName.BC) $@
Reid Spencere5487ba2004-10-24 07:53:21 +0000539
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000540uninstall-local::
Reid Spencer9af3b292004-11-01 07:50:27 +0000541 $(Echo) Uninstalling $(BuildMode) Bytecode Library $(DestBytecodeLib)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000542 -$(Verb) $(RM) -f $(DestBytecodeLib)
Reid Spencer4d71b662004-10-22 21:01:56 +0000543
544endif
Vikram S. Adve60f56062002-08-02 18:34:12 +0000545
Reid Spencercc2d1e22004-10-30 09:19:36 +0000546#---------------------------------------------------------
547# ReLinked Library Targets:
548# If the user didn't explicitly forbid building a
549# relinked then we provide targets for building them.
550#---------------------------------------------------------
Chris Lattnere62dbe92002-07-23 17:56:16 +0000551ifndef DONT_BUILD_RELINKED
Reid Spencer4d71b662004-10-22 21:01:56 +0000552
Reid Spencercc2d1e22004-10-30 09:19:36 +0000553all-local:: $(LibName.O)
554
555$(LibName.O): $(BUILT_SOURCES) $(ObjectsO) $(LibDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000556 $(Echo) Linking $(BuildMode) Object Library $(notdir $@)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000557 $(Verb) $(Relink) -o $@ $(ObjectsO)
Reid Spencer4d71b662004-10-22 21:01:56 +0000558
Reid Spencer3a561f52004-10-23 20:04:14 +0000559clean-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000560ifneq ($(strip $(LibName.O)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000561 -$(Verb) $(RM) -f $(LibName.O)
Reid Spencere5487ba2004-10-24 07:53:21 +0000562endif
563
564DestRelinkedLib = $(libdir)/$(LIBRARYNAME).o
565
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000566install-local:: $(DestRelinkedLib)
Reid Spencere5487ba2004-10-24 07:53:21 +0000567
Reid Spencercc2d1e22004-10-30 09:19:36 +0000568$(DestRelinkedLib): $(libdir) $(LibName.O)
Reid Spencer9af3b292004-11-01 07:50:27 +0000569 $(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000570 $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
Reid Spencere5487ba2004-10-24 07:53:21 +0000571
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000572uninstall-local::
Reid Spencer9af3b292004-11-01 07:50:27 +0000573 $(Echo) Uninstalling $(BuildMode) Object Library $(DestRelinkedLib)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000574 -$(Verb) $(RM) -f $(DestRelinkedLib)
Reid Spencer4d71b662004-10-22 21:01:56 +0000575
Chris Lattnere62dbe92002-07-23 17:56:16 +0000576endif
Chris Lattner760da062003-03-14 20:25:22 +0000577
Reid Spencercc2d1e22004-10-30 09:19:36 +0000578#---------------------------------------------------------
579# Archive Library Targets:
580# If the user wanted a regular archive library built,
581# then we provide targets for building them.
582#---------------------------------------------------------
Chris Lattnere62dbe92002-07-23 17:56:16 +0000583ifdef BUILD_ARCHIVE
Chris Lattnere62dbe92002-07-23 17:56:16 +0000584
Reid Spencercc2d1e22004-10-30 09:19:36 +0000585all-local:: $(LibName.A)
586
587$(LibName.A): $(BUILT_SOURCES) $(ObjectsO) $(LibDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000588 $(Echo) Building $(BuildMode) Archive Library $(notdir $@)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000589 -$(Verb) $(RM) -f $@
Reid Spencercc2d1e22004-10-30 09:19:36 +0000590 $(Verb) $(Archive) $@ $(ObjectsO)
591 $(Verb) $(Ranlib) $@
Vikram S. Adve41e78912002-09-20 14:03:13 +0000592
Reid Spencer3a561f52004-10-23 20:04:14 +0000593clean-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000594ifneq ($(strip $(LibName.A)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000595 -$(Verb) $(RM) -f $(LibName.A)
Chris Lattner00950542001-06-06 20:29:01 +0000596endif
597
Reid Spencere5487ba2004-10-24 07:53:21 +0000598DestArchiveLib := $(libdir)/lib$(LIBRARYNAME).a
599
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000600install-local:: $(DestArchiveLib)
Reid Spencere5487ba2004-10-24 07:53:21 +0000601
Reid Spencercc2d1e22004-10-30 09:19:36 +0000602$(DestArchiveLib): $(libdir) $(LibName.A)
Reid Spencer9af3b292004-11-01 07:50:27 +0000603 $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000604 $(Verb) $(MKDIR) $(libdir)
605 $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
Reid Spencere5487ba2004-10-24 07:53:21 +0000606
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000607uninstall-local::
Reid Spencer9af3b292004-11-01 07:50:27 +0000608 $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000609 -$(Verb) $(RM) -f $(DestArchiveLib)
Reid Spencere5487ba2004-10-24 07:53:21 +0000610
611endif
612
613# endif LIBRARYNAME
Reid Spencer4d71b662004-10-22 21:01:56 +0000614endif
615
Reid Spencerb1dd3dd2004-10-24 08:21:04 +0000616###############################################################################
617# Tool Build Rules: Build executable tool based on TOOLNAME option
618###############################################################################
619
Chris Lattner1cbc29f2001-09-07 22:57:58 +0000620ifdef TOOLNAME
621
Reid Spencercc2d1e22004-10-30 09:19:36 +0000622#---------------------------------------------------------
Reid Spencer7c787c92004-11-29 07:17:07 +0000623# Handle the special "JIT" value for LLVM_LIBS which is a
624# shorthand for a bunch of libraries that get the correct
625# JIT support for a tool that runs JIT.
626#---------------------------------------------------------
627ifeq ($(LLVMLIBS),JIT)
628
629# Make sure we can get our own symbols in the tool
630Link += -dlopen self
631
632# Generic JIT libraries
633JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine
634
635# You can enable the X86 JIT on a non-X86 host by setting the flag
636# ENABLE_X86_JIT on the make command line. If not, it will still be
637# enabled automagically on an X86 host.
638ifeq ($(ARCH), x86)
639 ENABLE_X86_JIT = 1
640endif
641
642# What the X86 JIT requires
643ifdef ENABLE_X86_JIT
644 JIT_LIBS += LLVMX86 LLVMSelectionDAG
645endif
646
647# You can enable the SparcV9 JIT on a non-SparcV9 host by setting the flag
648# ENABLE_SPARCV9_JIT on the make command line. If not, it will still be
649# enabled automagically on an SparcV9 host.
650ifeq ($(ARCH), Sparc)
651 ENABLE_SPARCV9_JIT = 1
652endif
653
654# What the Sparc JIT requires
655ifdef ENABLE_SPARCV9_JIT
656 JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \
657 LLVMSparcV9LiveVar LLVMInstrumentation.a LLVMProfilePaths \
658 LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
659 LLVMDataStructure.a LLVMSparcV9RegAlloc
660endif
661
662# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
663# ENABLE_PPC_JIT on the make command line. If not, it will still be
664# enabled automagically on an PowerPC host.
665ifeq ($(ARCH), PowerPC)
666 ENABLE_PPC_JIT = 1
667endif
668
669# What the PowerPC JIT requires
670ifdef ENABLE_PPC_JIT
671 JIT_LIBS += LLVMPowerPC
672endif
673
674LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \
675 LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
676 LLVMSystem.a $(PLATFORMLIBDL)
677endif
678
679#---------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +0000680# Set up variables for building a tool.
681#---------------------------------------------------------
Reid Spencer815cbcf2004-11-18 10:03:46 +0000682ifdef EXAMPLE_TOOL
683ToolBuildPath := $(ExmplDir)/$(TOOLNAME)$(EXEEXT)
684else
Reid Spencercc2d1e22004-10-30 09:19:36 +0000685ToolBuildPath := $(ToolDir)/$(TOOLNAME)$(EXEEXT)
Reid Spencer815cbcf2004-11-18 10:03:46 +0000686endif
Reid Spencercc2d1e22004-10-30 09:19:36 +0000687ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
688ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions))
689LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS)))
690LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions))
691ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
692LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS)))
693ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs))
694LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs))
Chris Lattner1cbc29f2001-09-07 22:57:58 +0000695
Reid Spencercc2d1e22004-10-30 09:19:36 +0000696#---------------------------------------------------------
Reid Spencercc2d1e22004-10-30 09:19:36 +0000697# Tell make that we need to rebuild subdirectories before
698# we can link the tool. This affects things like LLI which
699# has library subdirectories.
700#---------------------------------------------------------
701$(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS))
Chris Lattner8d7dfb32003-01-22 16:13:31 +0000702
Reid Spencercc2d1e22004-10-30 09:19:36 +0000703#---------------------------------------------------------
704# Provide targets for building the tools
705#---------------------------------------------------------
706all-local:: $(ToolBuildPath)
John Criswell2a6530f2003-06-27 16:58:44 +0000707
Reid Spencer3a561f52004-10-23 20:04:14 +0000708clean-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000709ifneq ($(strip $(ToolBuildPath)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000710 -$(Verb) $(RM) -f $(ToolBuildPath)
Reid Spencere5487ba2004-10-24 07:53:21 +0000711endif
Chris Lattner1cbc29f2001-09-07 22:57:58 +0000712
Reid Spencer815cbcf2004-11-18 10:03:46 +0000713ifdef EXAMPLE_TOOL
714$(ToolBuildPath): $(ExmplDir)/.dir
715else
716$(ToolBuildPath): $(ToolDir)/.dir
717endif
718
719$(ToolBuildPath): $(BUILT_SOURCES) $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
Reid Spencer9af3b292004-11-01 07:50:27 +0000720 $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000721 $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
722 $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB)
Reid Spencer9af3b292004-11-01 07:50:27 +0000723 $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) $(StripWarnMsg)
Reid Spencere5487ba2004-10-24 07:53:21 +0000724
725DestTool = $(bindir)/$(TOOLNAME)
726
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000727install-local:: $(DestTool)
Reid Spencere45ebfa2004-10-26 07:09:33 +0000728
Reid Spencercc2d1e22004-10-30 09:19:36 +0000729$(DestTool): $(bindir) $(ToolBuildPath)
Reid Spencer9af3b292004-11-01 07:50:27 +0000730 $(Echo) Installing $(BuildMode) $(DestTool)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000731 $(Verb) $(INSTALL) $(ToolBuildPath) $(DestTool)
Reid Spencere5487ba2004-10-24 07:53:21 +0000732
Reid Spencerc6dcc6a2004-10-28 07:57:28 +0000733uninstall-local::
Reid Spencer9af3b292004-11-01 07:50:27 +0000734 $(Echo) Uninstalling $(BuildMode) $(DestTool)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000735 -$(Verb) $(RM) -f $(DestTool)
Reid Spencere5487ba2004-10-24 07:53:21 +0000736
Reid Spencer4d71b662004-10-22 21:01:56 +0000737endif
Chris Lattner1cbc29f2001-09-07 22:57:58 +0000738
Reid Spencercc2d1e22004-10-30 09:19:36 +0000739###############################################################################
740# Object Build Rules: Build object files based on sources
741###############################################################################
742
743# Provide rule sets for when dependency generation is enabled
Reid Spencer4d71b662004-10-22 21:01:56 +0000744ifndef DISABLE_AUTO_DEPENDENCIES
Vikram S. Adve41e78912002-09-20 14:03:13 +0000745
Reid Spencercc2d1e22004-10-30 09:19:36 +0000746#---------------------------------------------------------
747# Create .lo files in the ObjDir directory from the .cpp and .c files...
748#---------------------------------------------------------
Reid Spencer3a561f52004-10-23 20:04:14 +0000749ifdef SHARED_LIBRARY
750
Reid Spencercc2d1e22004-10-30 09:19:36 +0000751$(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000752 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000753 $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ; \
754 then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \
755 else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi
Reid Spencer3a561f52004-10-23 20:04:14 +0000756
Reid Spencercc2d1e22004-10-30 09:19:36 +0000757$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000758 $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000759 $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \
760 then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \
761 else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi
Reid Spencer3a561f52004-10-23 20:04:14 +0000762
Reid Spencercc2d1e22004-10-30 09:19:36 +0000763#---------------------------------------------------------
764# Create .o files in the ObjDir directory from the .cpp and .c files...
765#---------------------------------------------------------
Reid Spencer3a561f52004-10-23 20:04:14 +0000766else
Reid Spencer4d71b662004-10-22 21:01:56 +0000767
Reid Spencercc2d1e22004-10-30 09:19:36 +0000768$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000769 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000770 $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \
771 then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \
772 else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi
Reid Spencer4d71b662004-10-22 21:01:56 +0000773
Reid Spencercc2d1e22004-10-30 09:19:36 +0000774$(ObjDir)/%.o: %.c $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000775 $(Echo) "Compiling $*.c for $(BuildMode) build"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000776 $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \
777 then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \
778 else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi
Reid Spencer3a561f52004-10-23 20:04:14 +0000779
780endif
Reid Spencer4d71b662004-10-22 21:01:56 +0000781
Reid Spencercc2d1e22004-10-30 09:19:36 +0000782#---------------------------------------------------------
783# Create .bc files in the ObjDir directory from .cpp and .c files...
784#---------------------------------------------------------
785$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000786 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000787 $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" $< -o $@ ; \
788 then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \
789 else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi
Reid Spencer4d71b662004-10-22 21:01:56 +0000790
Reid Spencercc2d1e22004-10-30 09:19:36 +0000791$(ObjDir)/%.bc: %.c $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000792 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000793 $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" $< -o $@ ; \
794 then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \
795 else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi
Reid Spencer4d71b662004-10-22 21:01:56 +0000796
Reid Spencercc2d1e22004-10-30 09:19:36 +0000797# Provide alternate rule sets if dependencies are disabled
Reid Spencer4d71b662004-10-22 21:01:56 +0000798else
799
Reid Spencer3a561f52004-10-23 20:04:14 +0000800ifdef SHARED_LIBRARY
801
Reid Spencercc2d1e22004-10-30 09:19:36 +0000802$(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000803 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
Reid Spencer3a561f52004-10-23 20:04:14 +0000804 $(LTCompile.CXX) $< -o $@
805
Reid Spencercc2d1e22004-10-30 09:19:36 +0000806$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000807 $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)"
Reid Spencer3a561f52004-10-23 20:04:14 +0000808 $(LTCompile.C) $< -o $@
809
810else
Reid Spencer4d71b662004-10-22 21:01:56 +0000811
Reid Spencercc2d1e22004-10-30 09:19:36 +0000812$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000813 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
Reid Spencer3a561f52004-10-23 20:04:14 +0000814 $(Compile.CXX) $< -o $@
Reid Spencer4d71b662004-10-22 21:01:56 +0000815
Reid Spencercc2d1e22004-10-30 09:19:36 +0000816$(ObjDir)/%.o: %.c $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000817 $(Echo) "Compiling $*.cpp for $(BuildMode) build"
Reid Spencer3a561f52004-10-23 20:04:14 +0000818 $(Compile.C) $< -o $@
819endif
Reid Spencer4d71b662004-10-22 21:01:56 +0000820
Reid Spencercc2d1e22004-10-30 09:19:36 +0000821$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000822 $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)"
Reid Spencer8676b7e2004-10-31 18:52:15 +0000823 $(BCCompile.CXX) $< -o $@
Reid Spencer4d71b662004-10-22 21:01:56 +0000824
Reid Spencercc2d1e22004-10-30 09:19:36 +0000825$(ObjDir)/%.bc: %.c $(ObjDir)/.dir
Reid Spencer9af3b292004-11-01 07:50:27 +0000826 $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)"
Reid Spencer8676b7e2004-10-31 18:52:15 +0000827 $(BCCompile.C) $< -o $@
Brian Gaeke44909cf2003-12-10 00:26:28 +0000828
Chris Lattner1cbc29f2001-09-07 22:57:58 +0000829endif
830
Reid Spencercc2d1e22004-10-30 09:19:36 +0000831#---------------------------------------------------------
832# Provide rule to build .bc files from .ll sources,
833# regardless of dependencies
834#---------------------------------------------------------
835$(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS)
Reid Spencer9af3b292004-11-01 07:50:27 +0000836 $(Echo) "Compiling $*.ll for $(BuildMode) build"
Reid Spencercc2d1e22004-10-30 09:19:36 +0000837 $(Verb) $(LLVMAS) $< -f -o $@
838
839###############################################################################
840# TABLEGEN: Provide rules for running tblgen to produce *.inc files
841###############################################################################
Chris Lattner481cc7c2003-08-15 02:18:35 +0000842
Reid Spencer4d71b662004-10-22 21:01:56 +0000843ifdef TARGET
844
Reid Spencercc2d1e22004-10-30 09:19:36 +0000845TDFiles := $(strip $(wildcard $(BUILD_SRC_DIR)/*.td) $(LLVM_SRC_ROOT)/lib/Target/Target.td)
846INCFiles := $(filter %.inc,$(BUILT_SOURCES))
Reid Spencer4d71b662004-10-22 21:01:56 +0000847
Reid Spencercc2d1e22004-10-30 09:19:36 +0000848$(INCFiles) : $(TBLGEN) $(TDFiles)
Reid Spencer4d71b662004-10-22 21:01:56 +0000849
Reid Spencer16544482004-10-27 04:34:35 +0000850%GenRegisterNames.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000851 $(Echo) "Building $(<F) register names with tblgen"
852 $(Verb) $(TableGen) -gen-register-enums -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000853
Reid Spencer16544482004-10-27 04:34:35 +0000854%GenRegisterInfo.h.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000855 $(Echo) "Building $(<F) register information header with tblgen"
856 $(Verb) $(TableGen) -gen-register-desc-header -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000857
858%GenRegisterInfo.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000859 $(Echo) "Building $(<F) register info implementation with tblgen"
860 $(Verb) $(TableGen) -gen-register-desc -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000861
862%GenInstrNames.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000863 $(Echo) "Building $(<F) instruction names with tblgen"
864 $(Verb) $(TableGen) -gen-instr-enums -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000865
866%GenInstrInfo.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000867 $(Echo) "Building $(<F) instruction information with tblgen"
868 $(Verb) $(TableGen) -gen-instr-desc -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000869
870%GenAsmWriter.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000871 $(Echo) "Building $(<F) assembly writer with tblgen"
872 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000873
874%GenATTAsmWriter.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000875 $(Echo) "Building $(<F) AT&T assembly writer with tblgen"
876 $(Verb) $(TableGen) -gen-asm-writer -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000877
878%GenIntelAsmWriter.inc : %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000879 $(Echo) "Building $(<F) Intel assembly writer with tblgen"
880 $(Verb) $(TableGen) -gen-asm-writer -asmwriternum=1 -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000881
882%GenInstrSelector.inc: %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000883 $(Echo) "Building $(<F) instruction selector with tblgen"
884 $(Verb) $(TableGen) -gen-instr-selector -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000885
886%GenCodeEmitter.inc:: %.td
Reid Spencercc2d1e22004-10-30 09:19:36 +0000887 $(Echo) "Building $(<F) code emitter with tblgen"
888 $(Verb) $(TableGen) -gen-emitter -o $@ $<
Reid Spencer4d71b662004-10-22 21:01:56 +0000889
Reid Spencer3a561f52004-10-23 20:04:14 +0000890clean-local::
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000891 -$(Verb) $(RM) -f $(INCFiles)
Reid Spencer4d71b662004-10-22 21:01:56 +0000892
893endif
Chris Lattner481cc7c2003-08-15 02:18:35 +0000894
Reid Spencercc2d1e22004-10-30 09:19:36 +0000895###############################################################################
896# LEX AND YACC: Provide rules for generating sources with lex and yacc
897###############################################################################
Chris Lattnere8996782003-01-16 22:44:19 +0000898
Reid Spencercc2d1e22004-10-30 09:19:36 +0000899#---------------------------------------------------------
900# Provide rules for generating a .cpp source file from
901# (f)lex input sources.
902#---------------------------------------------------------
903
Reid Spencer3d659492004-11-02 16:36:03 +0000904LexFiles := $(filter %.l,$(Sources))
Reid Spencercc2d1e22004-10-30 09:19:36 +0000905
Reid Spencer3d659492004-11-02 16:36:03 +0000906ifneq ($(LexFiles),)
907
908LexOutput := $(strip $(patsubst %.l,%.cpp,$(LexFiles)))
Reid Spencercc2d1e22004-10-30 09:19:36 +0000909
910.PRECIOUS: $(LexOutput)
911
912# Note the extra sed filtering here, used to cut down on the warnings emited
913# by GCC. The last line is a gross hack to work around flex aparently not
914# being able to resize the buffer on a large token input. Currently, for
915# uninitialized string buffers in LLVM we can generate very long tokens, so
916# this is a hack around it.
Chris Lattnerb7dc2b92003-08-15 20:00:47 +0000917# FIXME. (f.e. char Buffer[10000] )
Chris Lattner00950542001-06-06 20:29:01 +0000918%.cpp: %.l
Reid Spencercc2d1e22004-10-30 09:19:36 +0000919 $(Echo) Flexing $<
920 $(Verb) $(FLEX) -t $< | \
Reid Spencer4d71b662004-10-22 21:01:56 +0000921 $(SED) 's/void yyunput/inline void yyunput/' | \
922 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
923 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
Reid Spencer80f0ef72004-10-28 00:41:43 +0000924 > $@
Chris Lattner00950542001-06-06 20:29:01 +0000925
Reid Spencer9af3b292004-11-01 07:50:27 +0000926clean-local::
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000927 -$(Verb) $(RM) -f $(LexOutput)
Reid Spencer3d659492004-11-02 16:36:03 +0000928 $(Verb) $(RM) -f $(LexOutput)
Reid Spencer9af3b292004-11-01 07:50:27 +0000929
Reid Spencercc2d1e22004-10-30 09:19:36 +0000930endif
931
932#---------------------------------------------------------
933# Provide rules for generating a .cpp and .h source files
934# from yacc (bison) input sources.
935#---------------------------------------------------------
936
Reid Spencer3d659492004-11-02 16:36:03 +0000937YaccFiles := $(filter %.y,$(Sources))
938ifneq ($(YaccFiles),)
939YaccOutput := $(addprefix $(patsubst %.y,%,$(YaccFiles)),.h .cpp .output)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000940
941.PRECIOUS: $(YaccOutput)
942
943# Cancel built-in rules for yacc
944%.c: %.y
945%.cpp: %.y
946%.h: %.y
947
Chris Lattner00950542001-06-06 20:29:01 +0000948# Rule for building the bison parsers...
Chris Lattner00950542001-06-06 20:29:01 +0000949%.cpp %.h : %.y
Reid Spencercc2d1e22004-10-30 09:19:36 +0000950 $(Echo) "Bisoning $*.y"
951 $(Verb) $(BISON) -v -d -p $(<F:%Parser.y=%) -o $*.tab.c $<
952 $(Verb) $(MV) -f $*.tab.c $*.cpp
953 $(Verb) $(MV) -f $*.tab.h $*.h
Chris Lattner00950542001-06-06 20:29:01 +0000954
Reid Spencer9af3b292004-11-01 07:50:27 +0000955clean-local::
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000956 -$(Verb) $(RM) -f $(YaccOutput)
Reid Spencer3d659492004-11-02 16:36:03 +0000957 $(Verb) $(RM) -f $(YaccOutput)
Reid Spencercc2d1e22004-10-30 09:19:36 +0000958endif
Chris Lattner00950542001-06-06 20:29:01 +0000959
Reid Spencercc2d1e22004-10-30 09:19:36 +0000960###############################################################################
961# OTHER RULES: Other rules needed
962###############################################################################
Reid Spencer4d71b662004-10-22 21:01:56 +0000963
Chris Lattner30440c62003-01-16 21:06:18 +0000964# To create postscript files from dot files...
John Criswelle0f9ac62003-10-02 19:02:02 +0000965ifneq ($(DOT),false)
Chris Lattner30440c62003-01-16 21:06:18 +0000966%.ps: %.dot
Reid Spencer4d71b662004-10-22 21:01:56 +0000967 $(DOT) -Tps < $< > $@
John Criswell7a73b802003-06-30 21:59:07 +0000968else
969%.ps: %.dot
Reid Spencercc2d1e22004-10-30 09:19:36 +0000970 $(Echo) "Cannot build $@: The program dot is not installed"
John Criswell7a73b802003-06-30 21:59:07 +0000971endif
Chris Lattner30440c62003-01-16 21:06:18 +0000972
John Criswell7f336952003-09-06 14:44:17 +0000973# This rules ensures that header files that are removed still have a rule for
974# which they can be "generated." This allows make to ignore them and
975# reproduce the dependency lists.
John Criswell4b6e5d12003-09-18 18:37:08 +0000976%.h:: ;
John Criswell7f336952003-09-06 14:44:17 +0000977
Reid Spencercc2d1e22004-10-30 09:19:36 +0000978# Define clean-local to clean the current directory. Note that this uses a
979# very conservative approach ensuring that empty variables do not cause
980# errors or disastrous removal.
Reid Spencer3a561f52004-10-23 20:04:14 +0000981clean-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +0000982ifneq ($(strip $(ObjDir)),)
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000983 -$(Verb) $(RM) -rf $(ObjDir)
Reid Spencere5487ba2004-10-24 07:53:21 +0000984endif
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000985 -$(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc
Brian Gaeke9d3cd402004-01-21 19:53:11 +0000986ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000987 -$(Verb) $(RM) -f *$(SHLIBEXT)
Brian Gaeke9d3cd402004-01-21 19:53:11 +0000988endif
John Criswell7a73b802003-06-30 21:59:07 +0000989
Reid Spencer3d659492004-11-02 16:36:03 +0000990clean-all-local::
Reid Spencerca5fe8f2004-11-02 16:56:15 +0000991 -$(Verb) $(RM) -rf Debug Release Profile
Reid Spencer3d659492004-11-02 16:36:03 +0000992
Reid Spencercc2d1e22004-10-30 09:19:36 +0000993# Build tags database for Emacs/Xemacs:
Reid Spencer12d79512004-11-12 02:27:36 +0000994tags:: TAGS CTAGS
995
Reid Spencercc2d1e22004-10-30 09:19:36 +0000996TAGS:
Reid Spencer12d79512004-11-12 02:27:36 +0000997 find $(BUILD_SRC_ROOT)/include $(BUILD_SRC_ROOT)/lib \
998 $(BUILD_SRC_ROOT)/tools $(BUILD_SRC_ROOT)/examples \
999 $(BUILD_OBJ_ROOT)/include $(BUILD_OBJ_ROOT)/lib \
1000 $(BUILD_OBJ_ROOT)/tools $(BUILD_OBJ_ROOT)/examples \
1001 -name '*.cpp' -o -name '*.h' | \
Reid Spencercc2d1e22004-10-30 09:19:36 +00001002 $(ETAGS) $(ETAGSFLAGS) -
1003
Reid Spencer12d79512004-11-12 02:27:36 +00001004CTAGS:
1005 find $(BUILD_SRC_ROOT)/include $(BUILD_SRC_ROOT)/lib \
1006 $(BUILD_SRC_ROOT)/tools $(BUILD_SRC_ROOT)/examples \
1007 $(BUILD_OBJ_ROOT)/include $(BUILD_OBJ_ROOT)/lib \
1008 $(BUILD_OBJ_ROOT)/tools $(BUILD_OBJ_ROOT)/examples \
1009 \( -name '*.cpp' -o -name '*.h' \) -print | \
1010 ctags -ImtT -o $(BUILD_OBJ_ROOT)/CTAGS -L -
1011
1012
Reid Spencer3a561f52004-10-23 20:04:14 +00001013###############################################################################
1014# DEPENDENCIES: Include the dependency files if we should
1015###############################################################################
Chris Lattner33ad24a2003-08-22 14:10:16 +00001016ifndef DISABLE_AUTO_DEPENDENCIES
1017
Reid Spencer3a561f52004-10-23 20:04:14 +00001018# If its not one of the cleaning targets
Reid Spencercc2d1e22004-10-30 09:19:36 +00001019ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),)
Reid Spencer4d71b662004-10-22 21:01:56 +00001020
Reid Spencer3a561f52004-10-23 20:04:14 +00001021# Get the list of dependency files
Reid Spencercc2d1e22004-10-30 09:19:36 +00001022DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources)))
Reid Spencer9af3b292004-11-01 07:50:27 +00001023DependFiles := $(patsubst %,$(BUILD_OBJ_DIR)/$(BuildMode)/%.d,$(DependFiles))
Misha Brukman4f7a8cf2003-11-09 21:36:19 +00001024
Reid Spencer3a561f52004-10-23 20:04:14 +00001025-include /dev/null $(DependFiles)
1026
John Criswelld741bcf2003-08-12 18:51:51 +00001027endif
Chris Lattner1ddb6b62003-08-18 17:27:40 +00001028
Reid Spencercc2d1e22004-10-30 09:19:36 +00001029endif
Reid Spencer4d71b662004-10-22 21:01:56 +00001030
Reid Spencer151f8ba2004-10-25 08:27:37 +00001031###############################################################################
Reid Spencercc2d1e22004-10-30 09:19:36 +00001032# DISTRIBUTION: Handle construction of a distribution tarball
Reid Spencer151f8ba2004-10-25 08:27:37 +00001033###############################################################################
1034
Reid Spencere45ebfa2004-10-26 07:09:33 +00001035#------------------------------------------------------------------------
1036# Define distribution related variables
1037#------------------------------------------------------------------------
Reid Spencer151f8ba2004-10-25 08:27:37 +00001038DistName := $(LLVM_TARBALL_NAME)
1039DistDir := $(BUILD_OBJ_ROOT)/$(DistName)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001040TopDistDir := $(BUILD_OBJ_ROOT)/$(DistName)
Reid Spencer151f8ba2004-10-25 08:27:37 +00001041DistTarGZip := $(BUILD_OBJ_ROOT)/$(DistName).tar.gz
1042DistZip := $(BUILD_OBJ_ROOT)/$(DistName).zip
1043DistTarBZ2 := $(BUILD_OBJ_ROOT)/$(DistName).tar.bz2
1044DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \
1045 ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001046 Makefile.config.in configure autoconf
1047DistOther := $(notdir $(wildcard \
1048 $(BUILD_SRC_DIR)/*.h \
1049 $(BUILD_SRC_DIR)/*.td \
1050 $(BUILD_SRC_DIR)/*.def \
1051 $(BUILD_SRC_DIR)/*.ll \
1052 $(BUILD_SRC_DIR)/*.in))
Reid Spencercc2d1e22004-10-30 09:19:36 +00001053DistSubDirs := $(SubDirs)
Reid Spencerfbbf3072004-11-29 05:00:33 +00001054DistSources = $(Sources) $(EXTRA_DIST)
1055DistFiles = $(DistAlways) $(DistSources) $(DistOther)
Reid Spencer151f8ba2004-10-25 08:27:37 +00001056
Reid Spencere45ebfa2004-10-26 07:09:33 +00001057#------------------------------------------------------------------------
1058# We MUST build distribution with OBJ_DIR != SRC_DIR
1059#------------------------------------------------------------------------
1060ifeq ($(BUILD_SRC_DIR),$(BUILD_OBJ_DIR))
1061dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
Reid Spencercc2d1e22004-10-30 09:19:36 +00001062 $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR
Reid Spencere45ebfa2004-10-26 07:09:33 +00001063
1064DistCheckTop :=
1065else
1066
1067DistCheckTop := check
Reid Spencercc2d1e22004-10-30 09:19:36 +00001068
Reid Spencere45ebfa2004-10-26 07:09:33 +00001069#------------------------------------------------------------------------
1070# Prevent catastrophic remove
1071#------------------------------------------------------------------------
1072ifeq ($(LLVM_TARBALL_NAME),)
1073$(error LLVM_TARBALL_NAME is empty. Please rerun configure)
1074endif
1075
1076#------------------------------------------------------------------------
1077# Prevent attempt to run dist targets from anywhere but the top level
1078#------------------------------------------------------------------------
1079ifneq ($(LEVEL),.)
1080
1081dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip ::
Reid Spencercc2d1e22004-10-30 09:19:36 +00001082 $(Echo) ERROR: You must run $@ from $(BUILD_OBJ_ROOT)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001083
1084else
1085
1086#------------------------------------------------------------------------
1087# Provide the top level targets
1088#------------------------------------------------------------------------
1089
Reid Spencercc2d1e22004-10-30 09:19:36 +00001090dist-gzip:: $(DistTarGZip)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001091
1092$(DistTarGZip) : distdir
Reid Spencercc2d1e22004-10-30 09:19:36 +00001093 $(Echo) Packing gzipped distribution tar file.
Reid Spencerfbbf3072004-11-29 05:00:33 +00001094 $(Verb) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \
1095 $(GZIP) -c > "$(DistTarGZip)"
Reid Spencere45ebfa2004-10-26 07:09:33 +00001096
Reid Spencercc2d1e22004-10-30 09:19:36 +00001097dist-bzip2:: $(DistTarBZ2)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001098
1099$(DistTarBZ2) : distdir
Reid Spencercc2d1e22004-10-30 09:19:36 +00001100 $(Echo) Packing bzipped distribution tar file.
Reid Spencerfbbf3072004-11-29 05:00:33 +00001101 $(Verb) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \
1102 $(BZIP2) -c >$(DistTarBZ2)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001103
Reid Spencercc2d1e22004-10-30 09:19:36 +00001104dist-zip:: $(DistZip)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001105
1106$(DistZip) : distdir
Reid Spencercc2d1e22004-10-30 09:19:36 +00001107 $(Echo) Packing zipped distribution file.
1108 $(Verb) rm -f $(DistZip)
1109 $(Verb) cd $(BUILD_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001110
1111dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip)
Reid Spencercc2d1e22004-10-30 09:19:36 +00001112 $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL =====
Reid Spencere45ebfa2004-10-26 07:09:33 +00001113
1114DistCheckDir := $(LLVM_OBJ_ROOT)/_distcheckdir
1115
Reid Spencer9411c642004-10-26 22:26:33 +00001116dist-check:: $(DistCheckTop) $(DistTarGZip)
Reid Spencercc2d1e22004-10-30 09:19:36 +00001117 $(Echo) Checking distribution tar file.
1118 $(Verb) if test -d $(DistCheckDir) ; then \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001119 $(RM) -rf $(DistCheckDir) ; \
1120 fi
Reid Spencercc2d1e22004-10-30 09:19:36 +00001121 $(Verb) $(MKDIR) $(DistCheckDir)
1122 $(Verb) cd $(DistCheckDir) && \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001123 $(MKDIR) $(DistCheckDir)/build && \
1124 $(MKDIR) $(DistCheckDir)/install && \
1125 gunzip -c $(DistTarGZip) | $(TAR) xf - && \
1126 cd build && \
1127 ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \
1128 --srcdir=../$(DistName) --with-llvmgccdir="$(LLVMGCCDIR)" && \
1129 $(MAKE) check && \
1130 $(MAKE) install && \
1131 $(MAKE) uninstall && \
1132 $(MAKE) dist && \
1133 $(MAKE) clean && \
1134 $(MAKE) dist-clean && \
Reid Spencercc2d1e22004-10-30 09:19:36 +00001135 $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution =====
Reid Spencere45ebfa2004-10-26 07:09:33 +00001136
1137dist-clean::
Reid Spencercc2d1e22004-10-30 09:19:36 +00001138 $(Echo) Cleaning distribution files
Reid Spencerca5fe8f2004-11-02 16:56:15 +00001139 -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir)
Reid Spencere45ebfa2004-10-26 07:09:33 +00001140
1141endif
1142
1143#------------------------------------------------------------------------
1144# Provide the recursive distdir target for building the distribution directory
1145#------------------------------------------------------------------------
Reid Spencer9411c642004-10-26 22:26:33 +00001146distdir : $(DistSources)
Reid Spencercc2d1e22004-10-30 09:19:36 +00001147 $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001148 if test -d "$(DistDir)" ; then \
1149 find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \
1150 exit 1 ; \
1151 fi ; \
Reid Spencercc2d1e22004-10-30 09:19:36 +00001152 $(EchoCmd) Removing $(DistDir) ; \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001153 $(RM) -rf $(DistDir); \
1154 fi
Reid Spencerfbbf3072004-11-29 05:00:33 +00001155 $(Echo) Building Distribution Directory $(DistDir)
Reid Spencercc2d1e22004-10-30 09:19:36 +00001156 $(Verb) $(MKDIR) $(DistDir)
1157 $(Verb) srcdirstrip=`echo "$(BUILD_SRC_DIR)" | sed 's|.|.|g'`; \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001158 srcrootstrip=`echo "$(BUILD_SRC_ROOT)" | sed 's|.|.|g'`; \
1159 for file in $(DistFiles) ; do \
1160 case "$$file" in \
1161 $(BUILD_SRC_DIR)/*) file=`echo "$$file" | sed "s#^$$srcdirstrip/##"`;; \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001162 $(BUILD_SRC_ROOT)/*) file=`echo "$$file" | sed "s#^$$srcrootstrip/#$(BUILD_OBJ_ROOT)/#"`;; \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001163 esac; \
1164 if test -f "$$file" || test -d "$$file" ; then \
1165 from_dir=. ; \
1166 else \
1167 from_dir=$(BUILD_SRC_DIR); \
1168 fi; \
1169 to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'`; \
1170 if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \
1171 to_dir="$(DistDir)/$$dir"; \
1172 $(MKDIR) "$$to_dir" ; \
1173 else \
1174 to_dir="$(DistDir)"; \
1175 fi; \
1176 mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \
1177 if test -n "$$mid_dir" ; then \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001178 $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001179 fi ; \
1180 if test -d "$$from_dir/$$file"; then \
1181 if test -d "$(BUILD_SRC_DIR)/$$file" && \
1182 test "$$from_dir" != "$(BUILD_SRC_DIR)" ; then \
1183 cp -pR "$(BUILD_SRC_DIR)/$$file" "$$to_dir" || exit 1; \
1184 fi; \
1185 cp -pR $$from_dir/$$file $$to_dir || exit 1; \
1186 elif test -f "$$from_dir/$$file" ; then \
1187 cp -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \
1188 elif test -L "$$from_dir/$$file" ; then \
1189 cp -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \
1190 elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \
Reid Spencercc2d1e22004-10-30 09:19:36 +00001191 $(EchoCmd) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \
1192 elif test "$(Verb)" != '@' ; then \
1193 $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001194 fi; \
1195 done
Reid Spencercc2d1e22004-10-30 09:19:36 +00001196 $(Verb) for subdir in $(DistSubDirs) ; do \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001197 if test "$$subdir" \!= "." ; then \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001198 new_distdir="$(DistDir)/$$subdir" ; \
Reid Spencere45ebfa2004-10-26 07:09:33 +00001199 test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \
1200 ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001201 fi; \
1202 done
Reid Spencercc2d1e22004-10-30 09:19:36 +00001203 $(Verb) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1
1204 -$(Verb) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
Reid Spencer151f8ba2004-10-25 08:27:37 +00001205 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
1206 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
1207 ! -type d ! -perm -444 -exec $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \
1208 || chmod -R a+r $(DistDir)
1209
Reid Spencercc2d1e22004-10-30 09:19:36 +00001210# This is invoked by distdir target, define it as a no-op to avoid errors if not
1211# defined by user.
Reid Spencer151f8ba2004-10-25 08:27:37 +00001212dist-hook::
1213
Reid Spencere53e3972004-10-22 23:06:30 +00001214endif
Reid Spencer4d71b662004-10-22 21:01:56 +00001215
1216###############################################################################
Reid Spencere5487ba2004-10-24 07:53:21 +00001217# TOP LEVEL - targets only to apply at the top level directory
1218###############################################################################
1219
1220ifeq ($(LEVEL),.)
1221
1222#------------------------------------------------------------------------
Reid Spencere5487ba2004-10-24 07:53:21 +00001223# Install support for project's include files:
1224#------------------------------------------------------------------------
1225install-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +00001226 $(Echo) Installing include files
1227 $(Verb) $(MKDIR) $(includedir)
1228 $(Verb) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \
Reid Spencere5487ba2004-10-24 07:53:21 +00001229 cd $(BUILD_SRC_ROOT)/include && \
1230 find . -path '*/Internal' -prune -o '(' -type f \
1231 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
1232 -print ')' | grep -v CVS | pax -rwdvpe $(includedir) ; \
1233 fi
1234
1235uninstall-local::
Reid Spencercc2d1e22004-10-30 09:19:36 +00001236 $(Echo) Uninstalling include files
1237 $(Verb) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \
Reid Spencere5487ba2004-10-24 07:53:21 +00001238 cd $(BUILD_SRC_ROOT)/include && \
1239 $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
1240 '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \
1241 -print ')' | grep -v CVS | sed 's#^#$(includedir)/#'` ; \
1242 fi
1243
Reid Spencere5487ba2004-10-24 07:53:21 +00001244endif
1245
Reid Spencer4d71b662004-10-22 21:01:56 +00001246#------------------------------------------------------------------------
1247# Print out the directories used for building
Reid Spencercc2d1e22004-10-30 09:19:36 +00001248#------------------------------------------------------------------------
Reid Spencer3a561f52004-10-23 20:04:14 +00001249printvars::
Reid Spencer9af3b292004-11-01 07:50:27 +00001250 $(Echo) "BuildMode : " '$(BuildMode)'
Reid Spencercc2d1e22004-10-30 09:19:36 +00001251 $(Echo) "BUILD_SRC_ROOT : " '$(BUILD_SRC_ROOT)'
1252 $(Echo) "BUILD_SRC_DIR : " '$(BUILD_SRC_DIR)'
1253 $(Echo) "BUILD_OBJ_ROOT : " '$(BUILD_OBJ_ROOT)'
1254 $(Echo) "BUILD_OBJ_DIR : " '$(BUILD_OBJ_DIR)'
1255 $(Echo) "LLVM_SRC_ROOT : " '$(LLVM_SRC_ROOT)'
1256 $(Echo) "LLVM_OBJ_ROOT : " '$(LLVM_OBJ_ROOT)'
1257 $(Echo) "libdir : " '$(libdir)'
1258 $(Echo) "bindir : " '$(bindir)'
1259 $(Echo) "sysconfdir : " '$(sysconfdir)'
1260 $(Echo) "bytecode_libdir: " '$(bytecode_libdir)'
1261 $(Echo) "UserTargets : " '$(UserTargets)'
1262 $(Echo) "ObjMakefiles : " '$(ObjMakefiles)'
1263 $(Echo) "SrcMakefiles : " '$(SrcMakefiles)'
1264 $(Echo) "ObjDir : " '$(ObjDir)'
1265 $(Echo) "LibDir : " '$(LibDir)'
1266 $(Echo) "ToolDir : " '$(ToolDir)'
Reid Spencer815cbcf2004-11-18 10:03:46 +00001267 $(Echo) "ExmplDir : " '$(ExmplDir)'
Reid Spencercc2d1e22004-10-30 09:19:36 +00001268 $(Echo) "TDFiles : " '$(TDFiles)'
1269 $(Echo) "INCFiles : " '$(INCFiles)'
1270 $(Echo) "Compile.CXX : " '$(Compile.CXX)'
1271 $(Echo) "Compile.C : " '$(Compile.C)'
1272 $(Echo) "Archive : " '$(Archive)'
Reid Spencer3d659492004-11-02 16:36:03 +00001273 $(Echo) "YaccFiles : " '$(YaccFiles)'
1274 $(Echo) "LexFiles : " '$(LexFiles)'