mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 01:34:32 +00:00
e198cd18bd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17300 91177308-0d34-0410-b5e6-96231b3b80d8
43 lines
870 B
Makefile
43 lines
870 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 = ../../..
|
|
|
|
#
|
|
# Directories that needs to be built.
|
|
#
|
|
DIRS =
|
|
|
|
SAMPLES = fibonacci hello prime
|
|
|
|
LLVMC_EXEC = $(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
|