1 ##===- projects/sample/Makefile ----------------------------*- Makefile -*-===##
3 # This is a sample Makefile for a project that uses LLVM.
5 ##===----------------------------------------------------------------------===##
8 # Indicates our relative path to the top of the project's root directory.
13 # Directories that needs to be built.
17 SAMPLES = fibonacci hello prime
19 LLVMC_EXEC = $(TOOLDIR)/llvmc
25 @$(ECHO) "Compiling and Optimizing $(<F)"
26 $(VERB)$(LLVMC_EXEC) -O3 $< -o $@
29 @$(ECHO) "Compiling $(<F)"
30 $(VERB)$(LLVMC_EXEC) $< -o $@
33 SAMPLES_LL = $(SAMPLES:%=%.ll)
34 SAMPLES_BC = $(SAMPLES:%=%.bc)
35 SAMPLES_S = $(SAMPLES:%=%.s)
38 $(VERB)rm -f gmon.out $(SAMPLES)
40 # Include the Master Makefile that knows how to build all.
42 include $(LEVEL)/Makefile.common