summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Tytgat <joty@netsurf-browser.org>2008-09-28 20:35:57 (GMT)
committer John Tytgat <joty@netsurf-browser.org>2008-09-28 20:35:57 (GMT)
commitf6977c13760a70589931c487a37f53f4c7700596 (patch)
tree45a281515deecd599de0beb0656fac103dff299d
parent957d6601bdd4b4b50f7a774f85676f3b7eb685ed (diff)
downloadlibrufl-f6977c13760a70589931c487a37f53f4c7700596.tar.gz
librufl-f6977c13760a70589931c487a37f53f4c7700596.tar.bz2
GCCSDK 4 build compatibility (not finished yet)
svn path=/trunk/rufl/; revision=5458
-rw-r--r--makefile23
1 files changed, 9 insertions, 14 deletions
diff --git a/makefile b/makefile
index 8c86381..0b3ed87 100644
--- a/makefile
+++ b/makefile
@@ -16,25 +16,14 @@ SOURCE = rufl_init.c rufl_quit.c rufl_dump_state.c \
rufl_find.c rufl_decompose.c rufl_metrics.c
HDRS = rufl.h rufl_internal.h
-ifeq (${AB_ELFBUILD},yes)
-EXEEXT=,e1f
-else
-EXEEXT=,ff8
-endif
-
.PHONY: all install clean
ifeq ($(COMPILER), gcc)
# cross-compiling using GCCSDK
GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
GCCSDK_INSTALL_ENV ?= /home/riscos/env
-ifeq (${AB_ELFBUILD},yes)
-CC = $(GCCSDK_INSTALL_CROSSBIN)/arm-unknown-riscos-gcc
-AR = $(GCCSDK_INSTALL_CROSSBIN)/arm-unknown-riscos-ar
-else
-CC = $(GCCSDK_INSTALL_CROSSBIN)/gcc
-AR = $(GCCSDK_INSTALL_CROSSBIN)/ar
-endif
+CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+AR := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
CFLAGS = -std=c99 -O3 -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
-Wcast-align -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
@@ -44,6 +33,11 @@ ARFLAGS = cr
LIBS = -L$(GCCSDK_INSTALL_ENV)/lib -lOSLib32
INSTALL = $(GCCSDK_INSTALL_ENV)/ro-install
OBJS = $(SOURCE:.c=.o)
+ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC)))
+ EXEEXT=,e1f
+else
+ EXEEXT=,ff8
+endif
all: librufl.a rufl_test$(EXEEXT) rufl_chars$(EXEEXT)
@@ -63,8 +57,9 @@ LIBS = OSLib:o.oslib32
MKDLK = makedlk
SOURCE += strfuncs.c
OBJS = $(SOURCE:.c=.o)
+EXEEXT =
-all: librufl.a rufl/pyd rufl_test,ff8 rufl_chars,ff8
+all: librufl.a rufl/pyd rufl_test rufl_chars
librufl.a: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS)