diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-09-20 16:14:47 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-09-20 16:14:47 +0000 |
commit | c4f67270f30975e31ded798ed207ea6bfd645359 (patch) | |
tree | 36a4ed13fe1b4155a7f5ab6983c377ba2397d9cd /utils/Burg | |
parent | 270d78a8d6fc66050f674fae91b23850ded95615 (diff) | |
download | external_llvm-c4f67270f30975e31ded798ed207ea6bfd645359.zip external_llvm-c4f67270f30975e31ded798ed207ea6bfd645359.tar.gz external_llvm-c4f67270f30975e31ded798ed207ea6bfd645359.tar.bz2 |
Build burg separately for different architectures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/Burg')
-rw-r--r-- | utils/Burg/Makefile | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/utils/Burg/Makefile b/utils/Burg/Makefile index ddec8cc..c22bd55 100644 --- a/utils/Burg/Makefile +++ b/utils/Burg/Makefile @@ -2,8 +2,11 @@ LEVEL = ../.. +UNAME := $(shell uname) include $(LEVEL)/Makefile.config -include $(LEVEL)/Makefile.$(shell uname) +include $(LEVEL)/Makefile.$(UNAME) + +TARGET = burg.$(UNAME) #CFLAGS = #CFLAGS = -O @@ -50,6 +53,8 @@ BU_OBJS = \ trim.o \ zalloc.o +BU_OBJS := $(addprefix $(UNAME)/,$(BU_OBJS)) + FE_OBJS = \ be.o \ fe.o \ @@ -60,17 +65,19 @@ FE_OBJS = \ symtab.o \ y.tab.o -all: burg +FE_OBJS := $(addprefix $(UNAME)/,$(FE_OBJS)) +all: $(TARGET) -burg: $(BU_OBJS) $(FE_OBJS) - $(CC) -o burg $(CFLAGS) $(BU_OBJS) $(FE_OBJS) + +$(TARGET): $(BU_OBJS) $(FE_OBJS) + $(CC) -o $(TARGET) $(CFLAGS) $(BU_OBJS) $(FE_OBJS) y.tab.c y.tab.h: gram.y yacc -d gram.y clean: - rm -f *.o y.tab.h y.tab.c core burg *.aux *.log *.dvi sample sample.c tmp + rm -rf $(UNAME) *.o y.tab.h y.tab.c core burg *.aux *.log *.dvi sample sample.c tmp $(FE_OBJS): b.h $(BU_OBJS): b.h @@ -81,10 +88,13 @@ lex.o: y.tab.h doc.dvi: doc.tex latex doc; latex doc -test: burg sample.gr - ./burg -I <sample.gr >sample.c && cc $(CFLAGS) -o sample sample.c && ./sample - ./burg -I sample.gr >tmp && cmp tmp sample.c - ./burg -I <sample.gr -o tmp && cmp tmp sample.c - ./burg -I sample.gr -o tmp && cmp tmp sample.c - ./burg -I -O0 <sample.gr >tmp && cmp tmp sample.c - ./burg -I -= <sample.gr >tmp && cmp tmp sample.c +$(UNAME)/%.o: %.c + $(VERB) $(CC) -c -g $< -o $@ + +test: $(TARGET) sample.gr + ./$(TARGET) -I <sample.gr >sample.c && cc $(CFLAGS) -o sample sample.c && ./sample + ./$(TARGET) -I sample.gr >tmp && cmp tmp sample.c + ./$(TARGET) -I <sample.gr -o tmp && cmp tmp sample.c + ./$(TARGET) -I sample.gr -o tmp && cmp tmp sample.c + ./$(TARGET) -I -O0 <sample.gr >tmp && cmp tmp sample.c + ./$(TARGET) -I -= <sample.gr >tmp && cmp tmp sample.c |