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)
commit897040bbe04a0ec02cca7826f4258c2427cc8044 (patch)
treeeea6df2e1a3dd79c9e66f77d4fa329f66bb49baa
parent75f5899f28864e9b9fedacf72bb4214a2e07ce77 (diff)
downloadlibpencil-897040bbe04a0ec02cca7826f4258c2427cc8044.tar.gz
libpencil-897040bbe04a0ec02cca7826f4258c2427cc8044.tar.bz2
GCCSDK 4 build compatibility (not finished yet)
svn path=/trunk/pencil/; revision=5458
-rw-r--r--makefile20
1 files changed, 7 insertions, 13 deletions
diff --git a/makefile b/makefile
index 56be142..b31e1e6 100644
--- a/makefile
+++ b/makefile
@@ -11,21 +11,10 @@ HDRS = pencil.h pencil_internal.h
GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
GCCSDK_INSTALL_ENV ?= /home/riscos/env
-ifeq (${AB_ELFBUILD},yes)
-EXEEXT=,e1f
-else
-EXEEXT=,ff8
-endif
-
.PHONY: all install clean
-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 \
@@ -34,6 +23,11 @@ CFLAGS = -std=c99 -O3 -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
ARFLAGS = cr
LIBS = -L$(GCCSDK_INSTALL_ENV)/lib -lOSLib32 -lrufl
INSTALL = $(GCCSDK_INSTALL_ENV)/ro-install
+ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC)))
+ EXEEXT=,e1f
+else
+ EXEEXT=,ff8
+endif
OBJS = $(SOURCE:.c=.o)