Commit 6b4a70b4 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Shared makefile enhancements

AAsmModule:
 Comments sync'd with implementation
ModuleLibs/AppLibs:
 Add the RMVersion library
CApp:
 Now APP_OBJS and APP_DBG_OBJS don't need the '.o' suffix in common with OBJS and DBG_OBJS
 Changed insertion of version numbers to be common for Messages/Obey/Desc files through new 'INSTAPP_VERSION' dummy rule
 INSTALLAPP_DEPEND renamed to INSTAPP_DEPENDS to match other INSTAPP_stuff
CUtil:
 Use addprefix'd APP_OBJS
StdTools:
 Default SQUISHFLAGS now set
 Added INSERTVERSION


Version 6.20. Tagged as 'BuildSys-6_20'
parent e9c54adc
......@@ -30,16 +30,17 @@ INCLUDED_AASMMODULE = YES
# This fragment uses the following macros set by the master makefile.
#
#
# COMPONENT (the name of the component)
#
# RESFSDIR (opt) (actual directory to export resources to)
# ROM_MODULE(opt) (output filename - otherwise rm.${TARGET})
# ROM_OBJS (opt) (component's object files for romming)
# ROM_LIBS (opt) (libraries to link again ROM_OBJS to generate ROM_MODULE)
# DIRS (opt) (magic target to ensure object directories are present)
# HEADER1 (opt) (leafname of file in hdr to copy to <export$dir> on export_hdrs)
# HEADER2 (opt) (leafname of file in hdr to copy to <export$dir> on export_hdrs)
# EXP_HDR (opt) (directory for exported assembler interface headers)
# COMPONENT (the name of the component)
# TARGET (opt) (the leafname of the module - otherwise ${COMPONENT})
# RESFSDIR (opt) (actual directory to export resources to)
# ROM_MODULE (opt) (output filename - otherwise rm.${TARGET})
# ROM_OBJS (opt) (component's object files for romming)
# ROM_LIBS (opt) (libraries to link again ROM_OBJS to generate ROM_MODULE)
# DIRS (opt) (magic target to ensure object directories are present)
# HEADER[1-3] (opt) (leafname of file in hdr to copy to <export$dir> on export_hdrs)
# ASMCHEADER[1-3] (opt) (C-from-assembly auto-generated header files to export, no Hdr. prefix - otherwise none)
# C_EXP_HDR (opt) (C header target directory - otherwise <cexport$dir>.Interface.h)
# EXP_HDR (opt) (directory for exported assembler interface headers)
#
#
# It relies on the following from the build system:
......
......@@ -63,6 +63,7 @@ MODMALLOCLIB = C:ModMalloc.o.Lib
NCMALIB = C:NCMALib.o.NCMALib
NSPRLIB = C:NSPRLib.o.NSPRLib
OSLIB = C:OSLib.o.OSLib
RMVSN = C:RMVersion.o.RMVersion
SYNCLIB = C:SyncLib.o.SyncLib
TGRLIB = C:TGRLib.o.tgrlib
WILDLIB = C:Wild.o.Wild
......
......@@ -27,24 +27,23 @@ INCLUDED_CAPP = YES
# This fragment uses the following macros set by the master makefile.
#
#
# COMPONENT (the name of the component)
# TARGET (opt) (the leafname of the application - otherwise ${COMPONENT})
# DBG_TARGET (opt) (debug application leafname - otherwise ${TARGET}-D)
# INSTDIR (opt) (the target directory - otherwise <Install$Dir>.${TARGET})
# DIRS (opt) (stamp object for directory creation - otherwise o._dirs)
# OBJS (opt) (object files, no o. prefixes - otherwise ${TARGET})
# DBG_OBJS (opt) (debug build object files, no prefixes - otherwise ${OBJS})
# LIBS (opt) (extra libraries; CLib is always used)
# DBG_LIBS (opt) (extra debug libraries - otherwsie ${LIBS};
# CLib and DEBUGLIBS always used)
# APP_OBJS (opt) (object files for application version - otherwise derived
# from ${OBJS})
# APP_DBG_OBJS (opt) (object files for debug app version - otherwise derived
# from ${DBG_OBJS})
# LINK_TYPE (opt) (variant of linking command, eg C++ - defaults to C)
# INSTTYPE (opt) (use "tool" or "app" to install executable vs application - defaults to "tool")
# INSTALLAPPFILES (opt) (list of files to be installed in application directory - use InstRes specification rules)
# INSTALLAPP_DEPEND (opt) (list of dependencies to be satisfied before doing application install - ${TARGET} assumed if in INSTALLAPPFILES)
# COMPONENT (the name of the component)
# TARGET (opt) (the leafname of the application - otherwise ${COMPONENT})
# DBG_TARGET (opt) (debug application leafname - otherwise ${TARGET}-D)
# INSTAPP (opt) (the application target directory - otherwise ${INSTDIR}.!${COMPONENT})
# INSTDIR (opt) (the target directory - otherwise <Install$Dir>.${TARGET})
# DIRS (opt) (stamp object for directory creation - otherwise o._dirs)
# OBJS (opt) (object files, no o. prefixes - otherwise ${TARGET})
# DBG_OBJS (opt) (debug build object files, no prefixes - otherwise ${OBJS})
# LIBS (opt) (extra libraries; ${CLIB} is always used)
# DBG_LIBS (opt) (extra debug libraries - otherwise ${LIBS}; ${CLIB} and ${DEBUGLIBS} always used)
# APP_OBJS (opt) (object files for application version - otherwise derived from ${OBJS})
# APP_DBG_OBJS (opt) (object files for debug app version - otherwise derived from ${DBG_OBJS})
# LINK_TYPE (opt) (variant of linking command, eg C++ - defaults to C)
# INSTTYPE (opt) (use "tool" or "app" to install executable vs application - defaults to "tool")
# INSTAPP_FILES (opt) (list of files to be installed in application directory - use InstRes specification rules)
# INSTAPP_DEPENDS (opt) (list of dependencies to be satisfied before doing application install - ${TARGET} assumed if in INSTAPP_FILES)
# INSTAPP_VERSION (opt) (list of Messages/!Run/Desc files to insert app version from VersionNum - omit from INSTAPP_FILES)
# CUSTOMLINK (opt) (set to "custom" to override the link rule)
# CUSTOMINSTALLAPP (opt) (set to "custom" to override the install rule for resource files)
# CUSTOMINSTALLTOOL (opt) (set to "custom" to override the install rule for target binary)
......@@ -63,6 +62,7 @@ INCLUDED_CAPP = YES
# MKDIR (cdir/mkdir -p)
# ECHO
# TOUCH (create/touch)
# INSERTVERSION (awk script to substitute from VersionNum)
#
#
# It relies on the following from the StdRules makefile
......@@ -84,9 +84,12 @@ INSTALLDIR = <Install$Dir>
TARGET ?= ${COMPONENT}
DBG_TARGET ?= ${TARGET}-D
INSTDIR ?= ${INSTALLDIR}.${TARGET}
INSTAPP ?= ${INSTDIR}.!${COMPONENT}
DIRS ?= o._dirs
OBJS ?= ${TARGET}
APP_OBJS ?= ${OBJS}
DBG_OBJS ?= ${OBJS}
APP_DBG_OBJS ?= ${DBG_OBJS}
APP_LIBS ?= ${LIBS}
DBG_LIBS ?= ${LIBS}
ifeq (C++,${LINK_TYPE})
......@@ -95,8 +98,9 @@ DBG_LIBS += ${C++LIB}
endif
APP_LIBS += ${CLIB}
DBG_LIBS += ${DEBUGLIBS} ${CLIB}
APP_OBJS ?= $(addprefix o.,${OBJS})
APP_DBG_OBJS ?= $(addprefix od.,${DBG_OBJS})
APP_OBJS_ = $(addprefix o.,${APP_OBJS})
APP_DBG_OBJS_ = $(addprefix od.,${APP_DBG_OBJS})
ifeq ("${INCLUDED_STDTOOLS}","")
ifeq ("${INCLUDED_HOSTTOOLS}","")
......@@ -134,18 +138,23 @@ clean ::
install: install_${INSTTYPE}
install_: install_tool
${NOP}
${NOP}
INSTALLAPP_DEPEND += $(filter ${TARGET},${INSTALLAPPFILES})
INSTAPP_DEPENDS += $(filter ${TARGET},${INSTAPP_FILES})
install_app${CUSTOMINSTALLAPP}: ${INSTALLAPP_DEPEND}
install_app${CUSTOMINSTALLAPP}: ${INSTAPP_DEPENDS}
${MKDIR} ${INSTAPP}
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${INSTAPP} ${INSTALLAPPFILES}
ifneq (,$(filter Desc,${INSTALLAPPFILES}))
${CPREPRO} -I. ${INSTAPP}.Desc > ${INSTAPP}.DescTmp
${TIDYDESC} ${INSTAPP}.Desc ${INSTAPP}.DescTmp
${RM} ${INSTAPP}.DescTmp
endif
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${INSTAPP} ${INSTAPP_FILES}
ifneq (,$(filter Messages,${INSTAPP_VERSION}))
${INSERTVERSION} LocalRes:Messages > ${INSTAPP}.Messages
endif
ifneq (,$(filter Desc,${INSTAPP_VERSION}))
${INSERTVERSION} descmode=1 LocalRes:Desc > ${INSTAPP}.Desc
endif
ifneq (,$(filter !Run,${INSTAPP_VERSION}))
${INSERTVERSION} obeymode=1 LocalRes:!Run > ${INSTAPP}.!Run
${SETTYPE} ${INSTAPP}.!Run Obey
endif
@${ECHO} ${COMPONENT}: application installation complete
install_tool${CUSTOMINSTALLTOOL}: ${TARGET}
......@@ -156,11 +165,11 @@ install_tool${CUSTOMINSTALLTOOL}: ${TARGET}
debug: ${DBG_TARGET}
@${ECHO} ${COMPONENT}: debug application built
${TARGET}${CUSTOMLINK}: ${APP_OBJS} ${APP_LIBS} ${DIRS}
${LD} ${LDFLAGS} -o ${TARGET} ${APP_OBJS} ${APP_LIBS}
${TARGET}${CUSTOMLINK}: ${APP_OBJS_} ${APP_LIBS} ${DIRS}
${LD} ${LDFLAGS} -o ${TARGET} ${APP_OBJS_} ${APP_LIBS}
${SQZ} ${SQZFLAGS} $@
${DBG_TARGET}${CUSTOMLINK}: ${APP_DBG_OBJS} ${DBG_LIBS} ${DIRS}
${LD} ${LDFLAGS} ${LDDFLAGS} -o ${DBG_TARGET} ${APP_DBG_OBJS} ${DBG_LIBS}
${DBG_TARGET}${CUSTOMLINK}: ${APP_DBG_OBJS_} ${DBG_LIBS} ${DIRS}
${LD} ${LDFLAGS} ${LDDFLAGS} -o ${DBG_TARGET} ${APP_DBG_OBJS_} ${DBG_LIBS}
# EOF
......@@ -16,8 +16,8 @@ UTIL_LIBS := $(filter-out ${CLIB},${APP_LIBS}) ${ANSILIB}
CFLAGS += ${C_NO_ZI} ${C_NO_STKCHK}
LDFLAGS += -bin
${TARGET}: ${APP_OBJS} ${UTIL_LIBS} ${DIRS}
${LD} ${LDFLAGS} -o ${TARGET} ${APP_OBJS} ${UTIL_LIBS}
${TARGET}: ${APP_OBJS_} ${UTIL_LIBS} ${DIRS}
${LD} ${LDFLAGS} -o ${TARGET} ${APP_OBJS_} ${UTIL_LIBS}
${SETTYPE} ${TARGET} Utility
# EOF
......@@ -64,6 +64,7 @@ MODMALLOCLIB = C:ModMalloc.o.Lib_M
NCMALIB = C:NCMALib.o.NCMALibZM
NSPRLIB = C:NSPRLib.o.NSPRLibzm
OSLIB = C:OSLib.o.OSLib
RMVSN = C:RMVersion.o.RMVersionZ
SYNCLIB = C:SyncLib.o.SyncLibzm
TGRLIB = C:TGRLib.o.tgrlib
WILDLIB = C:Wild.o.Wild_M
......
......@@ -47,6 +47,7 @@ FILTERCOMP2 = ${PERL} Build:FilterComp2
GETVERSION = ${PERL} Build:GetVersion
HDR2H = ${PERL} Build:Hdr2H
INSTRES = <Perl$Dir>.perl Build:InstRes
INSERTVERSION = ${AWK} -f Build:AwkVers
ifeq (C++,${LINK_TYPE})
LD = link -c++
else
......@@ -104,6 +105,7 @@ UNZIP = unzip
STDTOOLOPTIONS = -depend !Depend ${THROWBACK}
AASMFLAGS += -Stamp -quit ${STDTOOLOPTIONS} ${AASMDEFINES} ${AASMINCLUDES}
ARFLAGS += -c -o
ASFLAGS += -Stamp -quit ${STDTOOLOPTIONS} ${ASMDEFINES} ${ASMINCLUDES}
ASFLAGS += -ihdr -i<Hdr$Dir>.Global -i<Hdr$Dir>.Interface -i<Hdr$Dir>.Interface2
ASFLAGS += -pd "APCS SETS \"${APCS}\"" -pd "Machine SETS \"${MACHINE}\"" -pd "UserIF SETS \"${USERIF}\""
......@@ -111,7 +113,7 @@ CFLAGS += -c ${STDTOOLOPTIONS} ${CDEFINES} ${CINCLUDES} ${C_NO_FNAMES} ${C_WARN
C++INCLUDES += -ICPP:
C++FLAGS += -c ${STDTOOLOPTIONS} ${C++DEFINES} ${C++INCLUDES}
CMHGFLAGS += -p ${STDTOOLOPTIONS} ${CMHGDEFINES} ${CMHGINCLUDES}
ARFLAGS += -c -o
SQUISHFLAGS += -nolist
C_WARNINGS := -fah
C_OPTSIZE := -Ospace
......
/* (6.19)
/* (6.20)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.19
#define Module_MajorVersion_CMHG 6.20
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 08 Jul 2013
#define Module_Date_CMHG 15 Jul 2013
#define Module_MajorVersion "6.19"
#define Module_Version 619
#define Module_MajorVersion "6.20"
#define Module_Version 620
#define Module_MinorVersion ""
#define Module_Date "08 Jul 2013"
#define Module_Date "15 Jul 2013"
#define Module_ApplicationDate "08-Jul-13"
#define Module_ApplicationDate "15-Jul-13"
#define Module_ComponentName "BuildSys"
#define Module_ComponentPath "castle/RiscOS/BuildSys"
#define Module_FullVersion "6.19"
#define Module_HelpVersion "6.19 (08 Jul 2013)"
#define Module_LibraryVersionInfo "6:19"
#define Module_FullVersion "6.20"
#define Module_HelpVersion "6.20 (15 Jul 2013)"
#define Module_LibraryVersionInfo "6:20"
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