[llvm-commits] CVS: llvm/utils/Burg/Makefile
Vikram Adve
vadve at psmith.cs.uiuc.edu
Fri Sep 20 11:15:01 PDT 2002
Changes in directory llvm/utils/Burg:
Makefile updated: 1.7 -> 1.8
---
Log message:
Build burg separately for different architectures.
---
Diffs of the changes:
Index: llvm/utils/Burg/Makefile
diff -u llvm/utils/Burg/Makefile:1.7 llvm/utils/Burg/Makefile:1.8
--- llvm/utils/Burg/Makefile:1.7 Fri Sep 20 08:56:32 2002
+++ llvm/utils/Burg/Makefile Fri Sep 20 11:14:47 2002
@@ -1,9 +1,12 @@
-# $Id: Makefile,v 1.7 2002/09/20 13:56:32 vadve Exp $
+# $Id: Makefile,v 1.8 2002/09/20 16:14:47 vadve Exp $
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 @@
trim.o \
zalloc.o
+BU_OBJS := $(addprefix $(UNAME)/,$(BU_OBJS))
+
FE_OBJS = \
be.o \
fe.o \
@@ -60,17 +65,19 @@
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 @@
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
More information about the llvm-commits
mailing list