mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
a98e7b5e75
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17361 91177308-0d34-0410-b5e6-96231b3b80d8
41 lines
929 B
Makefile
41 lines
929 B
Makefile
##===- projects/sample/Makefile ----------------------------*- Makefile -*-===##
|
|
#
|
|
# This is a sample Makefile for a project that uses LLVM.
|
|
#
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
#
|
|
# Indicates our relative path to the top of the project's root directory.
|
|
#
|
|
LEVEL = ../../..
|
|
DIRS =
|
|
|
|
EXTRA_DIST = fibonacci.st hello.st prime.st goof.st
|
|
|
|
SAMPLES = fibonacci hello prime goof
|
|
|
|
LLVMC_EXEC = LLVM_CONFIG_DIR=$(BUILD_SRC_ROOT)/tools/llvmc $(TOOLDIR)/llvmc
|
|
|
|
all :: $(SAMPLES)
|
|
|
|
ifdef OPTIMIZE
|
|
% : %.st
|
|
$(Echo) "Compiling and Optimizing $(<F)"
|
|
$(Verb)$(LLVMC_EXEC) -O3 $< -o $@
|
|
else
|
|
% : %.st
|
|
$(Echo) "Compiling $(<F)"
|
|
$(Verb)$(LLVMC_EXEC) $< -o $@
|
|
endif
|
|
|
|
SAMPLES_LL = $(SAMPLES:%=%.ll)
|
|
SAMPLES_BC = $(SAMPLES:%=%.bc)
|
|
SAMPLES_S = $(SAMPLES:%=%.s)
|
|
|
|
clean ::
|
|
$(Verb)rm -f gmon.out $(SAMPLES)
|
|
#
|
|
# Include the Master Makefile that knows how to build all.
|
|
#
|
|
include $(LEVEL)/Makefile.common
|