summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--Makefile-riscos4
-rw-r--r--bindings/xml/Makefile4
-rw-r--r--test/Makefile13
4 files changed, 15 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index a231fa8..55332c5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,6 @@
export CC = gcc
export AR = ar
export LD = gcc
-export XSLT = xsltproc
export CP = cp
export RM = rm
@@ -12,6 +11,7 @@ export ECHO = echo
export MAKE = make
export PERL = perl
export PKGCONFIG = pkg-config
+export XSLT = xsltproc
# Toolchain flags
WARNFLAGS = -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
@@ -28,6 +28,7 @@ export MVFLAGS =
export ECHOFLAGS =
export MAKEFLAGS =
export PKGCONFIGFLAGS =
+export XSLTFLAGS =
export EXEEXT =
diff --git a/Makefile-riscos b/Makefile-riscos
index f1d8cf0..43c0be3 100644
--- a/Makefile-riscos
+++ b/Makefile-riscos
@@ -13,7 +13,8 @@ export MV = mv
export ECHO = echo
export MAKE = make
export PERL = perl
-export PKGCONFIG = pkg-config
+export PKGCONFIG = $(GCCSDK_INSTALL_ENV)/ro-pkg-config
+export XSLT = xsltproc
# Toolchain flags
WARNFLAGS = -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
@@ -31,6 +32,7 @@ export MVFLAGS =
export ECHOFLAGS =
export MAKEFLAGS =
export PKGCONFIGFLAGS =
+export XSLTFLAGS =
export EXEEXT = ,ff8
diff --git a/bindings/xml/Makefile b/bindings/xml/Makefile
index e1239ec..53a76f9 100644
--- a/bindings/xml/Makefile
+++ b/bindings/xml/Makefile
@@ -19,7 +19,9 @@
# test Execute any test cases
# Manipulate include paths
-CFLAGS += -I$(CURDIR) `pkg-config --cflags libxml-2.0` -D_POSIX_C_SOURCE
+CFLAGS += -I$(CURDIR) \
+ `${PKGCONFIG} ${PKGCONFIGFLAGS} --cflags libxml-2.0` \
+ -D_POSIX_C_SOURCE
# Objects
OBJS = xmlbinding xmlparser
diff --git a/test/Makefile b/test/Makefile
index c8e44fe..f2cc1d3 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -20,7 +20,7 @@
# Extend toolchain settings
CFLAGS += -I${TOP}/src/ -I${TOP}/bindings/xml/ -I$(CURDIR)
-LDFLAGS += `pkg-config --libs libxml-2.0`
+LDFLAGS += `${PKGCONFIG} ${PKGCONFIGFLAGS} --libs libxml-2.0`
# Release output
RELEASE =
@@ -47,6 +47,7 @@ debug:
clean:
ifneq (${OBJS}, )
-@${RM} ${RMFLAGS} $(CFILES)
+ -@${RM} ${RMFLAGS} $(CFILES:.c=.o)
-@${RM} ${RMFLAGS} $(addsuffix ${EXEEXT}, $(OBJS))
endif
@@ -59,15 +60,15 @@ export:
test: $(OBJS)
@${PERL} testrunner.pl ${EXEEXT}
-
+
transform: $(CFILES)
# Pattern rules
%: %.c
@${ECHO} ${ECHOFLAGS} "==> $<"
- @${CC} -c -g ${CFLAGS} -o $@.o $<
- @${LD} -g -o $@ $@.o ${LDFLAGS} -ldom-libxml-debug -ldom-debug
+ ${CC} -c -g ${CFLAGS} -o $@.o $<
+ ${LD} -g -o $@ $@.o ${LDFLAGS} -ldom-libxml-debug -ldom-debug
@${RM} ${RMFLAGS} $@.o
-
+
%.c: %.xml
- @${XSLT} -o $@ transform/test-to-c.xsl $<
+ @${XSLT} ${XSLTFLAGS} -o $@ transform/test-to-c.xsl $<