Commit 89bdd845 authored by Ben Avison's avatar Ben Avison
Browse files

Improvements to building transient utilities

* Add cross-compilation `CUtil` makefile fragment and define `SUFFIX_UTILITY`
* Switch to linking with `-util`. This automatically attaches headers and
  footers to the binary, and requires `link` 5.36 (16 Mar 2014 - long enough
  ago that I think that we can assume everyone wil have upgraded)
parent 5a9dd836
# Makefile fragment for C and assembler transient utilties
INCLUDED_CUTIL = YES
# This makefile provides the following phony targets:
#
# all install debug
#
# It inherits most of its properties from the CApp makefile.
CUSTOMLINK = custom
# Include StdTools first so we can override the suffix on the
# dependency of 'all' and 'standalone' before they are defined
include StdTools
SUFFIX_ABSOLUTE = ${SUFFIX_UTILITY}
include CApp
# You can't currently use the shared C library from a transient
UTIL_LIBS := $(filter-out ${CLIB},${APP_LIBS}) ${ANSILIB}
CFLAGS += ${C_NO_ZI} ${C_NO_STKCHK}
LDFLAGS += -util
${TARGET}${SUFFIX_UTILITY}: ${APP_OBJS_} ${UTIL_LIBS} ${DIRS}
${LD} ${LDFLAGS} -o ${TARGET}${SUFFIX_UTILITY} ${APP_OBJS_} ${UTIL_LIBS}
# EOF
......@@ -9,6 +9,7 @@ INCLUDED_STDTOOLS = YES
ifneq (Host,${APCS})
GNUTOOLPREFIX = arm-unknown-riscos-
SUFFIX_DATA = ,ffd
SUFFIX_UTILITY = ,ffc
SUFFIX_BASIC = ,ffb
SUFFIX_MODULE = ,ffa
SUFFIX_SPRITE = ,ff9
......
......@@ -15,7 +15,7 @@ include CApp
UTIL_LIBS := $(filter-out ${CLIB},${APP_LIBS}) ${ANSILIB}
CFLAGS += ${C_NO_ZI} ${C_NO_STKCHK}
LDFLAGS += -bin
LDFLAGS += -util
${TARGET}: ${APP_OBJS_} ${UTIL_LIBS} ${DIRS}
${LD} ${LDFLAGS} -o ${TARGET} ${APP_OBJS_} ${UTIL_LIBS}
${SETTYPE} ${TARGET} Utility
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment