summaryrefslogtreecommitdiff
path: root/translate/grt/Makefile.inc
diff options
context:
space:
mode:
authorgingold2005-10-24 19:53:59 +0000
committergingold2005-10-24 19:53:59 +0000
commit729ff8c7d5c4c93bc67bd496ef398adfc980df22 (patch)
tree019cae33a7c06632c5ad599a6b6d8e63a7281522 /translate/grt/Makefile.inc
parent37b4ff57b54a81d56dddf36945afe26841527b8f (diff)
downloadghdl-729ff8c7d5c4c93bc67bd496ef398adfc980df22.tar.gz
ghdl-729ff8c7d5c4c93bc67bd496ef398adfc980df22.tar.bz2
ghdl-729ff8c7d5c4c93bc67bd496ef398adfc980df22.zip
support of ia64 added, more stats added
Diffstat (limited to 'translate/grt/Makefile.inc')
-rw-r--r--translate/grt/Makefile.inc33
1 files changed, 26 insertions, 7 deletions
diff --git a/translate/grt/Makefile.inc b/translate/grt/Makefile.inc
index 55a45e9..249e84b 100644
--- a/translate/grt/Makefile.inc
+++ b/translate/grt/Makefile.inc
@@ -28,29 +28,45 @@
# target: GCC target
# GRT_FLAGS: compilation flags.
+# Convert the target variable into a space separated list of architecture,
+# manufacturer, and operating system and assign each of those to its own
+# variable.
+
+targ:=$(subst -, ,$(target))
+arch:=$(word 1,$(targ))
+ifeq ($(words $(targ)),2)
+ osys:=$(word 2,$(targ))
+else
+ osys:=$(word 3,$(targ))
+endif
+
# Set target files.
-ifeq ($(filter-out i%86-pc-linux-gnu,$(target)),)
+ifeq ($(filter-out i%86 linux,$(arch) $(osys)),)
GRT_TARGET_OBJS=i386.o linux.o times.o
GRT_EXTRA_LIB=-ldl
endif
-ifeq ($(filter-out sparc-sun-solaris%,$(target)),)
+ifeq ($(filter-out sparc solaris%,$(arch) $(osys)),)
GRT_TARGET_OBJS=sparc.o linux.o times.o
GRT_EXTRA_LIB=-ldl
endif
-ifeq ($(filter-out powerpc-linux%,$(target)),)
+ifeq ($(filter-out powerpc linux%,$(arch) $(osys)),)
GRT_TARGET_OBJS=ppc.o linux.o times.o
GRT_EXTRA_LIB=-ldl
endif
-ifeq ($(filter-out i%86-pc-mingw32,$(target)),)
+ifeq ($(filter-out ia64 linux,$(arch) $(osys)),)
+ GRT_TARGET_OBJS=ia64.o linux.o times.o
+ GRT_EXTRA_LIB=-ldl
+endif
+ifeq ($(filter-out i%86 mingw32,$(arch) $(osys)),)
GRT_TARGET_OBJS=win32.o clock.o
endif
-ifeq ($(filter-out i%86-pc-cygwin,$(target)),)
+ifeq ($(filter-out i%86 cygwin,$(arch) $(osys)),)
GRT_TARGET_OBJS=win32.o clock.o
endif
# Fall-back: use a generic implementation based on pthreads.
ifndef GRT_TARGET_OBJS
GRT_TARGET_OBJS=pthread.o times.o
- GRT_EXTRA_LIB=-lpthread
+ GRT_EXTRA_LIB=-lpthread -ldl
endif
# Additionnal object files (C or asm files).
@@ -90,6 +106,9 @@ sparc.o: $(GRTSRCDIR)/config/sparc.S
ppc.o: $(GRTSRCDIR)/config/ppc.S
$(CC) -c $(GRT_FLAGS) -o $@ $<
+ia64.o: $(GRTSRCDIR)/config/ia64.S
+ $(CC) -c $(GRT_FLAGS) -o $@ $<
+
linux.o: $(GRTSRCDIR)/config/linux.c
$(CC) -c $(GRT_FLAGS) -o $@ $<
@@ -127,7 +146,7 @@ grt-files.in: grt-files
grt.lst: grt-files.in
echo "@/libgrt.a" > $@
ifdef GRT_EXTRA_LIB
- echo $(GRT_EXTRA_LIB) >> $@
+ for i in $(GRT_EXTRA_LIB); do echo $$i >> $@; done
endif
cat $< >> $@