forked from OSchip/llvm-project
parent
1fc5e98327
commit
0343be4ff6
|
@ -1,3 +1,4 @@
|
||||||
LEVEL = ..
|
LEVEL = ..
|
||||||
DIRS = Feature Regression Programs
|
DIRS = Feature Libraries Regression Programs
|
||||||
include ../Makefile.common
|
include ../Makefile.common
|
||||||
|
|
||||||
|
|
|
@ -10,26 +10,41 @@ include ${LEVEL}/Makefile.common
|
||||||
|
|
||||||
.PHONY: clean default
|
.PHONY: clean default
|
||||||
|
|
||||||
## keep %.bc and %.s from being deleted while we're debugging
|
# These files, which might be intermediate results, should not be deleted by
|
||||||
.PRECIOUS: Output/%.bc Output/%.ll %.s Output/.dir
|
# make
|
||||||
|
.PRECIOUS: Output/%.bc Output/%.ll
|
||||||
|
.PRECIOUS: Output/%.tbc Output/%.tll
|
||||||
|
.PRECIOUS: Output/.dir
|
||||||
|
|
||||||
|
# LLVM Tool Definitions...
|
||||||
|
#
|
||||||
|
LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc
|
||||||
TOOLS = $(LEVEL)/tools/Debug
|
TOOLS = $(LEVEL)/tools/Debug
|
||||||
|
|
||||||
LLI = $(TOOLS)/lli
|
LLI = $(TOOLS)/lli
|
||||||
LLC = $(TOOLS)/llc
|
LLC = $(TOOLS)/llc
|
||||||
LAS = $(TOOLS)/gccas
|
LAS = $(TOOLS)/as
|
||||||
|
LGCCAS = $(TOOLS)/gccas
|
||||||
LDIS = $(TOOLS)/dis
|
LDIS = $(TOOLS)/dis
|
||||||
LOPT = $(TOOLS)/opt
|
LOPT = $(TOOLS)/opt
|
||||||
LLINK = $(TOOLS)/link
|
LLINK = $(TOOLS)/link
|
||||||
LLCFLAGS =
|
|
||||||
|
|
||||||
LCC = /home/vadve/lattner/cvs/gcc_install/bin/gcc
|
LCCFLAGS += -O2 -Wall
|
||||||
LCFLAGS += -O2 -Wall
|
LLCFLAGS =
|
||||||
|
FAILURE = $(LEVEL)/test/Failure.sh
|
||||||
|
|
||||||
|
# Native Tool Definitions
|
||||||
|
NATGCC = /usr/dcs/software/supported/bin/gcc
|
||||||
|
CC = /opt/SUNWspro/bin/cc
|
||||||
|
AS = /opt/SUNWspro/bin/cc
|
||||||
|
DIS = /usr/ccs/bin/dis
|
||||||
|
CP = /bin/cp -f
|
||||||
|
CFLAGS += -g -xarch=v9
|
||||||
|
|
||||||
LLCLIB = $(LEVEL)/test/runtime.o
|
LLCLIB = $(LEVEL)/test/runtime.o
|
||||||
LIBS += $(LLCLIB)
|
LIBS += $(LLCLIB)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(TRACE), yes)
|
ifeq ($(TRACE), yes)
|
||||||
LLCFLAGS += -trace
|
LLCFLAGS += -trace
|
||||||
endif
|
endif
|
||||||
|
@ -37,43 +52,36 @@ ifeq ($(TRACEM), yes)
|
||||||
LLCFLAGS += -tracem
|
LLCFLAGS += -tracem
|
||||||
endif
|
endif
|
||||||
|
|
||||||
NATGCC = /usr/dcs/software/supported/bin/gcc
|
|
||||||
|
|
||||||
CC = /opt/SUNWspro/bin/cc
|
|
||||||
AS = /opt/SUNWspro/bin/cc
|
|
||||||
DIS = /usr/ccs/bin/dis
|
|
||||||
CP = /bin/cp -f
|
|
||||||
CFLAGS += -g -xarch=v9
|
|
||||||
|
|
||||||
## Special target to force target-dependent library to be compiled
|
|
||||||
## directly to native code.
|
|
||||||
##
|
|
||||||
$(LLCLIB): $(LLCLIB:.o=.c)
|
|
||||||
cd $(LEVEL)/test; $(MAKE) $(@F)
|
|
||||||
|
|
||||||
#runtime.o: runtime.c
|
|
||||||
# $(CC) -c $(CCFLAGS) $<
|
|
||||||
|
|
||||||
clean ::
|
clean ::
|
||||||
$(RM) *.bc *.mc *.s *.o a.out core
|
$(RM) a.out core
|
||||||
$(RM) -rf Output/
|
$(RM) -rf Output/
|
||||||
|
|
||||||
%.mc: %.bc $(LLC) $(AS)
|
|
||||||
@echo "Generating machine instructions for $<"
|
|
||||||
$(LLC) -f -dsched y $(LLCFLAGS) $< > $@
|
|
||||||
|
|
||||||
%.trace.bc: %.bc $(LLC)
|
|
||||||
$(LLC) -f -trace $(LLCFLAGS) $<
|
|
||||||
|
|
||||||
|
|
||||||
Output/%.ll: %.c $(LCC) Output/.dir
|
Output/%.ll: %.c $(LCC) Output/.dir
|
||||||
$(LCC) $(LCFLAGS) -S $< -o $@
|
$(LCC) $(LCCFLAGS) -S $< -o $@
|
||||||
|
|
||||||
Output/%.bc: Output/%.ll $(LAS)
|
Output/%.bc: Output/%.ll $(LGCCAS)
|
||||||
|
$(LGCCAS) $< -o $@
|
||||||
|
|
||||||
|
Output/%.bc: %.ll $(LAS)
|
||||||
$(LAS) $< -o $@
|
$(LAS) $< -o $@
|
||||||
|
|
||||||
|
#
|
||||||
|
# Testing versions of provided utilities...
|
||||||
|
#
|
||||||
|
Output/%.tll: %.c $(LCC) Output/.dir
|
||||||
|
@echo "======== Compiling $<"
|
||||||
|
$(LCC) $(LCCFLAGS) -S $< -o $@ || \
|
||||||
|
( rm -f $@; $(FAILURE) $@ )
|
||||||
|
|
||||||
|
Output/%.tbc: Output/%.tll $(LAS)
|
||||||
|
@echo "======== Assembling $<"
|
||||||
|
$(LAS) -f $< -o $@ || \
|
||||||
|
( rm -f $@; $(FAILURE) $@ )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#%.s: %.linked.bc
|
#%.s: %.linked.bc
|
||||||
# $(LLC) -f $(LCFLAGS) $< -o $@
|
# $(LLC) -f $(LLCFLAGS) $< -o $@
|
||||||
|
|
||||||
#%: %.o $(LIBS)
|
#%: %.o $(LIBS)
|
||||||
# $(CC) $(LDFLAGS) $< $(LIBS) -o $@
|
# $(CC) $(LDFLAGS) $< $(LIBS) -o $@
|
||||||
|
|
Loading…
Reference in New Issue