mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
867c3cc380
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@866 91177308-0d34-0410-b5e6-96231b3b80d8
64 lines
1.2 KiB
Makefile
64 lines
1.2 KiB
Makefile
LLC := ../tools/Debug/llc
|
|
AS := ../tools/Debug/as
|
|
LLCOPTS := -dsched y
|
|
ARCHFLAGS = ## -xarch=v9
|
|
|
|
CC = /opt/SUNWspro/bin/cc
|
|
CCFLAGS = -g $(ARCHFLAGS)
|
|
## CC = gcc
|
|
## CCFLAGS = -g $(ARCHFLAGS) ## -mcpu=v9
|
|
|
|
TESTS := $(wildcard *.ll)
|
|
|
|
LLCTESTS := $(shell /bin/ls *.ll | grep -v testswitch | grep -v opttest | grep -v xx | grep -v calltest )
|
|
|
|
|
|
test all : testasmdis testopt testcodegen
|
|
@echo "All tests successfully completed!"
|
|
|
|
testasmdis : $(TESTS:%.ll=%.ll.asmdis)
|
|
@echo "All assembler/disassembler test succeeded!"
|
|
|
|
testopt : $(TESTS:%.ll=%.ll.opt)
|
|
|
|
testselect : $(LLCTESTS:%.ll=%.mc)
|
|
|
|
testsched : $(LLCTESTS:%.ll=%.mc)
|
|
|
|
testcodegen : $(LLCTESTS:%.ll=%.mc)
|
|
|
|
testsparc : $(LLCTESTS:%.ll=%.s)
|
|
|
|
clean :
|
|
rm -f *.[123] *.bc *.mc *.s core
|
|
|
|
%.asmdis: %
|
|
@echo "Running assembler/disassembler test on $<"
|
|
@./TestAsmDisasm.sh $<
|
|
|
|
%.opt: %
|
|
@echo "Running optimizier test on $<"
|
|
@./TestOptimizer.sh $<
|
|
|
|
%.bc: %.ll
|
|
$(AS) $< -f
|
|
|
|
%.mc: %.bc $(LLC) $(AS)
|
|
@echo "Generating machine instructions for $<"
|
|
$(LLC) $(LLCOPTS) $< > $@
|
|
|
|
%.s: %.ll $(LLC) $(AS)
|
|
$(AS) < $< | $(LLC) > $@
|
|
|
|
## %.o: %.s %.ll
|
|
## /usr/ccs/bin/as $(ARCHFLAGS) $<
|
|
|
|
|
|
%.o: %.s
|
|
$(CC) -c $(CCFLAGS) $< -xarch=v9
|
|
|
|
%: %.o
|
|
$(CC) -o $@ $< -xarch=v9
|
|
|
|
|